diff --git a/admin/admin_submit_ticket.php b/admin/admin_submit_ticket.php index 60cc2ff8..1040ef88 100644 --- a/admin/admin_submit_ticket.php +++ b/admin/admin_submit_ticket.php @@ -92,13 +92,9 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v) { if ($v['use'] && isset($_POST[$k])) { - // Dates must be in YYYY-MM-DD format. Thanks to - // http://stackoverflow.com/questions/19773418/regex-to-validate-date-in-php-using-format-as-yyyy-mm-dd for the regex! + // Date will be handled by the jQuery datepicker if( $v['type'] == 'date' && $_POST[$k] != '') { - if (!preg_match('^(19|20)\d\d[\-\/.](0[1-9]|1[012])[\-\/.](0[1-9]|[12][0-9]|3[01])$', $_POST[$k]) || strtotime($_POST[$k]) < 0) - $hesk_error_buffer[$k]=$hesklang['invalid_date_format']; - } else { $tmpvar[$k] = hesk_dateToString($_POST[$k]); } diff --git a/admin/new_ticket.php b/admin/new_ticket.php index 096001f0..3b6440be 100644 --- a/admin/new_ticket.php +++ b/admin/new_ticket.php @@ -345,11 +345,15 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); $v['value'] = $k_value; } - $cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : ''; - - echo '
- -
+ $cls = in_array($k,$_SESSION['iserror']) ? ' isError ' : ''; + + echo ' +
+ +
+ +
'; break; diff --git a/css/hesk_newStyle.php b/css/hesk_newStyle.php index f77a5f98..6f65ba1b 100644 --- a/css/hesk_newStyle.php +++ b/css/hesk_newStyle.php @@ -364,3 +364,8 @@ div.setupButtons { float: right; } } + +.white-readonly { + cursor: text !important; + background-color: #fff !important; +} diff --git a/js/modsForHesk-javascript.js b/js/modsForHesk-javascript.js index f8100465..09dd72e5 100644 --- a/js/modsForHesk-javascript.js +++ b/js/modsForHesk-javascript.js @@ -7,7 +7,12 @@ var loadJquery = function() //-- Active popovers $('[data-toggle="popover"]').popover({ trigger: 'hover' - }) + }); + + //-- Activate jQuery's date picker + $(function() { + $('.datepicker').datepicker(); + }); }; function toggleRow(id) {