Browse Source

Multiselect is already working

merge-requests/2/head
Mike Koch 7 years ago
parent
commit
085d1b6d22
  1. 10
      admin/admin_submit_ticket.php
  2. 1
      language/en/text.php

10
admin/admin_submit_ticket.php

@ -92,6 +92,16 @@ 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!
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]);
}
if (is_array($_POST[$k]))
{
$tmpvar[$k]='';

1
language/en/text.php

@ -26,6 +26,7 @@ $hesklang['date_custom_field'] = 'Date';
$hesklang['date_custom_field_text'] = 'No options for this custom field type.';
$hesklang['multiple_select_custom_field'] = 'Multiple Select box';
$hesklang['multiple_select_custom_field_text'] = 'Options for this multi-select box, enter one option per line (each line will be a choice your customers can choose from). You need to enter at least two options!';
$hesklang['invalid_date_format'] = 'Date must be in YYYY-MM-DD format.';
// ADDED OR MODIFIED IN Mods For HESK 1.6.0
$hesklang['ticket_closed'] = '[#%%TRACK_ID%%] Ticket closed/resolved';

Loading…
Cancel
Save