From 49c233c15e2817e393e2aa0db05e25d86dc04fcb Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Fri, 10 Apr 2015 19:35:40 +0530 Subject: [PATCH] CRM-16257 resolved regression caused by previous commit for issue CRM-16157 ---------------------------------------- * CRM-16257: "Sorry an error occurred and your information was not saved" if email contains an image or a table https://issues.civicrm.org/jira/browse/CRM-16257 * CRM-16157: Option Group - Paper Size Options lost edit ability https://issues.civicrm.org/jira/browse/CRM-16157 --- CRM/Admin/Form/Options.php | 13 ++++++----- templates/CRM/Admin/Form/Options.tpl | 33 +++++++++++++++------------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/CRM/Admin/Form/Options.php b/CRM/Admin/Form/Options.php index aed51b5186..3c92c0bcc9 100644 --- a/CRM/Admin/Form/Options.php +++ b/CRM/Admin/Form/Options.php @@ -171,6 +171,13 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { TRUE ); + $this->add('text', + 'value', + ts('Value'), + CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'value'), + TRUE + ); + if (!in_array($this->_gName, array( 'email_greeting', 'postal_greeting', @@ -215,12 +222,6 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { $required = TRUE; } elseif ($this->_gName == 'redaction_rule' || $this->_gName == 'engagement_index') { - $this->add('text', - 'value', - ts('Value'), - CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'value'), - TRUE - ); if ($this->_gName == 'redaction_rule') { $this->add('checkbox', 'filter', diff --git a/templates/CRM/Admin/Form/Options.tpl b/templates/CRM/Admin/Form/Options.tpl index c1cc4d9fb9..eacc079b7c 100644 --- a/templates/CRM/Admin/Form/Options.tpl +++ b/templates/CRM/Admin/Form/Options.tpl @@ -74,6 +74,16 @@ {$form.grouping.html} {/if} + + {if $form.value.html && $gName neq 'redaction_rule'} + + {$form.value.label} + {$form.value.html}
+
{ts}Changing the Value field will unlink records which have been marked with this option. This change can not be undone except by restoring the previous value.{/ts}
+ + + {/if} + {if $gName eq 'custom_search'} {ts}Search Title{/ts} @@ -82,21 +92,14 @@ {else} - {if $gName eq 'redaction_rule'} - - {ts}Replacement (prefix){/ts} - {$form.value.html}
- {ts}Matched values are replaced with this prefix plus a unique code. EX: If replacement prefix for "Vancouver" is city_, occurrences will be replaced with city_39121.{/ts} - - - {elseif $form.value.html} - - {$form.value.label} - {$form.value.html}
-
{ts}Changing the Value field will unlink records which have been marked with this option. This change can not be undone except by restoring the previous value.{/ts}
- - - {/if} + {if $gName eq 'redaction_rule'} + + {ts}Replacement (prefix){/ts} + {$form.value.html}
+ {ts}Matched values are replaced with this prefix plus a unique code. EX: If replacement prefix for "Vancouver" is city_, occurrences will be replaced with city_39121.{/ts} + + + {/if} {if $form.name.html} {* Get the name value also *} {$form.name.label} -- 2.25.1