Skip to content

Commit

Permalink
Allow restrictions on project identifiers to be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mrw34 committed Sep 27, 2014
1 parent 5eb8783 commit c35a3a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/views/Application/study.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
});
$('#submit').on('click', function() {
var participationID = input.val();
#{ifnot Boolean.valueOf(play.configuration.getProperty("projectIdentifier.validationDisabled"))}
if (participationID && !participationID.match(/(3T)|(1.5T)|(NNU)/)) {
var disallowed = ["${study.patient.pat_id.toLowerCase()}"]#{ifNotVisitor}.concat("${study.patient.pat_name?.formatAsName()}".split(/[\s,']/))#{/ifNotVisitor};
for (var i in disallowed) {
Expand All @@ -95,6 +96,7 @@
}
}
}
#{/ifnot}
if ((input.data("value") && (input.val() !== input.data("value"))) || (select.data("value") && (Number(select.val()) !== select.data("value")))) {
if (!window.confirm("Changing a patient's project or identifier will affect all other users of the system. Are you sure?")) {
$(this)[0].reset();
Expand Down

0 comments on commit c35a3a3

Please sign in to comment.