diff --git a/include/class.forms.php b/include/class.forms.php index e13d73f9cea6c886ff2db38b0ca5d769810e1f96..0e973557752910e08fef1ce710dbf1d4d01c877a 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -2273,6 +2273,10 @@ class PriorityField extends ChoiceField { return ($value instanceof Priority) ? array($value->getId()) : null; } + function asVar($value, $id=false) { + return $this->to_php($value, $id); + } + function getConfigurationOptions() { $choices = $this->getChoices(); $choices[''] = __('System Default'); @@ -3970,7 +3974,10 @@ class FileUploadWidget extends Widget { // Files already attached to the field are allowed foreach ($this->field->getFiles() as $F) { // FIXME: This will need special porting in v1.10 - $allowed[$F->id] = 1; + if ($F instanceof Attachment) + $allowed[$F->getFileId()] = 1; + else + $allowed[$F->id] = 1; } // New files uploaded in this session are allowed diff --git a/include/class.thread.php b/include/class.thread.php index bcc3deb6a6d759b36b0d031eaa27671c9193576a..d6f21619a31c129fc2d971686553e79a0737fb06 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -1943,8 +1943,9 @@ class EditEvent extends ThreadEvent { $fields[$F->id] = $F; } foreach ($data['fields'] as $id=>$f) { - $field = $fields[$id]; - if ($mode == self::MODE_CLIENT && !$field->isVisibleToUsers()) + if (!($field = $fields[$id])) + continue; + if ($mode == self::MODE_CLIENT && !$field->isVisibleToUsers()) continue; list($old, $new) = $f; $impl = $field->getImpl($field); diff --git a/scp/css/scp.css b/scp/css/scp.css index 86632ba2766ff353f499c2c13b1d4b8b60d68b16..4d1a2cb8421df7f1b05f5d4688a58242327fe16a 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -2925,3 +2925,8 @@ a.attachment { * Fixes a rendering issue on Safari */ .select2-search__field{-webkit-appearance: textfield;} +/* Fixes Select2 placeholder bug where + * placeholder is cutoff. + */ +.select2-selection__rendered, .select2-search, +.select2-search__field:not([placeholder='']){width: 100% !important;} diff --git a/scp/js/scp.js b/scp/js/scp.js index e9ab63ef307597b8a099f80aaba80dbc19798390..085ae525a03cb6bc22d75ece712805756374dde4 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -195,7 +195,7 @@ var scp_prep = function() { $('form select#cannedResp').select2({width: '300px'}); $('form select#cannedResp').on('select2:opening', function (e) { - var redactor = $('.richtext', e.target.closest('form')).data('redactor'); + var redactor = $('.richtext', $(this).closest('form')).data('redactor'); if (redactor) redactor.selection.save(); });