diff options
Diffstat (limited to 'web/cobrands/tfl/js.js')
-rw-r--r-- | web/cobrands/tfl/js.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/web/cobrands/tfl/js.js b/web/cobrands/tfl/js.js index c80036370..a217d3984 100644 --- a/web/cobrands/tfl/js.js +++ b/web/cobrands/tfl/js.js @@ -2,6 +2,14 @@ translation_strings.name.validName = 'Please enter your full name, Transport for London needs this information – if you do not wish your name to be shown on the site, untick the box below'; translation_strings.upload_default_message = 'Drag photo here to upload or <u>browse files</u>'; +translation_strings.incident_date = { date: 'Enter a date in the format dd/mm/yyyy' }; +translation_strings.time = 'Enter a time in the format hh:mm'; + +if (jQuery.validator) { + jQuery.validator.addMethod('time', function(value, element) { + return this.optional(element) || /^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/.test( value ); + }, translation_strings.time ); +} fixmystreet.tfl_link_update = function() { var lat = document.getElementById('fixmystreet.latitude'); |