+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| 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-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Activity_Form_Task_FileOnCase extends CRM_Activity_Form_Task {
/**
- * The title of the group
+ * The title of the group.
*
* @var string
*/
protected $_title;
/**
- * Variable to store redirect path
- *
+ * Variable to store redirect path.
*/
protected $_userContext;
/**
- * Variable to store contact Ids
- *
+ * Variable to store contact Ids.
*/
public $_contacts;
/**
- * Build all the data structures needed to build the form
+ * Build all the data structures needed to build the form.
*
* @return void
*/
}
/**
- * Build the form object
+ * Build the form object.
*
*
* @return void
*/
public function buildQuickForm() {
$this->add('text', 'unclosed_case_id', ts('Select Case'), array('class' => 'huge'), TRUE);
- $this->addDefaultButtons(ts('Continue >>'));
+ $this->addDefaultButtons(ts('Save'));
}
/**
- * Add local and global form rules
+ * Add local and global form rules.
*
*
* @return void
*/
- public function addRules() {}
+ public function addRules() {
+ }
/**
- * Process the form after the input has been submitted and validated
+ * Process the form after the input has been submitted and validated.
*
*
* @return void
*/
-
public function postProcess() {
- $formparams = $this->exportValues();
- $caseId = $formparams['unclosed_case_id'];
+ $formparams = $this->exportValues();
+ $caseId = $formparams['unclosed_case_id'];
$filedActivities = 0;
foreach ($this->_activityHolderIds as $key => $id) {
$targetContactValues = $defaults = array();
}
else {
CRM_Core_Session::setStatus(ts('Not permitted to file activity %1 %2.', array(
- 1 => empty($defaults['subject']) ? '' : $defaults['subject'],
- 2 => $defaults['activity_date_time'])),
+ 1 => empty($defaults['subject']) ? '' : $defaults['subject'],
+ 2 => $defaults['activity_date_time'],
+ )),
ts("Error"), "error");
}
}
CRM_Core_Session::setStatus($filedActivities, ts("Filed Activities"), "success");
CRM_Core_Session::setStatus("", ts('Total Selected Activities: %1', array(1 => count($this->_activityHolderIds))), "info");
}
+
}