Commit 056e339d authored by jaapjansma's avatar jaapjansma
Browse files

Removed the title attribute from the outputs as those don't make sense.

parent 46f224b8
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
* Added filter for searching contacts with a certain tag. * Added filter for searching contacts with a certain tag.
* Added filter for searching contacts with a certain type. * Added filter for searching contacts with a certain type.
* Added filter to respect the ACL. So that a user only sees the contacts he is allowed to see. * Added filter to respect the ACL. So that a user only sees the contacts he is allowed to see.
* Removed the title attribute from the outputs as those don't make sense.
# Version 1.0.7 # Version 1.0.7
......
...@@ -34,18 +34,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface { ...@@ -34,18 +34,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface {
$field = $outputFieldHandler->getOutputFieldSpecification(); $field = $outputFieldHandler->getOutputFieldSpecification();
$fields[$field->alias] = $field->title; $fields[$field->alias] = $field->title;
} }
$form->add('text', 'title', E::ts('Title'),NULL, true);
// form elements for adding Dashlet
// $output['dashlet'] 1-> Yes 2->No
if(isset($output['dashlet']) && $output['dashlet']==1){
$form->add('text', 'dashlet_title', E::ts('Dashlet Title'), NULL, true);
$form->add('text', 'dashlet_name', E::ts('Dashlet Name (system name)'), NULL, true);
$form->add('select', 'dashlet_active', E::ts('Is Dashlet Active ?'), array(1=>'Yes', 0=> 'No'), true);
}
$form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array( $form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array(
'style' => 'min-width:250px', 'style' => 'min-width:250px',
'class' => 'crm-select2 huge', 'class' => 'crm-select2 huge',
...@@ -74,11 +62,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface { ...@@ -74,11 +62,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface {
if (isset($output['permission'])) { if (isset($output['permission'])) {
$defaults['permission'] = $output['permission']; $defaults['permission'] = $output['permission'];
} }
if (isset($output['dashlet_name'])) {
$defaults['dashlet_name'] = $output['dashlet_name'];
$defaults['dashlet_title'] = $output['dashlet_title'];
$defaults['dashlet_active'] = $output['dashlet_active'];
}
if (isset($output['configuration']) && is_array($output['configuration'])) { if (isset($output['configuration']) && is_array($output['configuration'])) {
if (isset($output['configuration']['contact_id_field'])) { if (isset($output['configuration']['contact_id_field'])) {
$defaults['contact_id_field'] = $output['configuration']['contact_id_field']; $defaults['contact_id_field'] = $output['configuration']['contact_id_field'];
...@@ -86,9 +69,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface { ...@@ -86,9 +69,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface {
if (isset($output['configuration']['navigation_id'])) { if (isset($output['configuration']['navigation_id'])) {
$defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']); $defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']);
} }
if (isset($output['configuration']['title'])) {
$defaults['title'] = $output['configuration']['title'];
}
if (isset($output['configuration']['hide_id_field'])) { if (isset($output['configuration']['hide_id_field'])) {
$defaults['hide_id_field'] = $output['configuration']['hide_id_field']; $defaults['hide_id_field'] = $output['configuration']['hide_id_field'];
} }
...@@ -100,9 +80,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface { ...@@ -100,9 +80,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface {
if (!isset($defaults['permission'])) { if (!isset($defaults['permission'])) {
$defaults['permission'] = 'access CiviCRM'; $defaults['permission'] = 'access CiviCRM';
} }
if (empty($defaults['title'])) {
$defaults['title'] = civicrm_api3('DataProcessor', 'getvalue', array('id' => $output['data_processor_id'], 'return' => 'title'));
}
$form->setDefaults($defaults); $form->setDefaults($defaults);
} }
...@@ -127,7 +104,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface { ...@@ -127,7 +104,6 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface {
*/ */
public function processConfiguration($submittedValues, &$output) { public function processConfiguration($submittedValues, &$output) {
$output['permission'] = $submittedValues['permission']; $output['permission'] = $submittedValues['permission'];
$configuration['title'] = $submittedValues['title'];
$configuration['contact_id_field'] = $submittedValues['contact_id_field']; $configuration['contact_id_field'] = $submittedValues['contact_id_field'];
$configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path']; $configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path'];
$configuration['hide_id_field'] = $submittedValues['hide_id_field']; $configuration['hide_id_field'] = $submittedValues['hide_id_field'];
...@@ -164,7 +140,7 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface { ...@@ -164,7 +140,7 @@ class CRM_Contact_DataProcessorContactSearch implements UIOutputInterface {
* @return string * @return string
*/ */
public function getTitleForUiLink($output, $dataProcessor) { public function getTitleForUiLink($output, $dataProcessor) {
return isset($output['configuration']['title']) ? $output['configuration']['title'] : $dataProcessor['title']; return $dataProcessor['title'];
} }
/** /**
......
...@@ -97,7 +97,6 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface { ...@@ -97,7 +97,6 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface {
public function buildConfigurationForm(\CRM_Core_Form $form, $output = []) { public function buildConfigurationForm(\CRM_Core_Form $form, $output = []) {
$fieldSelect = \CRM_Dataprocessor_Utils_DataSourceFields::getAvailableFilterFieldsInDataSources($output['data_processor_id']); $fieldSelect = \CRM_Dataprocessor_Utils_DataSourceFields::getAvailableFilterFieldsInDataSources($output['data_processor_id']);
$form->add('text', 'title', E::ts('Title'), true);
$form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array( $form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array(
'style' => 'min-width:250px', 'style' => 'min-width:250px',
'class' => 'crm-select2 huge', 'class' => 'crm-select2 huge',
...@@ -122,9 +121,6 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface { ...@@ -122,9 +121,6 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface {
$defaults['permission'] = $output['permission']; $defaults['permission'] = $output['permission'];
} }
if (isset($output['configuration']) && is_array($output['configuration'])) { if (isset($output['configuration']) && is_array($output['configuration'])) {
if (isset($output['configuration']['title'])) {
$defaults['title'] = $output['configuration']['title'];
}
if (isset($output['configuration']['help_text'])) { if (isset($output['configuration']['help_text'])) {
$defaults['help_text'] = $output['configuration']['help_text']; $defaults['help_text'] = $output['configuration']['help_text'];
} }
...@@ -145,9 +141,6 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface { ...@@ -145,9 +141,6 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface {
if (!isset($defaults['permission'])) { if (!isset($defaults['permission'])) {
$defaults['permission'] = 'access CiviCRM'; $defaults['permission'] = 'access CiviCRM';
} }
if (empty($defaults['title'])) {
$defaults['title'] = civicrm_api3('DataProcessor', 'getvalue', array('id' => $output['data_processor_id'], 'return' => 'title'));
}
if (!isset($defaults['no_result_text'])) { if (!isset($defaults['no_result_text'])) {
$defaults['no_result_text'] = E::ts('No records'); $defaults['no_result_text'] = E::ts('No records');
} }
...@@ -178,7 +171,6 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface { ...@@ -178,7 +171,6 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface {
*/ */
public function processConfiguration($submittedValues, &$output) { public function processConfiguration($submittedValues, &$output) {
$output['permission'] = $submittedValues['permission']; $output['permission'] = $submittedValues['permission'];
$configuration['title'] = $submittedValues['title'];
$configuration['contact_id_field'] = $submittedValues['contact_id_field']; $configuration['contact_id_field'] = $submittedValues['contact_id_field'];
$configuration['help_text'] = $submittedValues['help_text']; $configuration['help_text'] = $submittedValues['help_text'];
$configuration['no_result_text'] = $submittedValues['no_result_text']; $configuration['no_result_text'] = $submittedValues['no_result_text'];
...@@ -217,7 +209,7 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface { ...@@ -217,7 +209,7 @@ class CRM_Contact_DataProcessorContactSummaryTab implements UIOutputInterface {
* @return string * @return string
*/ */
public function getTitleForUiLink($output, $dataProcessor) { public function getTitleForUiLink($output, $dataProcessor) {
return isset($output['configuration']['title']) ? $output['configuration']['title'] : $dataProcessor['title']; return $dataProcessor['title'];
} }
/** /**
......
...@@ -43,9 +43,6 @@ class CRM_Dataprocessor_Form_Output extends CRM_Core_Form { ...@@ -43,9 +43,6 @@ class CRM_Dataprocessor_Form_Output extends CRM_Core_Form {
$this->id = CRM_Utils_Request::retrieve('id', 'Integer'); $this->id = CRM_Utils_Request::retrieve('id', 'Integer');
$this->assign('id', $this->id); $this->assign('id', $this->id);
$dashlet = CRM_Utils_Request::retrieve('dashlet', 'Integer');
// dashlet 1->Yes 2->No
if ($this->id) { if ($this->id) {
$this->output = civicrm_api3('DataProcessorOutput', 'getsingle', array('id' => $this->id)); $this->output = civicrm_api3('DataProcessorOutput', 'getsingle', array('id' => $this->id));
$this->assign('output', $this->output); $this->assign('output', $this->output);
...@@ -62,10 +59,6 @@ class CRM_Dataprocessor_Form_Output extends CRM_Core_Form { ...@@ -62,10 +59,6 @@ class CRM_Dataprocessor_Form_Output extends CRM_Core_Form {
if (!$this->output) { if (!$this->output) {
$this->output['data_processor_id'] = $this->dataProcessorId; $this->output['data_processor_id'] = $this->dataProcessorId;
} }
if($dashlet){
$this->dashlet = $dashlet;
$this->output['dashlet'] = $this->dashlet;
}
$title = E::ts('Data Processor Output'); $title = E::ts('Data Processor Output');
CRM_Utils_System::setTitle($title); CRM_Utils_System::setTitle($title);
......
...@@ -25,7 +25,6 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp ...@@ -25,7 +25,6 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp
* @param array $output * @param array $output
*/ */
public function buildConfigurationForm(\CRM_Core_Form $form, $output = []) { public function buildConfigurationForm(\CRM_Core_Form $form, $output = []) {
$form->add('text', 'title', E::ts('Title'), true);
$form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array( $form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array(
'style' => 'min-width:250px', 'style' => 'min-width:250px',
'class' => 'crm-select2 huge', 'class' => 'crm-select2 huge',
...@@ -40,9 +39,6 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp ...@@ -40,9 +39,6 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp
$defaults['permission'] = $output['permission']; $defaults['permission'] = $output['permission'];
} }
if (isset($output['configuration']) && is_array($output['configuration'])) { if (isset($output['configuration']) && is_array($output['configuration'])) {
if (isset($output['configuration']['title'])) {
$defaults['title'] = $output['configuration']['title'];
}
if (isset($output['configuration']['default_limit'])) { if (isset($output['configuration']['default_limit'])) {
$defaults['default_limit'] = $output['configuration']['default_limit']; $defaults['default_limit'] = $output['configuration']['default_limit'];
} }
...@@ -54,9 +50,6 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp ...@@ -54,9 +50,6 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp
if (!isset($defaults['permission'])) { if (!isset($defaults['permission'])) {
$defaults['permission'] = 'access CiviCRM'; $defaults['permission'] = 'access CiviCRM';
} }
if (empty($defaults['title'])) {
$defaults['title'] = civicrm_api3('DataProcessor', 'getvalue', array('id' => $output['data_processor_id'], 'return' => 'title'));
}
if (empty($defaults['default_limit'])) { if (empty($defaults['default_limit'])) {
$defaults['default_limit'] = 10; $defaults['default_limit'] = 10;
} }
...@@ -90,7 +83,7 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp ...@@ -90,7 +83,7 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp
$dashletParams['url'] = $dashletUrl; $dashletParams['url'] = $dashletUrl;
$dashletParams['fullscreen_url'] = $fullScreenUrl; $dashletParams['fullscreen_url'] = $fullScreenUrl;
$dashletParams['name'] = $dashletName; $dashletParams['name'] = $dashletName;
$dashletParams['label'] = $submittedValues['title']; $dashletParams['label'] = $dataProcessor['title'];
$dashletParams['permission'] = $submittedValues['permission']; $dashletParams['permission'] = $submittedValues['permission'];
$dashletParams['is_active'] = 1; $dashletParams['is_active'] = 1;
$dashletParams['cache_minutes'] = 60; $dashletParams['cache_minutes'] = 60;
...@@ -107,7 +100,6 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp ...@@ -107,7 +100,6 @@ class CRM_DataprocessorDashlet_Dashlet implements Civi\DataProcessor\Output\Outp
civicrm_api3('Dashboard', 'create', $dashletParams); civicrm_api3('Dashboard', 'create', $dashletParams);
$output['permission'] = $submittedValues['permission']; $output['permission'] = $submittedValues['permission'];
$configuration['title'] = $submittedValues['title'];
$configuration['default_limit'] = $submittedValues['default_limit']; $configuration['default_limit'] = $submittedValues['default_limit'];
$configuration['help_text'] = $submittedValues['help_text']; $configuration['help_text'] = $submittedValues['help_text'];
return $configuration; return $configuration;
......
...@@ -36,8 +36,6 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface { ...@@ -36,8 +36,6 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface {
$fields[$field->alias] = $field->title; $fields[$field->alias] = $field->title;
} }
$form->add('text', 'title', E::ts('Title'), true);
$form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array( $form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array(
'style' => 'min-width:250px', 'style' => 'min-width:250px',
'class' => 'crm-select2 huge', 'class' => 'crm-select2 huge',
...@@ -72,9 +70,6 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface { ...@@ -72,9 +70,6 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface {
if (isset($output['configuration']['navigation_id'])) { if (isset($output['configuration']['navigation_id'])) {
$defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']); $defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']);
} }
if (isset($output['configuration']['title'])) {
$defaults['title'] = $output['configuration']['title'];
}
if (isset($output['configuration']['hide_id_field'])) { if (isset($output['configuration']['hide_id_field'])) {
$defaults['hide_id_field'] = $output['configuration']['hide_id_field']; $defaults['hide_id_field'] = $output['configuration']['hide_id_field'];
} }
...@@ -86,9 +81,6 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface { ...@@ -86,9 +81,6 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface {
if (!isset($defaults['permission'])) { if (!isset($defaults['permission'])) {
$defaults['permission'] = 'access CiviCRM'; $defaults['permission'] = 'access CiviCRM';
} }
if (empty($defaults['title'])) {
$defaults['title'] = civicrm_api3('DataProcessor', 'getvalue', array('id' => $output['data_processor_id'], 'return' => 'title'));
}
$form->setDefaults($defaults); $form->setDefaults($defaults);
} }
...@@ -112,7 +104,6 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface { ...@@ -112,7 +104,6 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface {
*/ */
public function processConfiguration($submittedValues, &$output) { public function processConfiguration($submittedValues, &$output) {
$output['permission'] = $submittedValues['permission']; $output['permission'] = $submittedValues['permission'];
$configuration['title'] = $submittedValues['title'];
$configuration['activity_id_field'] = $submittedValues['activity_id_field']; $configuration['activity_id_field'] = $submittedValues['activity_id_field'];
$configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path']; $configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path'];
$configuration['hide_id_field'] = $submittedValues['hide_id_field']; $configuration['hide_id_field'] = $submittedValues['hide_id_field'];
...@@ -149,7 +140,7 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface { ...@@ -149,7 +140,7 @@ class CRM_DataprocessorSearch_ActivitySearch implements UIOutputInterface {
* @return string * @return string
*/ */
public function getTitleForUiLink($output, $dataProcessor) { public function getTitleForUiLink($output, $dataProcessor) {
return isset($output['configuration']['title']) ? $output['configuration']['title'] : $dataProcessor['title']; return $dataProcessor['title'];
} }
/** /**
......
...@@ -36,8 +36,6 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface { ...@@ -36,8 +36,6 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface {
$fields[$field->alias] = $field->title; $fields[$field->alias] = $field->title;
} }
$form->add('text', 'title', E::ts('Title'), true);
$form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array( $form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array(
'style' => 'min-width:250px', 'style' => 'min-width:250px',
'class' => 'crm-select2 huge', 'class' => 'crm-select2 huge',
...@@ -80,9 +78,6 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface { ...@@ -80,9 +78,6 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface {
if (isset($output['configuration']['navigation_id'])) { if (isset($output['configuration']['navigation_id'])) {
$defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']); $defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']);
} }
if (isset($output['configuration']['title'])) {
$defaults['title'] = $output['configuration']['title'];
}
if (isset($output['configuration']['hide_id_fields'])) { if (isset($output['configuration']['hide_id_fields'])) {
$defaults['hide_id_fields'] = $output['configuration']['hide_id_fields']; $defaults['hide_id_fields'] = $output['configuration']['hide_id_fields'];
} }
...@@ -94,9 +89,6 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface { ...@@ -94,9 +89,6 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface {
if (!isset($defaults['permission'])) { if (!isset($defaults['permission'])) {
$defaults['permission'] = 'access CiviCRM'; $defaults['permission'] = 'access CiviCRM';
} }
if (empty($defaults['title'])) {
$defaults['title'] = civicrm_api3('DataProcessor', 'getvalue', array('id' => $output['data_processor_id'], 'return' => 'title'));
}
$form->setDefaults($defaults); $form->setDefaults($defaults);
} }
...@@ -120,7 +112,6 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface { ...@@ -120,7 +112,6 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface {
*/ */
public function processConfiguration($submittedValues, &$output) { public function processConfiguration($submittedValues, &$output) {
$output['permission'] = $submittedValues['permission']; $output['permission'] = $submittedValues['permission'];
$configuration['title'] = $submittedValues['title'];
$configuration['contact_id_field'] = $submittedValues['contact_id_field']; $configuration['contact_id_field'] = $submittedValues['contact_id_field'];
$configuration['case_id_field'] = $submittedValues['case_id_field']; $configuration['case_id_field'] = $submittedValues['case_id_field'];
$configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path']; $configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path'];
...@@ -158,7 +149,7 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface { ...@@ -158,7 +149,7 @@ class CRM_DataprocessorSearch_CaseSearch implements UIOutputInterface {
* @return string * @return string
*/ */
public function getTitleForUiLink($output, $dataProcessor) { public function getTitleForUiLink($output, $dataProcessor) {
return isset($output['configuration']['title']) ? $output['configuration']['title'] : $dataProcessor['title']; return $dataProcessor['title'];
} }
/** /**
......
...@@ -463,7 +463,7 @@ abstract class CRM_DataprocessorSearch_Form_AbstractSearch extends CRM_Dataproce ...@@ -463,7 +463,7 @@ abstract class CRM_DataprocessorSearch_Form_AbstractSearch extends CRM_Dataproce
*/ */
public function getTitle() { public function getTitle() {
$this->loadDataProcessor(); $this->loadDataProcessor();
return $this->dataProcessorOutput['configuration']['title']; return $this->dataProcessor['title'];
} }
/** /**
......
...@@ -37,8 +37,6 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface { ...@@ -37,8 +37,6 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface {
$fields[$field->alias] = $field->title; $fields[$field->alias] = $field->title;
} }
$form->add('text', 'title', E::ts('Title'), NULL,true);
$form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array( $form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array(
'style' => 'min-width:250px', 'style' => 'min-width:250px',
'class' => 'crm-select2 huge', 'class' => 'crm-select2 huge',
...@@ -73,9 +71,6 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface { ...@@ -73,9 +71,6 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface {
if (isset($output['configuration']['navigation_id'])) { if (isset($output['configuration']['navigation_id'])) {
$defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']); $defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']);
} }
if (isset($output['configuration']['title'])) {
$defaults['title'] = $output['configuration']['title'];
}
if (isset($output['configuration']['hide_id_field'])) { if (isset($output['configuration']['hide_id_field'])) {
$defaults['hide_id_field'] = $output['configuration']['hide_id_field']; $defaults['hide_id_field'] = $output['configuration']['hide_id_field'];
} }
...@@ -87,9 +82,6 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface { ...@@ -87,9 +82,6 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface {
if (!isset($defaults['permission'])) { if (!isset($defaults['permission'])) {
$defaults['permission'] = 'access CiviCRM'; $defaults['permission'] = 'access CiviCRM';
} }
if (empty($defaults['title'])) {
$defaults['title'] = civicrm_api3('DataProcessor', 'getvalue', array('id' => $output['data_processor_id'], 'return' => 'title'));
}
$form->setDefaults($defaults); $form->setDefaults($defaults);
} }
...@@ -113,7 +105,6 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface { ...@@ -113,7 +105,6 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface {
*/ */
public function processConfiguration($submittedValues, &$output) { public function processConfiguration($submittedValues, &$output) {
$output['permission'] = $submittedValues['permission']; $output['permission'] = $submittedValues['permission'];
$configuration['title'] = $submittedValues['title'];
$configuration['participant_id_field'] = $submittedValues['participant_id_field']; $configuration['participant_id_field'] = $submittedValues['participant_id_field'];
$configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path']; $configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path'];
$configuration['hide_id_field'] = $submittedValues['hide_id_field']; $configuration['hide_id_field'] = $submittedValues['hide_id_field'];
...@@ -150,7 +141,7 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface { ...@@ -150,7 +141,7 @@ class CRM_DataprocessorSearch_ParticipantSearch implements UIOutputInterface {
* @return string * @return string
*/ */
public function getTitleForUiLink($output, $dataProcessor) { public function getTitleForUiLink($output, $dataProcessor) {
return isset($output['configuration']['title']) ? $output['configuration']['title'] : $dataProcessor['title']; return $dataProcessor['title'];
} }
/** /**
......
...@@ -37,8 +37,6 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface { ...@@ -37,8 +37,6 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface {
$fields[$field->alias] = $field->title; $fields[$field->alias] = $field->title;
} }
$form->add('text', 'title', E::ts('Title'), true);
$form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array( $form->add('select','permission', E::ts('Permission'), \CRM_Core_Permission::basicPermissions(), true, array(
'style' => 'min-width:250px', 'style' => 'min-width:250px',
'class' => 'crm-select2 huge', 'class' => 'crm-select2 huge',
...@@ -73,9 +71,6 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface { ...@@ -73,9 +71,6 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface {
if (isset($output['configuration']['navigation_id'])) { if (isset($output['configuration']['navigation_id'])) {
$defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']); $defaults['navigation_parent_path'] = $navigation->getNavigationParentPathById($output['configuration']['navigation_id']);
} }
if (isset($output['configuration']['title'])) {
$defaults['title'] = $output['configuration']['title'];
}
if (isset($output['configuration']['hide_id_field'])) { if (isset($output['configuration']['hide_id_field'])) {
$defaults['hide_id_field'] = $output['configuration']['hide_id_field']; $defaults['hide_id_field'] = $output['configuration']['hide_id_field'];
} }
...@@ -87,9 +82,6 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface { ...@@ -87,9 +82,6 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface {
if (!isset($defaults['permission'])) { if (!isset($defaults['permission'])) {
$defaults['permission'] = 'access CiviCRM'; $defaults['permission'] = 'access CiviCRM';
} }
if (empty($defaults['title'])) {
$defaults['title'] = civicrm_api3('DataProcessor', 'getvalue', array('id' => $output['data_processor_id'], 'return' => 'title'));
}
$form->setDefaults($defaults); $form->setDefaults($defaults);
} }
...@@ -113,7 +105,6 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface { ...@@ -113,7 +105,6 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface {
*/ */
public function processConfiguration($submittedValues, &$output) { public function processConfiguration($submittedValues, &$output) {
$output['permission'] = $submittedValues['permission']; $output['permission'] = $submittedValues['permission'];
$configuration['title'] = $submittedValues['title'];
$configuration['id_field'] = $submittedValues['id_field']; $configuration['id_field'] = $submittedValues['id_field'];
$configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path']; $configuration['navigation_parent_path'] = $submittedValues['navigation_parent_path'];
$configuration['hide_id_field'] = $submittedValues['hide_id_field']; $configuration['hide_id_field'] = $submittedValues['hide_id_field'];
...@@ -150,7 +141,7 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface { ...@@ -150,7 +141,7 @@ class CRM_DataprocessorSearch_Search implements UIOutputInterface {
* @return string * @return string
*/ */
public function getTitleForUiLink($output, $dataProcessor) { public function getTitleForUiLink($output, $dataProcessor) {
return isset($output['configuration']['title']) ? $output['configuration']['title'] : $dataProcessor['title']; return $dataProcessor['title'];
} }
/** /**
......
...@@ -121,7 +121,7 @@ class Factory { ...@@ -121,7 +121,7 @@ class Factory {
$this->addOutput('api', 'Civi\DataProcessor\Output\Api', E::ts('API')); $this->addOutput('api', 'Civi\DataProcessor\Output\Api', E::ts('API'));
$this->addOutput('contact_summary_tab', 'CRM_Contact_DataProcessorContactSummaryTab', E::ts('Tab on contact summary')); $this->addOutput('contact_summary_tab', 'CRM_Contact_DataProcessorContactSummaryTab', E::ts('Tab on contact summary'));
$this->addOutput('dashlet', 'CRM_DataprocessorDashlet_Dashlet', E::ts('Dashlet')); $this->addOutput('dashlet', 'CRM_DataprocessorDashlet_Dashlet', E::ts('Dashlet'));
$this->addOutput('search', 'CRM_DataprocessorSearch_Search', E::ts('Search')); $this->addOutput('search', 'CRM_DataprocessorSearch_Search', E::ts('Search / Report'));
$this->addOutput('contact_search', 'CRM_Contact_DataProcessorContactSearch', E::ts('Contact Search'));