+++ /dev/null
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
- | |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
- +--------------------------------------------------------------------+
-*/
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
- * $Id$
- *
- */
-
-/**
- * This class generates form components for Option Value
- *
- */
-class CRM_Admin_Form_OptionValue extends CRM_Admin_Form {
- protected $_gid = NULL;
-
- /**
- * The option group name
- *
- * @var string
- * @static
- */
- protected $_gName = NULL;
-
- /**
- * Function to for pre-processing
- *
- * @return void
- * @access public
- */
- public function preProcess() {
- parent::preProcess();
- $this->_gid = CRM_Utils_Request::retrieve('gid', 'Positive',
- $this, FALSE, 0
- );
- //get optionGroup name in case of email/postal greeting or addressee, CRM-4575
- if (!empty($this->_gid)) {
- $this->_gName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->_gid, 'name');
- }
- $session = CRM_Core_Session::singleton();
- $url = CRM_Utils_System::url('civicrm/admin/optionValue', 'reset=1&action=browse&gid=' . $this->_gid);
- $session->replaceUserContext($url);
-
- $this->assign('id', $this->_id);
-
- if ($this->_id && in_array($this->_gName, CRM_Core_OptionGroup::$_domainIDGroups)) {
- $domainID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $this->_id, 'domain_id', 'id');
- if (CRM_Core_Config::domainID() != $domainID) {
- CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
- }
- }
- }
-
- /**
- * This function sets the default values for the form.
- * the default values are retrieved from the database
- *
- * @access public
- *
- * @return void
- */
- function setDefaultValues() {
- $defaults = array();
- $defaults = parent::setDefaultValues();
- if (empty($defaults['weight'])) {
- $query = "SELECT max( `weight` ) as weight FROM `civicrm_option_value` where option_group_id=" . $this->_gid;
- $dao = new CRM_Core_DAO();
- $dao->query($query);
- $dao->fetch();
- $defaults['weight'] = ($dao->weight + 1);
- }
-
- // CRM-11516
- if ($this->_gName == 'payment_instrument' && $this->_id) {
- $defaults['financial_account_id'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($this->_id, 'civicrm_option_value', 'financial_account_id');
- }
- //setDefault of contact types for email greeting, postal greeting, addressee, CRM-4575
- if (in_array($this->_gName, array(
- 'email_greeting', 'postal_greeting', 'addressee'))) {
- $defaults['contactOptions'] = CRM_Utils_Array::value('filter', $defaults);
- }
- return $defaults;
- }
-
- /**
- * Function to build the form
- *
- * @return void
- * @access public
- */
- public function buildQuickForm() {
- //CRM-4575
- $isReserved = FALSE;
- if ($this->_id) {
- $isReserved = (bool) CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $this->_id, 'is_reserved');
- }
- parent::buildQuickForm();
- if ($this->_action & CRM_Core_Action::DELETE) {
- return;
- }
-
- $this->applyFilter('__ALL__', 'trim');
- $this->add('text', 'label', ts('Title'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'label'), TRUE);
- $this->add('text', 'value', ts('Value'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'value'), TRUE);
- $this->add('text', 'name', ts('Name'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'name'));
- if ($this->_gName == 'custom_search') {
- $this->add('text',
- 'description',
- ts('Description'),
- CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'description')
- );
- }
- else {
- $this->addWysiwyg('description',
- ts('Description'),
- CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'description')
- );
- }
-
- if ($this->_gName == 'case_status') {
- $grouping = $this->add('select', 'grouping', ts('Option Grouping Name'), array('Opened' => ts('Opened'),
- 'Closed' => ts('Closed'),
- ));
- if ($isReserved) {
- $grouping->freeze();
- }
- }
- else {
- $this->add('text', 'grouping', ts('Grouping'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'grouping'));
- }
-
- $this->add('text', 'weight', ts('Weight'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'weight'), TRUE);
- $this->add('checkbox', 'is_active', ts('Enabled?'));
- $this->add('checkbox', 'is_default', ts('Default Option?'));
- $this->add('checkbox', 'is_optgroup', ts('Is OptGroup?'));
-
- // CRM-11516
- if ($this->_gName == 'payment_instrument') {
- $accountType = CRM_Core_PseudoConstant::accountOptionValues('financial_account_type', NULL, " AND v.name = 'Asset' ");
- $financialAccount = CRM_Contribute_PseudoConstant::financialAccount(NULL, key($accountType));
-
- $this->add('select', 'financial_account_id', ts('Financial Account'),
- array('' => ts('- select -')) + $financialAccount
- );
- }
- // CRM-9953
- // we dont display this in the template, but the form sets the default values which are then saved
- // this allow us to retain the previous values
- $this->add('text', 'filter', ts('Filter'));
-
- if ($this->_action & CRM_Core_Action::UPDATE && $isReserved) {
- $this->freeze(array('name', 'description', 'is_active'));
- }
- //get contact type for which user want to create a new greeting/addressee type, CRM-4575
- if (in_array($this->_gName, array(
- 'email_greeting', 'postal_greeting', 'addressee')) && !$isReserved) {
- $values = array(1 => ts('Individual'),
- 2 => ts('Household'),
- 3 => ts('Organization'),
- 4 => ts('Multiple Contact Merge'),
- );
-
- $this->add('select', 'contactOptions', ts('Contact Type'), array('' => '-select-') + $values, TRUE);
- }
-
- $this->add('hidden', 'gid', $this->_gid);
- $this->addFormRule(array('CRM_Admin_Form_OptionValue', 'formRule'), $this);
- $this->addButtons(
- array(
- array(
- 'type' => 'next',
- 'name' => ts('Save'),
- 'isDefault' => TRUE,
- ),
- array(
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ),
- )
- );
- }
-
- function cancelAction() {
- parent::cancelAction();
-
- $gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE, 0);
- $cancelURL = CRM_Utils_System::url('civicrm/admin/optionValue', "gid={$gid}&reset=1");
-
- $session = CRM_Core_Session::singleton();
- $session->pushUserContext($cancelURL);
- }
-
- /**
- * global form rule
- *
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $self this object.
- *
- * @return true if no errors, else an array of errors
- * @access public
- * @static
- */
- static function formRule($fields, $files, $self) {
- $errors = array();
-
- //don't allow duplicate value within group.
- $optionValues = array();
- CRM_Core_OptionValue::getValues(array('id' => $self->_gid), $optionValues);
- foreach ($optionValues as $values) {
- if ($values['id'] != $self->_id) {
- if ($fields['value'] == $values['value']) {
- $errors['value'] = ts('Value already exist in database.');
- break;
- }
- }
- }
-
- return empty($errors) ? TRUE : $errors;
- }
-
- /**
- * Function to process the form
- *
- * @access public
- *
- * @return void
- */
- public function postProcess() {
- CRM_Utils_System::flushCache();
-
- $params = $this->exportValues();
- if ($this->_action & CRM_Core_Action::DELETE) {
- CRM_Core_BAO_OptionValue::del($this->_id);
- CRM_Core_Session::setStatus(ts('Selected option value has been deleted.'), ts('Record Deleted'), 'success');
- }
- else {
-
- $params = $ids = array();
- // store the submitted values in an array
- $params = $this->exportValues();
- $params['option_group_id'] = $this->_gid;
-
- if ($this->_action & CRM_Core_Action::UPDATE) {
- $ids['optionValue'] = $this->_id;
- }
-
- //set defaultGreeting option in params to save default value as per contactOption-defaultValue mapping
- if (!empty($params['contactOptions'])) {
- $params['filter'] = CRM_Utils_Array::value('contactOptions', $params);
- $params['defaultGreeting'] = 1;
- }
-
- $optionValue = CRM_Core_BAO_OptionValue::add($params, $ids);
- // CRM-11516
- if (!empty($params['financial_account_id'])) {
- $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Asset Account is' "));
- $params = array(
- 'entity_table' => 'civicrm_option_value',
- 'entity_id' => $optionValue->id,
- 'account_relationship' => $relationTypeId,
- 'financial_account_id' => $params['financial_account_id']
- );
- CRM_Financial_BAO_FinancialTypeAccount::add($params);
- }
- CRM_Core_Session::setStatus(ts('The Option Value \'%1\' has been saved.', array(1 => $optionValue->label)), ts('Saved'), 'success');
- }
- }
-}
* @var array
* @static
*/
- protected $_GName;
+ protected $_gLabel;
/**
* Function to pre-process
else {
$this->_gName = $this->get('gName');
}
- $this->_GName = ucwords(str_replace('_', ' ', $this->_gName));
+ $this->_gLabel = ucwords(str_replace('_', ' ', $this->_gName));
$url = "civicrm/admin/options/{$this->_gName}";
$params = "group={$this->_gName}&reset=1";
$isInUse = CRM_Core_DAO::singleValueQuery($sql, $queryParam);
if ($isInUse) {
$scriptURL = "<a href='" . CRM_Utils_System::docURL2('Update Greetings and Address Data for Contacts', TRUE, NULL, NULL, NULL, "wiki") . "'>" . ts('Learn more about a script that can automatically update contact addressee and greeting options.') . "</a>";
- CRM_Core_Session::setStatus(ts('The selected %1 option has <strong>not been deleted</strong> because it is currently in use. Please update these contacts to use a different format before deleting this option. %2', array(1 => $this->_GName, 2 => $scriptURL)), ts('Sorry'), 'error');
+ CRM_Core_Session::setStatus(ts('The selected %1 option has <strong>not been deleted</strong> because it is currently in use. Please update these contacts to use a different format before deleting this option. %2', array(1 => $this->_gLabel, 2 => $scriptURL)), ts('Sorry'), 'error');
$redirect = CRM_Utils_System::url($url, $params);
CRM_Utils_System::redirect($redirect);
}
CRM_Core_BAO_Phone::setOptionToNull(CRM_Utils_Array::value('value', $this->_defaultValues));
}
- CRM_Core_Session::setStatus(ts('Selected %1 type has been deleted.', array(1 => $this->_GName)), ts('Record Deleted'), 'success');
+ CRM_Core_Session::setStatus(ts('Selected %1 type has been deleted.', array(1 => $this->_gLabel)), ts('Record Deleted'), 'success');
}
else {
- CRM_Core_Session::setStatus(ts('Selected %1 type has not been deleted.', array(1 => $this->_GName)), ts('Sorry'), 'error');
+ CRM_Core_Session::setStatus(ts('Selected %1 type has not been deleted.', array(1 => $this->_gLabel)), ts('Sorry'), 'error');
CRM_Utils_Weight::correctDuplicateWeights('CRM_Core_DAO_OptionValue', $fieldValues);
}
}
CRM_Financial_BAO_FinancialTypeAccount::add($params);
}
- CRM_Core_Session::setStatus(ts('The %1 \'%2\' has been saved.', array(1 => $this->_GName, 2 => $optionValue->label)), ts('Saved'), 'success');
+ CRM_Core_Session::setStatus(ts('The %1 \'%2\' has been saved.', array(1 => $this->_gLabel, 2 => $optionValue->label)), ts('Saved'), 'success');
}
}
}
+++ /dev/null
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
- | |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
- +--------------------------------------------------------------------+
-*/
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
- * $Id$
- *
- */
-
-/**
- * Page for displaying list of Option Groups
- */
-class CRM_Admin_Page_OptionGroup extends CRM_Core_Page_Basic {
-
- /**
- * The action links that we need to display for the browse screen
- *
- * @var array
- * @static
- */
- static $_links = NULL;
-
- /**
- * Get BAO Name
- *
- * @return string Classname of BAO.
- */
- function getBAOName() {
- return 'CRM_Core_BAO_OptionGroup';
- }
-
- /**
- * Get action Links
- *
- * @return array (reference) of action links
- */
- function &links() {
- if (!(self::$_links)) {
- self::$_links = array(
- CRM_Core_Action::BROWSE => array(
- 'name' => ts('Options'),
- 'url' => 'civicrm/admin/optionValue',
- 'qs' => 'reset=1&action=browse&gid=%%id%%',
- 'title' => ts('View and Edit Options'),
- ),
- CRM_Core_Action::UPDATE => array(
- 'name' => ts('Edit Group'),
- 'url' => 'civicrm/admin/optionGroup',
- 'qs' => 'action=update&id=%%id%%&reset=1',
- 'title' => ts('Edit Option'),
- ),
- CRM_Core_Action::DISABLE => array(
- 'name' => ts('Disable'),
- 'ref' => 'crm-enable-disable',
- 'title' => ts('Disable Option'),
- ),
- CRM_Core_Action::ENABLE => array(
- 'name' => ts('Enable'),
- 'ref' => 'crm-enable-disable',
- 'title' => ts('Enable Option'),
- ),
- CRM_Core_Action::DELETE => array(
- 'name' => ts('Delete'),
- 'url' => 'civicrm/admin/optionGroup',
- 'qs' => 'action=delete&id=%%id%%',
- 'title' => ts('Delete Option'),
- ),
- );
- }
- return self::$_links;
- }
-
- /**
- * Get name of edit form
- *
- * @return string Classname of edit form.
- */
- function editForm() {
- return 'CRM_Admin_Form_OptionGroup';
- }
-
- /**
- * Get edit form name
- *
- * @return string name of this page.
- */
- function editName() {
- return 'Options';
- }
-
- /**
- * Get user context.
- *
- * @return string user context.
- */
- function userContext($mode = NULL) {
- return 'civicrm/admin/optionGroup';
- }
-}
-
+++ /dev/null
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
- | |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
- +--------------------------------------------------------------------+
-*/
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
- * $Id$
- *
- */
-
-/**
- * Page for displaying list of Option Value
- */
-class CRM_Admin_Page_OptionValue extends CRM_Core_Page_Basic {
-
- /**
- * The action links that we need to display for the browse screen
- . *
- * @var array
- * @static
- */
- static $_links = NULL;
-
- protected $_gid = NULL;
-
- /**
- * The option group name
- *
- * @var string
- * @static
- */
- protected $_gName = NULL;
-
- /**
- * Get BAO Name
- *
- * @return string Classname of BAO.
- */
- function getBAOName() {
- return 'CRM_Core_BAO_OptionValue';
- }
-
- /**
- * Get action Links
- *
- * @return array (reference) of action links
- */
- function &links() {
- if (!(self::$_links)) {
- self::$_links = array(
- CRM_Core_Action::UPDATE => array(
- 'name' => ts('Edit'),
- 'url' => 'civicrm/admin/optionValue',
- 'qs' => 'action=update&id=%%id%%&gid=%%gid%%&reset=1',
- 'title' => ts('Edit Option Value'),
- ),
- CRM_Core_Action::DISABLE => array(
- 'name' => ts('Disable'),
- 'ref' => 'crm-enable-disable',
- 'title' => ts('Disable Option Value'),
- ),
- CRM_Core_Action::ENABLE => array(
- 'name' => ts('Enable'),
- 'ref' => 'crm-enable-disable',
- 'title' => ts('Enable Option Value'),
- ),
- CRM_Core_Action::DELETE => array(
- 'name' => ts('Delete'),
- 'url' => 'civicrm/admin/optionValue',
- 'qs' => 'action=delete&id=%%id%%&gid=%%gid%%',
- 'title' => ts('Delete Option Value'),
- ),
- );
- }
- return self::$_links;
- }
-
- /**
- * Run the page.
- *
- * This method is called after the page is created. It checks for the
- * type of action and executes that action.
- * Finally it calls the parent's run method.
- *
- * @return void
- * @access public
- *
- */
- function run() {
- $this->_gid = CRM_Utils_Request::retrieve('gid', 'Positive',
- $this, FALSE, 0
- );
- $this->assign('gid', $this->_gid);
-
- if ($this->_gid) {
- //get optionGroup name in case of email/postal greeting or addressee, CRM-4575
- $this->_gName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->_gid, 'name');
-
- $groupTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->_gid, 'title', 'id');
- // Some option groups do not have a title set
- if (!$groupTitle) {
- $groupTitle = $this->_gName;
- }
- CRM_Utils_System::setTitle(ts('%1 - Option Values', array(1 => $groupTitle)));
- }
- $breadCrumb = array(array('title' => ts('Option Groups'),
- 'url' => CRM_Utils_System::url('civicrm/admin/options',
- 'reset=1'
- ),
- ));
- CRM_Utils_System::appendBreadCrumb($breadCrumb);
-
- return parent::run();
- }
-
- /**
- * Browse all options value.
- *
- *
- * @return void
- * @access public
- * @static
- */
- function browse() {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
- $dao = new CRM_Core_DAO_OptionValue();
-
- $dao->option_group_id = $this->_gid;
-
- if (in_array($this->_gName, CRM_Core_OptionGroup::$_domainIDGroups)) {
- $dao->domain_id = CRM_Core_Config::domainID();
- }
-
- if ($this->_gName == 'encounter_medium') {
- $mediumIds = CRM_Case_BAO_Case::getUsedEncounterMediums();
- }
- elseif ($this->_gName == 'case_status') {
- $caseStatusIds = CRM_Case_BAO_Case::getUsedCaseStatuses();
- }
- elseif ($this->_gName == 'case_type') {
- $caseTypeIds = CRM_Case_BAO_Case::getUsedCaseType();
- }
-
- $dao->orderBy('name');
- $dao->find();
-
- $optionValue = array();
- while ($dao->fetch()) {
- $optionValue[$dao->id] = array();
- CRM_Core_DAO::storeValues($dao, $optionValue[$dao->id]);
- // form all action links
- $action = array_sum(array_keys($this->links()));
- if ($dao->is_default) {
- $optionValue[$dao->id]['default_value'] = '[x]';
- }
- //do not show default option for email/postal greeting and addressee, CRM-4575
- if (!in_array($this->_gName, array(
- 'email_greeting', 'postal_greeting', 'addressee'))) {
- $this->assign('showIsDefault', TRUE);
- }
- // update enable/disable links depending on if it is is_reserved or is_active
- if ($dao->is_reserved) {
- $action = CRM_Core_Action::UPDATE;
- }
- else {
- if ($dao->is_active) {
- $action -= CRM_Core_Action::ENABLE;
- }
- else {
- $action -= CRM_Core_Action::DISABLE;
- }
-
- if ((($this->_gName == 'encounter_medium') && in_array($dao->value, $mediumIds)) ||
- (($this->_gName == 'case_status') && in_array($dao->value, $caseStatusIds)) ||
- (($this->_gName == 'case_type') && in_array($dao->value, $caseTypeIds))
- ) {
- $action -= CRM_Core_Action::DELETE;
- }
- }
-
- $optionValue[$dao->id]['action'] = CRM_Core_Action::formLink(self::links(), $action,
- array('id' => $dao->id, 'gid' => $this->_gid),
- ts('more'),
- FALSE,
- 'optionValue.admin.actions',
- 'optionValue',
- $dao->id
- );
- }
-
- $this->assign('rows', $optionValue);
- }
-
- /**
- * Get name of edit form
- *
- * @return string Classname of edit form.
- */
- function editForm() {
- return 'CRM_Admin_Form_OptionValue';
- }
-
- /**
- * Get edit form name
- *
- * @return string name of this page.
- */
- function editName() {
- return 'Options Values';
- }
-
- /**
- * Get user context.
- *
- * @return string user context.
- */
- function userContext($mode = NULL) {
- return 'civicrm/admin/optionValue';
- }
-}
-
* @var array
* @static
*/
- static $_GName = NULL;
+ static $_gLabel = NULL;
/**
* The option group id
static $_gId = NULL;
/**
- * Obtains the group name from url and sets the title.
+ * Obtains the group name from url string or id from $_GET['gid'].
+ * Sets the title.
*
* @return void
* @access public
*
*/
function preProcess() {
- if (!self::$_gName) {
- self::$_gName = CRM_Utils_Request::retrieve('group', 'String', CRM_Core_DAO::$_nullObject, FALSE, NULL, 'GET');
+ if (!self::$_gName && !empty($this->urlPath[3])) {
+ self::$_gName = $this->urlPath[3];
}
- if (self::$_gName) {
- $this->set('gName', self::$_gName);
+ // If an id arg is passed instead of a group name in the path
+ elseif (!self::$_gName && !empty($_GET['gid'])) {
+ self::$_gId = $_GET['gid'];
+ self::$_gName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', self::$_gId, 'name');
+ $breadCrumb = array(
+ 'title' => ts('Option Groups'),
+ 'url' => CRM_Utils_System::url('civicrm/admin/options', 'reset=1'),
+ );
+ CRM_Utils_System::appendBreadCrumb(array($breadCrumb));
}
- else {
+ if (!self::$_gName) {
self::$_gName = $this->get('gName');
}
- if (self::$_gName) {
- self::$_gId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', self::$_gName, 'id', 'name');
+ // If we don't have a group we will browse all groups
+ if (!self::$_gName) {
+ return;
}
- else {
- CRM_Core_Error::fatal();
+ $this->set('gName', self::$_gName);
+ if (!self::$_gId) {
+ self::$_gId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', self::$_gName, 'id', 'name');
}
- self::$_GName = ucwords(str_replace('_', ' ', self::$_gName));
+ self::$_gLabel = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', self::$_gId, 'title');
+ if (!self::$_gLabel) {
+ self::$_gLabel = ts('Option');
+ }
$this->assign('gName', self::$_gName);
- $this->assign('GName', self::$_GName);
+ $this->assign('gLabel', self::$_gLabel);
if (self::$_gName == 'acl_role') {
CRM_Utils_System::setTitle(ts('Manage ACL Roles'));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
}
else {
- CRM_Utils_System::setTitle(ts("%1 Options", array(1 => self::$_GName)));
+ CRM_Utils_System::setTitle(ts("%1 Options", array(1 => self::$_gLabel)));
}
if (in_array(self::$_gName,
array(
* @return string Classname of BAO.
*/
function getBAOName() {
- return 'CRM_Core_BAO_OptionValue';
+ return self::$_gName ? 'CRM_Core_BAO_OptionValue' : 'CRM_Core_BAO_OptionGroup';
}
/**
self::$_links = array(
CRM_Core_Action::UPDATE => array(
'name' => ts('Edit'),
- 'url' => 'civicrm/admin/options/' . self::$_gName,
+ 'url' => 'civicrm/admin/options',
'qs' => 'group=' . self::$_gName . '&action=update&id=%%id%%&reset=1',
'title' => ts('Edit %1', array(1 => self::$_gName)),
),
),
CRM_Core_Action::DELETE => array(
'name' => ts('Delete'),
- 'url' => 'civicrm/admin/options/' . self::$_gName,
+ 'url' => 'civicrm/admin/options',
'qs' => 'group=' . self::$_gName . '&action=delete&id=%%id%%',
'title' => ts('Delete %1 Type', array(1 => self::$_gName)),
),
* @static
*/
function browse() {
-
+ if (!self::$_gName) {
+ return parent::browse();
+ }
+ CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$groupParams = array('name' => self::$_gName);
$optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight');
$gName = self::$_gName;
* @return string Classname of edit form.
*/
function editForm() {
- return 'CRM_Admin_Form_Options';
+ return self::$_gName ? 'CRM_Admin_Form_Options' : 'CRM_Admin_Form_OptionGroup';
}
/**
* @return string name of this page.
*/
function editName() {
- return self::$_GName;
+ return self::$_gLabel;
}
/**
* @return string user context.
*/
function userContext($mode = NULL) {
- return 'civicrm/admin/options/' . self::$_gName;
- }
-
- /**
- * function to get userContext params
- *
- * @param int $mode mode that we are in
- *
- * @return string
- * @access public
- */
- function userContextParams($mode = NULL) {
- return 'group=' . self::$_gName . '&reset=1&action=browse';
+ return 'civicrm/admin/options' . (self::$_gName ? '/' . self::$_gName : '');
}
}
$surveyInfo = CRM_Campaign_BAO_Petition::getSurveyInfo($params['sid']);
// create activity
- // activity status id (from /civicrm/admin/optionValue?reset=1&action=browse&gid=25)
// 1-Schedule, 2-Completed
$activityParams = array(
<path>civicrm/admin/options/campaign_type</path>
<title>Campaign Types</title>
<desc>categorize your campaigns using campaign types.</desc>
- <path_arguments>group=campaign_type</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>CiviCampaign</adminGroup>
<icon>admin/small/05.png</icon>
<path>civicrm/admin/options/campaign_status</path>
<title>Campaign Status</title>
<desc>Define statuses for campaign here.</desc>
- <path_arguments>group=campaign_status</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>CiviCampaign</adminGroup>
<icon>admin/small/05.png</icon>
<path>civicrm/admin/options/engagement_index</path>
<title>Engagement Index</title>
<desc>Engagement levels.</desc>
- <path_arguments>group=engagement_index</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>CiviCampaign</adminGroup>
<icon>admin/small/05.png</icon>
<path>civicrm/admin/options/case_type</path>
<title>Case Types</title>
<desc>List of types which can be assigned to Cases. (Enable the Cases tab from System Settings - Enable Components if you want to track cases.)</desc>
- <path_arguments>group=case_type</path_arguments>
<access_arguments>administer CiviCase</access_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>CiviCase</adminGroup>
<path>civicrm/admin/options/redaction_rule</path>
<title>Redaction Rules</title>
<desc>List of rules which can be applied to user input strings so that the redacted output can be recognized as repeated instances of the same string or can be identified as a "semantic type of the data element" within case data.</desc>
- <path_arguments>group=redaction_rule</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<access_arguments>administer CiviCase</access_arguments>
<adminGroup>CiviCase</adminGroup>
<path>civicrm/admin/options/case_status</path>
<title>Case Statuses</title>
<desc>List of statuses that can be assigned to a case.</desc>
- <path_arguments>group=case_status</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<access_arguments>administer CiviCase</access_arguments>
<adminGroup>CiviCase</adminGroup>
<path>civicrm/admin/options/encounter_medium</path>
<title>Encounter Mediums</title>
<desc>List of encounter mediums.</desc>
- <path_arguments>group=encounter_medium</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<access_arguments>administer CiviCase</access_arguments>
<adminGroup>CiviCase</adminGroup>
<title>Payment Instruments</title>
<page_callback>CRM_Admin_Page_Options</page_callback>
<desc>You may choose to record the payment instrument used for each contribution. Common payment methods are installed by default (e.g. Check, Cash, Credit Card...). If your site requires additional payment methods, add them here.</desc>
- <path_arguments>group=payment_instrument</path_arguments>
<adminGroup>CiviContribute</adminGroup>
<icon>admin/small/payment_instruments.png</icon>
<weight>380</weight>
<title>Accepted Credit Cards</title>
<page_callback>CRM_Admin_Page_Options</page_callback>
<desc>Credit card options that will be offered to contributors using your Online Contribution pages.</desc>
- <path_arguments>group=accept_creditcard</path_arguments>
<adminGroup>CiviContribute</adminGroup>
<icon>admin/small/accepted_creditcards.png</icon>
<weight>395</weight>
<title>Soft Credit Types</title>
<page_callback>CRM_Admin_Page_Options</page_callback>
<desc>Soft Credit Types that will be offered to contributors during soft credit contribution</desc>
- <path_arguments>group=soft_credit_type</path_arguments>
<adminGroup>CiviContribute</adminGroup>
<icon>admin/small/soft_credit_type.png</icon>
</item>
<page_type>1</page_type>
<component>CiviContribute</component>
</item>
-</menu>
\ No newline at end of file
+</menu>
$title = CRM_Utils_Array::value('title', $item);
if (strstr($item['page_callback'], '_Page')) {
$object = new $item['page_callback'] ($title, $mode );
- $object->urlPath = $_GET[$config->userFrameworkURLVar];
+ $object->urlPath = explode('/', $_GET[$config->userFrameworkURLVar]);
}
elseif (strstr($item['page_callback'], '_Controller')) {
$addSequence = 'false';
<path>civicrm/admin/options/activity_type</path>
<title>Activity Types</title>
<desc>CiviCRM has several built-in activity types (meetings, phone calls, emails sent). Track other types of interactions by creating custom activity types here.</desc>
- <path_arguments>group=activity_type</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Customize Data and Screens</adminGroup>
<icon>admin/small/05.png</icon>
<path>civicrm/admin/options/gender</path>
<title>Gender Options</title>
<desc>Options for assigning gender to individual contacts (e.g. Male, Female, Transgender).</desc>
- <path_arguments>group=gender</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Customize Data and Screens</adminGroup>
<icon>admin/small/01.png</icon>
<path>civicrm/admin/options/individual_prefix</path>
<title>Individual Prefixes (Ms, Mr...)</title>
<desc>Options for individual contact prefixes (e.g. Ms., Mr., Dr. etc.).</desc>
- <path_arguments>group=individual_prefix</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Customize Data and Screens</adminGroup>
<icon>admin/small/title.png</icon>
<path>civicrm/admin/options/individual_suffix</path>
<title>Individual Suffixes (Jr, Sr...)</title>
<desc>Options for individual contact suffixes (e.g. Jr., Sr. etc.).</desc>
- <path_arguments>group=individual_suffix</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Customize Data and Screens</adminGroup>
<icon>admin/small/10.png</icon>
<path>civicrm/admin/options/website_type</path>
<title>Website Types</title>
<desc>Options for assigning website types to contacts.</desc>
- <path_arguments>group=website_type</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Customize Data and Screens</adminGroup>
<weight>65</weight>
<path>civicrm/admin/options/instant_messenger_service</path>
<title>Instant Messenger Services</title>
<desc>List of IM services which can be used when recording screen-names for contacts.</desc>
- <path_arguments>group=instant_messenger_service</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Customize Data and Screens</adminGroup>
<icon>admin/small/07.png</icon>
<path>civicrm/admin/options/mobile_provider</path>
<title>Mobile Phone Providers</title>
<desc>List of mobile phone providers which can be assigned when recording contact phone numbers.</desc>
- <path_arguments>group=mobile_provider</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Customize Data and Screens</adminGroup>
<icon>admin/small/08.png</icon>
<title>Phone Type</title>
<desc>Options for assigning phone type to contacts (e.g Phone,
Mobile, Fax, Pager)</desc>
- <path_arguments>group=phone_type</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Customize Data and Screens</adminGroup>
<icon>tel.gif</icon>
<path>civicrm/admin/options/custom_search</path>
<title>Manage Custom Searches</title>
<desc>Developers and accidental techies with a bit of PHP and SQL knowledge can create new search forms to handle specific search and reporting needs which aren't covered by the built-in Advanced Search and Search Builder features.</desc>
- <path_arguments>group=custom_search</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Customize Data and Screens</adminGroup>
<icon>admin/small/template.png</icon>
<path>civicrm/admin/options/from_email_address</path>
<title>From Email Addresses</title>
<desc>List of Email Addresses which can be used when sending emails to contacts.</desc>
- <path_arguments>group=from_email_address</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Communications</adminGroup>
<icon>admin/small/title.png</icon>
<path>civicrm/admin/options/preferred_communication_method</path>
<title>Preferred Communication Methods</title>
<desc>One or more preferred methods of communication can be assigned to each contact. Customize the available options here.</desc>
- <path_arguments>group=preferred_communication_method</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Communications</adminGroup>
<icon>admin/small/communication.png</icon>
<path>civicrm/admin/options/communication_style</path>
<title>Communication Style Options</title>
<desc>Options for Communication Style selection.</desc>
- <path_arguments>group=communication_style</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Communications</adminGroup>
<icon>admin/small/01.png</icon>
<path>civicrm/admin/options/email_greeting</path>
<title>Email Greeting Formats</title>
<desc>Options for assigning email greetings to individual and household contacts.</desc>
- <path_arguments>group=email_greeting</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Communications</adminGroup>
<icon>admin/small/01.png</icon>
<path>civicrm/admin/options/postal_greeting</path>
<title>Postal Greeting Formats</title>
<desc>Options for assigning postal greetings to individual and household contacts.</desc>
- <path_arguments>group=postal_greeting</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Communications</adminGroup>
<icon>admin/small/01.png</icon>
<path>civicrm/admin/options/addressee</path>
<title>Addressee Formats</title>
<desc>Options for assigning addressee to individual, household and organization contacts.</desc>
- <path_arguments>group=addressee</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Communications</adminGroup>
<icon>admin/small/01.png</icon>
<path>civicrm/admin/options/languages</path>
<title>Preferred Languages</title>
<desc>Options for contact languages.</desc>
- <path_arguments>group=languages</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Localization</adminGroup>
<icon>admin/small/36.png</icon>
<path>civicrm/admin/options/safe_file_extension</path>
<title>Safe File Extension Options</title>
<desc>File Extensions that can be considered safe.</desc>
- <path_arguments>group=safe_file_extension</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>System Settings</adminGroup>
<icon>admin/small/01.png</icon>
<path>civicrm/admin/options</path>
<title>Option Groups</title>
<desc>Access all meta-data option groups.</desc>
- <page_callback>CRM_Admin_Page_OptionGroup</page_callback>
+ <page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>System Settings</adminGroup>
<icon>admin/small/01.png</icon>
<weight>105</weight>
<path>civicrm/admin/options/grant_type</path>
<title>Grant Types</title>
<desc>List of types which can be assigned to Grants. (Enable CiviGrant from Administer > Systme Settings > Enable Components if you want to track grants.)</desc>
- <path_arguments>group=grant_type</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>Option Lists</adminGroup>
<icon>admin/small/grant_type.png</icon>
<is_ssl>true</is_ssl>
<weight>9000</weight>
</item>
- <item>
- <path>civicrm/admin/optionValue</path>
- <title>Option Values</title>
- <page_callback>CRM_Admin_Page_OptionValue</page_callback>
- </item>
<item>
<path>civicrm/ajax/menujs</path>
<page_callback>CRM_Admin_Page_AJAX::getNavigationMenu</page_callback>
<item>
<path>civicrm/admin/options/acl_role</path>
<title>ACL Roles</title>
- <path_arguments>group=acl_role</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<access_arguments>administer CiviCRM,access CiviCRM</access_arguments>
</item>
<title>Event Types</title>
<page_callback>CRM_Admin_Page_Options</page_callback>
<desc>Use Event Types to categorize your events. Event feeds can be filtered by Event Type and participant searches can use Event Type as a criteria.</desc>
- <path_arguments>group=event_type</path_arguments>
<access_arguments>administer CiviCRM,access CiviEvent</access_arguments>
<adminGroup>CiviEvent</adminGroup>
<icon>admin/small/event_type.png</icon>
<title>Participant Role</title>
<page_callback>CRM_Admin_Page_Options</page_callback>
<desc>Define participant roles for events here (e.g. Attendee, Host, Speaker...). You can then assign roles and search for participants by role.</desc>
- <path_arguments>group=participant_role</path_arguments>
<access_arguments>administer CiviCRM,access CiviEvent</access_arguments>
<adminGroup>CiviEvent</adminGroup>
<icon>admin/small/parti_role.png</icon>
<path>civicrm/admin/options/participant_listing</path>
<title>Participant Listing Templates</title>
<desc>Template to control participant listing display.</desc>
- <path_arguments>group=participant_listing</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>CiviEvent</adminGroup>
<icon>admin/small/01.png</icon>
<weight>410</weight>
</item>
<item>
- <path>civicrm/admin/options/from_email</path>
+ <path>civicrm/admin/options/from_email_address/civimail</path>
<title>From Email Addresses</title>
<desc>List of Email Addresses which can be used when sending emails to contacts.</desc>
- <path_arguments>group=from_email_address</path_arguments>
<page_callback>CRM_Admin_Page_Options</page_callback>
<adminGroup>CiviMail</adminGroup>
<icon>admin/small/title.png</icon>
(@option_group_id_act, {localize}'{ts escape="sql"}Refund{/ts}'{/localize}, @option_group_id_act_val+2, 'Refund', NULL, 1, NULL, @option_group_id_act_wt+2, {localize}'{ts escape="sql"}Refund recorded for event or membership fee.{/ts}'{/localize}, 0, 1, 1, @contributeCompId, NULL),
(@option_group_id_act, {localize}'{ts escape="sql"}Change Registration{/ts}'{/localize}, @option_group_id_act_val+3, 'Change Registration', NULL, 1, NULL, @option_group_id_act_wt+3, {localize}'{ts escape="sql"}Changes to an existing event registration.{/ts}'{/localize}, 0, 1, 1, @eventCompId, NULL);
+-- CRM-13970
+UPDATE civicrm_navigation set url = 'civicrm/admin/options/from_email_address&reset=1' WHERE url LIKE 'civicrm/admin/options/from_email%';
+UPDATE civicrm_navigation set url = 'civicrm/admin/option_groups&reset=1' WHERE url LIKE 'civicrm/admin/options&%';
+UPDATE civicrm_navigation set url = CONCAT(SUBSTRING_INDEX(url, '&', 1), '&reset=1') WHERE url LIKE 'civicrm/admin/options/%';
+--------------------------------------------------------------------+
*}
{* this template is used for adding/editing options *}
-<h3>{if $action eq 1}{ts 1=$GName}New %1 Option{/ts}{elseif $action eq 8}{ts 1=$GName}Delete %1 Option{/ts}{else}{ts 1=$GName}Edit %1 Option{/ts}{/if}</h3>
+<h3>{if $action eq 1}{ts 1=$gLabel}New %1 Option{/ts}{elseif $action eq 8}{ts 1=$gLabel}Delete %1 Option{/ts}{else}{ts 1=$gLabel}Edit %1 Option{/ts}{/if}</h3>
<div class="crm-block crm-form-block crm-admin-options-form-block">
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
{if $action eq 8}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
- {ts 1=$GName}WARNING: Deleting this option will result in the loss of all %1 related records which use the option.{/ts} {ts}This may mean the loss of a substantial amount of data, and the action cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
+ {ts 1=$gLabel}WARNING: Deleting this option will result in the loss of all %1 related records which use the option.{/ts} {ts}This may mean the loss of a substantial amount of data, and the action cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
</div>
{else}
<table class="form-layout-compressed">
<tr id="optionGroup-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td class="crm-admin-optionGroup-title">{if $row.title}{$row.title}{else}( {ts}none{/ts} ){/if}</td>
<td class="crm-admin-optionGroup-name">{$row.name}</td>
- <td><a href="{crmURL p="civicrm/admin/optionValue" q="gid=`$row.id`&reset=1"}" title="{ts}View and Edit Options{/ts}">{ts}Options{/ts}</a></td>
+ <td><a href="{crmURL p="civicrm/admin/options" q="gid=`$row.id`&reset=1"}" title="{ts}View and Edit Options{/ts}">{ts}Options{/ts}</a></td>
</tr>
{/foreach}
</table>
+--------------------------------------------------------------------+
*}
-{if $action eq 1 or $action eq 2 or $action eq 8}
+{if empty($gName)}
+ {include file="CRM/Admin/Page/OptionGroup.tpl"}
+
+{elseif $action eq 1 or $action eq 2 or $action eq 8}
{include file="CRM/Admin/Form/Options.tpl"}
{else}
{elseif $gName eq 'from_email_address'}
{ts}By default, CiviCRM uses the primary email address of the logged in user as the FROM address when sending emails to contacts. However, you can use this page to define one or more general Email Addresses that can be selected as an alternative. EXAMPLE: <em>"Client Services" <clientservices@example.org></em>{/ts}
{else}
- {ts 1=$GName}The existing option choices for %1 group are listed below. You can add, edit or delete them from this screen.{/ts}
+ {ts 1=$gLabel}The existing option choices for %1 group are listed below. You can add, edit or delete them from this screen.{/ts}
{/if}
</div>
{if $rows}
{if $action ne 1 and $action ne 2}
<div class="action-link">
- <a href="{crmURL q="group="|cat:$gName|cat:"&action=add&reset=1"}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$GName}Add %1{/ts}</span></a>
+ <a href="{crmURL q="group="|cat:$gName|cat:"&action=add&reset=1"}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
</div>
{/if}
<div id={$gName}>
{if $action ne 1 and $action ne 2}
<div class="action-link">
- <a href="{crmURL q="group="|cat:$gName|cat:"&action=add&reset=1"}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$GName}Add %1{/ts}</span></a>
+ <a href="{crmURL q="group="|cat:$gName|cat:"&action=add&reset=1"}" class="button new-option"><span><div class="icon add-icon"></div>{ts 1=$gLabel}Add %1{/ts}</span></a>
</div>
{/if}
</div>
}
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/optionValue' q="gid="}{$result.id}"{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
<title>Auction Types</title>
<page_callback>CRM_Admin_Page_Options</page_callback>
<desc>Use Auction Types to categorize your auction items.</desc>
- <path_arguments>group=auction_type</path_arguments>
<access_arguments>administer CiviCRM,access CiviAuction</access_arguments>
<adminGroup>CiviAuction</adminGroup>
<icon>admin/small/auction_type.png</icon>