Skip to content

Commit

Permalink
LIMS-1467: Allow lab contacts to have spaces in their names (#843)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>
  • Loading branch information
ndg63276 and Mark Williams authored Oct 22, 2024
1 parent 8b2fd68 commit 53ae0bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/src/Page/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class Contact extends Page
{

public static $arg_list = array('CARDNAME' => '([\w\s\-])+',
'FAMILYNAME' => '([\w\-])+',
'GIVENNAME' => '([\w\-])+',
'FAMILYNAME' => '([\w\s\-])+',
'GIVENNAME' => '([\w\s\-])+',
'PHONENUMBER' => '.*',
'EMAILADDRESS' => '.*',
'LABNAME' => '([\w\s\-])+',
Expand Down
4 changes: 2 additions & 2 deletions client/src/js/models/labcontact.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ define(['backbone'], function(Backbone) {
},
FAMILYNAME: {
required: true,
pattern: 'wwdash',
pattern: 'wwsdash',
},
GIVENNAME: {
required: true,
pattern: 'wwdash',
pattern: 'wwsdash',
},
PHONENUMBER: {
required: true,
Expand Down
4 changes: 2 additions & 2 deletions client/src/js/modules/shipment/models/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ define(['backbone'], function(Backbone) {

GIVENNAME: {
required: function () {return this.dispatchDetailsRequired},
pattern: 'wwdash',
pattern: 'wwsdash',
},

FAMILYNAME: {
required: function () {return this.dispatchDetailsRequired},
pattern: 'wwdash',
pattern: 'wwsdash',
},

PHONENUMBER: {
Expand Down
2 changes: 2 additions & 0 deletions client/src/js/modules/shipment/views/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ define(['marionette', 'views/form',
this.dispatchCountry = this.ui.country.val()
this.ui.courierSection.show();
this.ui.dispatchDetails.show();
this.model.visitRequired = true
this.model.dispatchDetailsRequired = true
this.ui.submit.show();
if (
Expand Down Expand Up @@ -334,6 +335,7 @@ define(['marionette', 'views/form',
){
this.model.visitRequired = false
this.ui.dispatchDetails.hide()
this.model.dispatchDetailsRequired = false
this.ui.submit.text("Proceed")
this.ui.shippingadvice.html("<mark>On clicking 'Proceed' you will be redirected to the new Diamond shipping service to book the shipment. Please ensure all stages of the form are completed.</mark><br /><br />")
}
Expand Down

0 comments on commit 53ae0bb

Please sign in to comment.