diff --git a/css/redactor.css b/css/redactor.css index dd2b3d91e98942c25886dcac1a63a8ac91dee951..cdd49f61cb715bb2896710d07b506802d171d797 100644 --- a/css/redactor.css +++ b/css/redactor.css @@ -59,10 +59,12 @@ .redactor-box-fullscreen { z-index: 99 !important; } -.redactor-toolbar, -.redactor-dropdown { +.redactor-toolbar { z-index: 1 !important; } +.redactor-dropdown { + z-index: 15; +} #redactor-modal-overlay, #redactor-modal-box, #redactor-modal { diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index d51ddc7af107193a6a76ef24e3e9c836bed5e600..bcd1d7ee32d7a221529545dec900c8735c8af82d 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -583,7 +583,7 @@ class DynamicFormField extends VerySimpleModel { } if (count($errors) === 0) $this->set('configuration', JsonDataEncoder::encode($config)); - $this->set('hint', $_POST['hint']); + $this->set('hint', Format::sanitize($_POST['hint'])); return count($errors) === 0; } diff --git a/include/client/templates/dynamic-form.tmpl.php b/include/client/templates/dynamic-form.tmpl.php index 6cf54466b08a0622693126a915ed503cf9dbba86..92514f476de426580e0d0e331c2b2095251e5e5e 100644 --- a/include/client/templates/dynamic-form.tmpl.php +++ b/include/client/templates/dynamic-form.tmpl.php @@ -31,7 +31,7 @@ ?></span><?php if ($field->get('hint')) { ?> <br /><em style="color:gray;display:inline-block"><?php - echo Format::htmlchars($field->getLocal('hint')); ?></em> + echo Format::viewableImages($field->getLocal('hint')); ?></em> <?php } ?> <br/> diff --git a/include/staff/dynamic-form.inc.php b/include/staff/dynamic-form.inc.php index 1939cda0e211de50eaddf249e51243853750ad7a..a25f8ef27318aa3e7fc9f227986c4908880120c9 100644 --- a/include/staff/dynamic-form.inc.php +++ b/include/staff/dynamic-form.inc.php @@ -82,7 +82,7 @@ if ($form && count($langs) > 1) { ?> <div style="margin-top: 8px"><?php echo __('Instructions'); ?>: <i class="help-tip icon-question-sign" href="#form_instructions"></i> </div> - <textarea name="instructions" rows="3" cols="40" class="richtext"><?php + <textarea name="instructions" rows="3" cols="40" class="richtext small"><?php echo $info['instructions']; ?></textarea> </div> diff --git a/include/staff/templates/dynamic-field-config.tmpl.php b/include/staff/templates/dynamic-field-config.tmpl.php index 470684604777157c0f628b62b9c15f42ee7d6940..f2e66643197866939fdb95fe1147c7b66ee1bca5 100644 --- a/include/staff/templates/dynamic-field-config.tmpl.php +++ b/include/staff/templates/dynamic-field-config.tmpl.php @@ -134,7 +134,7 @@ <?php if ($f->get('hint')) { ?> <br/><em style="color:gray;display:inline-block"><?php - echo Format::htmlchars($f->get('hint')); ?></em> + echo Format::viewableImages($f->get('hint')); ?></em> <?php } ?> </div><div> @@ -160,6 +160,7 @@ </div> <div style="width:100%"> <textarea style="width:90%; width:calc(100% - 20px)" name="hint" rows="2" cols="40" + class="richtext small no-bar" data-translate-tag="<?php echo $field->getTranslateTag('hint'); ?>"><?php echo Format::htmlchars($field->get('hint')); ?></textarea> </div> diff --git a/include/staff/templates/dynamic-form-simple.tmpl.php b/include/staff/templates/dynamic-form-simple.tmpl.php index 30b43c6b9072b477f21ed2c8c724ddaaa7eef2a0..cd53f0cd8950126c08f27e18f11f09eb7f92ce0e 100644 --- a/include/staff/templates/dynamic-form-simple.tmpl.php +++ b/include/staff/templates/dynamic-form-simple.tmpl.php @@ -15,7 +15,7 @@ <?php if ($f->get('hint')) { ?> <br/><em style="color:gray;display:inline-block"><?php - echo Format::htmlchars($f->get('hint')); ?></em> + echo Format::viewableImages($f->get('hint')); ?></em> <?php } ?> </div><div> diff --git a/include/staff/templates/dynamic-form.tmpl.php b/include/staff/templates/dynamic-form.tmpl.php index 5002700fce79396f2f86098a030ac1c061cdb357..b6abadd3a6aeedf0616a8d2e04ef504f8a57f7da 100644 --- a/include/staff/templates/dynamic-form.tmpl.php +++ b/include/staff/templates/dynamic-form.tmpl.php @@ -89,7 +89,7 @@ if (isset($options['entry']) && $options['mode'] == 'edit') { ?> } if ($field->get('hint') && !$field->isBlockLevel()) { ?> <br /><em style="color:gray;display:inline-block"><?php - echo Format::htmlchars($field->getLocal('hint')); ?></em> + echo Format::viewableImages($field->getLocal('hint')); ?></em> <?php } foreach ($field->errors() as $e) { ?> diff --git a/include/staff/templates/inline-form.tmpl.php b/include/staff/templates/inline-form.tmpl.php index 5de3a283a4f692ba432caeb842b32f84e5e21e0b..02b3aa6bfe5de7fee0e3eeb94a19106926b01a2b 100644 --- a/include/staff/templates/inline-form.tmpl.php +++ b/include/staff/templates/inline-form.tmpl.php @@ -13,7 +13,7 @@ foreach ($form->getFields() as $field) { ?> } if ($field->get('hint') && !$field->isBlockLevel()) { ?> <br/><em style="color:gray;display:inline-block"><?php - echo Format::htmlchars($field->get('hint')); ?></em> + echo Format::viewableImages($field->get('hint')); ?></em> <?php } foreach ($field->errors() as $e) { ?> diff --git a/include/staff/templates/simple-form.tmpl.php b/include/staff/templates/simple-form.tmpl.php index 705592fcf516635c4f9148d12716d638f7710014..6661f5c97477ee268de902553bce95604de1a101 100644 --- a/include/staff/templates/simple-form.tmpl.php +++ b/include/staff/templates/simple-form.tmpl.php @@ -16,7 +16,7 @@ } if ($field->get('hint')) { ?> <div class="faded hint"><?php - echo Format::htmlchars($field->getLocal('hint')); + echo Format::viewableImages($field->getLocal('hint')); ?></div> <?php } ?> </div> diff --git a/include/upgrader/streams/core/5cd0a25a-2d590ffa.task.php b/include/upgrader/streams/core/5cd0a25a-2d590ffa.task.php index f18c0cab94359c5af4e6a2994685514b2a96f88b..7f529e727e3ede0464fff9b41eff55be5d91378f 100644 --- a/include/upgrader/streams/core/5cd0a25a-2d590ffa.task.php +++ b/include/upgrader/streams/core/5cd0a25a-2d590ffa.task.php @@ -6,6 +6,7 @@ class InstructionsPorter extends MigrationTask { function run($max_time) { foreach (DynamicForm::objects() as $F) { $F->instructions = Format::htmlchars($F->get('instructions')); + $F->hint = Format::htmlchars($F->get('hint')); $F->save(); } }