+--------------------------------------------------------------------+
| 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$
*
*/
protected $_reportTitle;
/* values
- *
- * @var array
- */
+ *
+ * @var array
+ */
public $_values;
const NUM_OPTION = 11;
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @param null
- *
* @return array
* array of default values
*/
}
/**
- * Build the form object
- *
- * @param null
+ * Build the form object.
*
* @return void
*/
}
/**
- * Global validation rules for the form
+ * Global validation rules for the form.
+ *
+ * @param $fields
+ * @param $files
+ * @param $form
+ *
+ * @return array|bool
*/
public static function formRule($fields, $files, $form) {
$errors = array();
}
/**
- * Process the form
- *
- * @param null
+ * Process the form.
*
* @return void
*/
if (!$this->_reportId && $survey->id && !empty($params['create_report'])) {
$activityStatus = CRM_Core_PseudoConstant::activityStatus('name');
$activityStatus = array_flip($activityStatus);
- $this->_params =
- array(
- 'name' => "survey_{$survey->id}",
- 'title' => $params['report_title'] ? $params['report_title'] : $this->_values['title'],
- 'status_id_op' => 'eq',
- 'status_id_value' => $activityStatus['Scheduled'], // reserved status
- 'survey_id_value' => array($survey->id),
- 'description' => ts('Detailed report for canvassing, phone-banking, walk lists or other surveys.'),
- );
+ $this->_params = array(
+ 'name' => "survey_{$survey->id}",
+ 'title' => $params['report_title'] ? $params['report_title'] : $this->_values['title'],
+ 'status_id_op' => 'eq',
+ 'status_id_value' => $activityStatus['Scheduled'], // reserved status
+ 'survey_id_value' => array($survey->id),
+ 'description' => ts('Detailed report for canvassing, phone-banking, walk lists or other surveys.'),
+ );
//Default value of order by
- $this->_params['order_bys'] =
- array(
- 1 => array(
- 'column' => 'sort_name',
- 'order' => 'ASC',
- ),
- );
+ $this->_params['order_bys'] = array(
+ 1 => array(
+ 'column' => 'sort_name',
+ 'order' => 'ASC',
+ ),
+ );
// for WalkList or default
$displayFields = array(
'id',
if (CRM_Core_OptionGroup::getValue('activity_type', 'WalkList') ==
$this->_values['activity_type_id']
) {
- $this->_params['order_bys'] =
- array(
- 1 => array(
- 'column' => 'street_name',
- 'order' => 'ASC',
- ),
- 2 => array(
- 'column' => 'street_number_odd_even',
- 'order' => 'ASC',
- ),
- 3 => array(
- 'column' => 'street_number',
- 'order' => 'ASC',
- ),
- 4 => array(
- 'column' => 'sort_name',
- 'order' => 'ASC',
- ),
- );
+ $this->_params['order_bys'] = array(
+ 1 => array(
+ 'column' => 'street_name',
+ 'order' => 'ASC',
+ ),
+ 2 => array(
+ 'column' => 'street_number_odd_even',
+ 'order' => 'ASC',
+ ),
+ 3 => array(
+ 'column' => 'street_number',
+ 'order' => 'ASC',
+ ),
+ 4 => array(
+ 'column' => 'sort_name',
+ 'order' => 'ASC',
+ ),
+ );
}
elseif (CRM_Core_OptionGroup::getValue('activity_type', 'PhoneBank') ==
$this->_values['activity_type_id']
parent::endPostProcess();
}
+
}