CRM-14165 - Improve option popup editor
authorColeman Watts <coleman@civicrm.org>
Thu, 6 Feb 2014 01:31:48 +0000 (17:31 -0800)
committerColeman Watts <coleman@civicrm.org>
Thu, 6 Feb 2014 01:31:48 +0000 (17:31 -0800)
CRM/Admin/Form/Options.php
js/Common.js

index ef2b883a9d1c3c541814787f38c415aa6a7794aa..2e610fe438c92cc14e4317259c7f5f2b24295970 100644 (file)
@@ -78,9 +78,9 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form {
     else {
       $this->_gName = $this->get('gName');
     }
-    $this->_gLabel = ucwords(str_replace('_', ' ', $this->_gName));
+    $this->_gLabel = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->_gid, 'title');
     $url          = "civicrm/admin/options/{$this->_gName}";
-    $params       = "group={$this->_gName}&reset=1";
+    $params       = "reset=1";
 
     if (($this->_action & CRM_Core_Action::DELETE) &&
       in_array($this->_gName, array('email_greeting', 'postal_greeting', 'addressee'))
index 4471d763eb897444467fb2745c95283904710692..27c9d767c5d9969ec17a3da44afa93efc98a13f0 100644 (file)
@@ -958,7 +958,7 @@ CRM.validate = CRM.validate || {
 
       .on('click', 'a.crm-edit-optionvalue-link', function() {
         var url = $(this).data('option-group-url');
-        CRM.loadForm(CRM.url(url, {reset: 1}))
+        CRM.loadForm(CRM.url(url, {reset: 1}), {openInline: 'a:not("[href=#], .no-popup")'})
           .on('dialogclose', function() {
             var $elects = $('select[data-option-group-url="' + url + '"]');
             CRM.api3($elects.data('api-entity'), 'getoptions', {sequential: 1, field: $elects.data('api-field')})