From 955b43279bb5aa69e9d049c895c4fce3345c98f5 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 7 Mar 2014 09:47:49 -0500 Subject: [PATCH] CRM-13981 - Fix options edit link for soft-credits --- .../Form/ContributionPage/Settings.php | 17 +++++++---------- .../Form/ContributionPage/Settings.tpl | 18 +----------------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/CRM/Contribute/Form/ContributionPage/Settings.php b/CRM/Contribute/Form/ContributionPage/Settings.php index 2624cd10a9..b5dad0c4a7 100644 --- a/CRM/Contribute/Form/ContributionPage/Settings.php +++ b/CRM/Contribute/Form/ContributionPage/Settings.php @@ -205,16 +205,13 @@ class CRM_Contribute_Form_ContributionPage_Settings extends CRM_Contribute_Form_ $this->add('textarea', 'honor_block_text', ts('Honoree Introductory Message'), array('rows' => 2, 'cols' => 50)); - $softCreditTypes = &$this->add('select', 'soft_credit_types', - ts('Honor Types'), - CRM_Core_OptionGroup::values("soft_credit_type", FALSE), - FALSE, - array( - 'id' => 'soft_credit_types', - 'multiple' => 'multiple', - 'class' => 'crm-select2', - ) - ); + $this->addSelect('soft_credit_types', array( + 'label' => ts('Honor Types'), + 'entity' => 'ContributionSoft', + 'field' => 'soft_credit_type_id', + 'multiple' => TRUE, + 'class' => 'huge' + )); $entities = array( array( diff --git a/templates/CRM/Contribute/Form/ContributionPage/Settings.tpl b/templates/CRM/Contribute/Form/ContributionPage/Settings.tpl index 7a9d6daabc..d7ebb4e068 100644 --- a/templates/CRM/Contribute/Form/ContributionPage/Settings.tpl +++ b/templates/CRM/Contribute/Form/ContributionPage/Settings.tpl @@ -138,12 +138,7 @@ {$form.soft_credit_types.label} -
{$form.soft_credit_types.html|crmAddClass:huge}
-
- - - -
+ {$form.soft_credit_types.html} @@ -211,17 +206,6 @@ document.getElementById("honor").style.display = "none"; } } - cj('.optionvalue-link').click(function() { - {/literal}"{crmAPI var='result' entity='OptionGroup' action='get' sequential=1 name='soft_credit_type'}"{literal}; - var postURL = {/literal}"{crmURL p='civicrm/admin/options' q="gid="}{$result.id}"{literal}; - CRM.loadForm(postURL).on('crmFormSuccess', function(e, data) { - cj('.ui-dialog a').click(function(){ - //Todo: inline edit facility for soft_credit_type option group in jquery popup dialog - }); - }); - return false; - }) - {/literal} -- 2.25.1