Skip to content

Commit

Permalink
Additional fix for CO-1803
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Nov 2, 2019
1 parent f303cad commit 746afc3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 12 additions & 0 deletions app/src/Model/Table/MatchgridSettingsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,18 @@ public function validationDefault(Validator $validator) {
);
$validator->allowEmpty('referenceid_prefix');

$validator->add(
'notification_email',
'length',
[ 'rule' => [ 'maxLength', 80 ] ]
);
$validator->add(
'notification_email',
'content',
[ 'rule' => 'email' ]
);
$validator->allowEmpty('notification_email');

return $validator;
}
}
6 changes: 2 additions & 4 deletions app/src/Template/MatchgridSettings/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ if($action == 'edit') {
print $this->Field->control('referenceid_start',
['default' => 1001]);

print $this->Field->control('referenceid_prefix',
[],
false);
print $this->Field->control('referenceid_prefix', [], false);

print $this->Field->control('notification_email', [], true);
print $this->Field->control('notification_email', [], false);
}
2 changes: 1 addition & 1 deletion app/src/Template/SystemsOfRecord/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ if($action == 'add' || $action == 'edit') {
['empty' => true,
'onChange' => 'fields_update_gadgets();']);

print $this->Field->control('notification_email', [], true);
print $this->Field->control('notification_email', [], false);
}

0 comments on commit 746afc3

Please sign in to comment.