Merge branch '5.3'

This commit is contained in:
Robbie Averill 2018-12-03 09:20:26 +00:00
commit d71c482685
5 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@
*/
$.extend($.validator.methods, {
date: function(value, element) {
return this.optional(element) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);
return this.optional(element) || /^[\d]{1,4}\-[0-1][0-9]\-[0-3][0-9]?$/.test(value);
},
number: function(value, element) {
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);

View File

@ -1,4 +1,4 @@
/*! jQuery Validation Plugin - v1.13.1 - 10/14/2014
* http://jqueryvalidation.org/
* Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(a)}})});
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^[\d]{1,4}\-[0-1][0-9]\-[0-3][0-9]?$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(a)}})});

View File

@ -12,7 +12,7 @@
*/
$.extend($.validator.methods, {
date: function(value, element) {
return this.optional(element) || /^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test(value);
return this.optional(element) || /^[\d]{1,4}\-[0-1][0-9]\-[0-3][0-9]?$/.test(value);
}
});

View File

@ -1,4 +1,4 @@
/*! jQuery Validation Plugin - v1.13.1 - 10/14/2014
* http://jqueryvalidation.org/
* Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test(a)}})});
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^[\d]{1,4}\-[0-1][0-9]\-[0-3][0-9]?$/.test(a)}})});

View File

@ -506,8 +506,8 @@ class EmailRecipient extends DataObject
$templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);
// Optionally remove "templates/" prefixes
if (substr($templatePath, 0, 10)) {
$templatePath = substr($templatePath, 10);
if (preg_match('/(?<=templates\/).*$/', $templatePath, $matches)) {
$templatePath = $matches[0];
}
$templates[$templatePath] = $template['filename'];