From dbfed2020bdf37fe02316b73eb439a12fe004950 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 13 Nov 2013 17:14:53 -0600 Subject: [PATCH] Choices edit field should not be HTML --- include/class.forms.php | 7 ++++++- include/staff/templates/dynamic-field-config.tmpl.php | 4 ++-- scp/css/scp.css | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/class.forms.php b/include/class.forms.php index 3c583b56b..f54b52c63 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -606,7 +606,12 @@ class ChoiceField extends FormField { function getConfigurationOptions() { return array( 'choices' => new TextareaField(array( - 'id'=>1, 'label'=>'Choices', 'required'=>false, 'default'=>'')), + 'id'=>1, 'label'=>'Choices', 'required'=>false, 'default'=>'', + 'hint'=>'List choices, one per line. To protect against + spelling changes, specify key:value names to preserve + entries if the list item names change', + 'configuration'=>array('html'=>false) + )), ); } diff --git a/include/staff/templates/dynamic-field-config.tmpl.php b/include/staff/templates/dynamic-field-config.tmpl.php index c4da54f51..4a0703b30 100644 --- a/include/staff/templates/dynamic-field-config.tmpl.php +++ b/include/staff/templates/dynamic-field-config.tmpl.php @@ -24,7 +24,7 @@ else if ($f->get('default')) $f->value = $f->get('default'); ?> - <tr><td> + <tr><td class="multi-line"> <label for="<?php echo $f->getWidget()->name; ?>" style="vertical-align:top;padding-top:0.2em"> <?php echo Format::htmlchars($f->get('label')); ?>:</label> @@ -53,7 +53,7 @@ } ?> <tr><td colspan="2"><hr/></td></tr> - <tr><td> + <tr><td class="multi-line"> <label for="hint" style="vertical-align:top;padding-top:0.2em">Help Text:</label> </td><td> diff --git a/scp/css/scp.css b/scp/css/scp.css index 79da1d798..df4635a9f 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -541,7 +541,7 @@ a.print { } -.form_table td.multi-line { +td.multi-line { vertical-align:top; padding-top: 0.4em; padding-bottom: 0.4em; -- GitLab