<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
/**
* global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields the input form values
+ * @param array $files the uploaded files if any
+ * @param $self
+ *
+ * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
CRM_Core_Session::setStatus(ts('Your custom field set \'%1 \' has been saved.', array(1 => $group->title)), ts('Saved'), 'success');
}
else {
- $url = CRM_Utils_System::url('civicrm/admin/custom/group/field/add', 'reset=1&action=add&gid=' . $group->id);
+ // Jump directly to adding a field if popups are disabled
+ $action = CRM_Core_Resources::singleton()->ajaxPopupsEnabled ? '' : '/add';
+ $url = CRM_Utils_System::url("civicrm/admin/custom/group/field$action", 'reset=1&new=1&gid=' . $group->id . '&action=' . ($action ? 'add' : 'browse'));
CRM_Core_Session::setStatus(ts("Your custom field set '%1' has been added. You can add custom fields now.",
array(1 => $group->title)
), ts('Saved'), 'success');
* @static
* return array array of relationship name.
*/
+ /**
+ * @param $list
+ *
+ * @return array
+ */
static function getFormattedList(&$list) {
$relName = array();