@@ -195,7 +195,7 @@ protected function setTaggedFields() {
195
195
$ recordData = REDCap::getData ('array ' , $ this ->record , $ matches [1 ], $ this ->event_id , null , false , false , false , null , false ); // export raw
196
196
$ join_val = $ recordData [1 ]['repeat_instances ' ][$ this ->event_id ][$ this ->instrument ][$ this ->repeat_instance ][$ matches [1 ]];
197
197
if (preg_match ("/ " .self ::ACTION_TAG_DST ."='?((\w+_arm_\d+[a-z]?:)?\w+)'?\s?/ " , $ fieldDetails ['field_annotation ' ], $ matches )) {
198
- $ filter = "[ " . $ matches [1 ] ."]=' " .$ join_val ."' " ;
198
+ $ filter = $ this -> escape ( "[ " . $ matches [1 ] ."]=' " .$ join_val ."' " ) ;
199
199
}
200
200
}
201
201
@@ -891,6 +891,16 @@ protected function popupViewTweaks() {
891
891
window.opener.refreshTables();
892
892
dataEntrySubmit(this);
893
893
});
894
+ $('#submit-btn-savecontinue') // Save & Stay - preserve &extmod_instance_table=1 in url when reload
895
+ .attr('name', 'submit-btn-savecontinue')
896
+ .removeAttr('onclick')
897
+ .click(function(event) {
898
+ var redirectUrl = window.location.href.replace('&extmod_instance_table_add_new=1','');
899
+ event.preventDefault();
900
+ window.opener.refreshTables();
901
+ dataEntrySubmit(this);
902
+ window.setTimeout($.redirectUrl, 500, redirectUrl);
903
+ });
894
904
$('#submit-btn-savenextinstance')// Save & Next Instance (not necessarily a new instance)
895
905
.attr('name', 'submit-btn-savenextinstance')
896
906
.removeAttr('onclick')
@@ -908,14 +918,14 @@ protected function popupViewTweaks() {
908
918
window.opener.refreshTables();
909
919
window.close();
910
920
});
911
- <?php
912
- if ( isset ($ _GET ['extmod_instance_table_add_new ' ])) {
913
- ?>
914
- $('button[name=submit-btn-deleteform]').css("display", "none");
915
- <?php
916
- } else {
917
- ?>
918
- $('button[name=submit-btn-deleteform]')
921
+ <?php
922
+ if ( isset ($ _GET ['extmod_instance_table_add_new ' ])) {
923
+ ?>
924
+ $('button[name=submit-btn-deleteform]').css("display", "none");
925
+ <?php
926
+ } else {
927
+ ?>
928
+ $('button[name=submit-btn-deleteform]')
919
929
.removeAttr('onclick')
920
930
.click(function(event) {
921
931
$('#form').append('<input type="hidden" name="extmod_closerec_home" value="<?= $ record?> ">');
@@ -932,19 +942,19 @@ function(){
932
942
);
933
943
return false;
934
944
});
935
- <?php
936
- }
937
- if (isset ($ _GET ['__reqmsg ' ])) {
938
- ?>
939
- setTimeout(function() {
945
+ <?php
946
+ }
947
+ if (isset ($ _GET ['__reqmsg ' ])) {
948
+ ?>
949
+ setTimeout(function() {
940
950
$('div[aria-describedby="reqPopup"]').find('div.ui-dialog-buttonpane').find('button').not(':last').hide(); // .css('visibility', 'visible'); // required fields message show only "OK" button, not ignore & leave
941
951
}, 100);
942
- <?php
952
+ <?php
943
953
}
944
- ?>
954
+ ?>
945
955
});
946
956
</script>
947
- <?php
957
+ <?php
948
958
}
949
959
950
960
/**
0 commit comments