#91 Add new custom field options to the array of possible choices

merge-requests/2/head
Mike Koch 9 years ago
parent 46e09d618c
commit 50f5ce4596

@ -1239,8 +1239,6 @@ if ( defined('HESK_DEMO') )
<option value="select" '.($this_field['type'] == 'select' ? 'selected="selected"' : ''). '>'.$hesklang['ssb'].'</option>
<option value="checkbox" '.($this_field['type'] == 'checkbox' ? 'selected="selected"' : '').'>'.$hesklang['scb'].'</option>
<option value="date" '.($this_field['type'] == 'date' ? 'selected="selected"' : '').'>'.$hesklang['date_custom_field'].'</option>
<option value="time" '.($this_field['type'] == 'time' ? 'selected="selected"' : '').'>'.$hesklang['time_custom_field'].'</option>
<option value="datetime" '.($this_field['type'] == 'datetime' ? 'selected="selected"' : '').'>'.$hesklang['datetime_custom_field'].'</option>
<option value="multiselect" '.($this_field['type'] == 'multiselect' ? 'selected="selected"' : '').'>'.$hesklang['multiple_select_custom_field'].'</option>
</select>
</td>

@ -390,7 +390,7 @@ for ($i=1;$i<=20;$i++)
$set['custom_fields'][$this_field]['maxlen'] = intval( hesk_POST('s_custom'.$i.'_maxlen', 255) );
$set['custom_fields'][$this_field]['value'] = hesk_input( hesk_POST('s_custom'.$i.'_val') );
if (!in_array($set['custom_fields'][$this_field]['type'],array('text','textarea','select','radio','checkbox')))
if (!in_array($set['custom_fields'][$this_field]['type'],array('text','textarea','select','radio','checkbox','date','multiselect')))
{
$set['custom_fields'][$this_field]['type'] = 'text';
}

@ -268,12 +268,6 @@ switch ($type)
case 'date':
echo '<p>'.$hesklang['date_custom_field_text'].'</p>';
break;
case 'time':
echo '<p>'.$hesklang['time_custom_field_text'].'</p>';
break;
case 'datetime':
echo '<p>'.$hesklang['datetime_custom_field_text'].'</p>';
break;
case 'multiselect':
$options=str_replace('#HESK#',"\n",$query);
echo '

@ -24,10 +24,6 @@ $hesklang['EMAIL_HR']='------ Reply above this line ------';
// ADDED OR MODIFIED IN Mods For HESK 2.0.0
$hesklang['date_custom_field'] = 'Date';
$hesklang['date_custom_field_text'] = 'No options for this custom field type.';
$hesklang['time_custom_field'] = 'Time';
$hesklang['time_custom_field_text'] = 'No options for this custom field type.';
$hesklang['datetime_custom_field'] = 'Date and time';
$hesklang['datetime_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!';

Loading…
Cancel
Save