From: Coleman Watts Date: Wed, 17 Feb 2016 21:52:48 +0000 (-0500) Subject: CRM-17607 - Change PDF activity type label X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cd095eae5f0eeecabf3a7add9ffd7e9325573e44;p=civicrm-core.git CRM-17607 - Change PDF activity type label --- diff --git a/CRM/Contact/Form/Task/PDFLetterCommon.php b/CRM/Contact/Form/Task/PDFLetterCommon.php index da9c8f6ec3..819e6b6ec1 100644 --- a/CRM/Contact/Form/Task/PDFLetterCommon.php +++ b/CRM/Contact/Form/Task/PDFLetterCommon.php @@ -54,7 +54,7 @@ class CRM_Contact_Form_Task_PDFLetterCommon { $form->assign('message', $messageText); $form->assign('messageSubject', $messageSubject); - CRM_Utils_System::setTitle('Create Printable Letters (PDF)'); + CRM_Utils_System::setTitle('Print/Merge Document'); } /** @@ -64,7 +64,7 @@ class CRM_Contact_Form_Task_PDFLetterCommon { public static function preProcessSingle(&$form, $cid) { $form->_contactIds = array($cid); // put contact display name in title for single contact mode - CRM_Utils_System::setTitle(ts('Create Printable Letter (PDF) for %1', array(1 => CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $cid, 'display_name')))); + CRM_Utils_System::setTitle(ts('Print/Merge Document for %1', array(1 => CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $cid, 'display_name')))); } /** @@ -173,7 +173,7 @@ class CRM_Contact_Form_Task_PDFLetterCommon { if ($form->get('action') != CRM_Core_Action::VIEW) { $buttons[] = array( 'type' => 'submit', - 'name' => $form->_single ? ts('Make PDF') : ts('Make PDFs'), + 'name' => ts('Download Document'), 'isDefault' => TRUE, ); $buttons[] = array( diff --git a/CRM/Contact/Task.php b/CRM/Contact/Task.php index 2b426daa82..c690fb03b5 100644 --- a/CRM/Contact/Task.php +++ b/CRM/Contact/Task.php @@ -146,7 +146,7 @@ class CRM_Contact_Task { 'result' => TRUE, ), self::PRINT_FOR_CONTACTS => array( - 'title' => ts('PDF letters - print'), + 'title' => ts('Print/merge document'), 'class' => 'CRM_Contact_Form_Task_PDF', 'result' => TRUE, ), diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 9059d3a299..e09c1fe591 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -2699,7 +2699,7 @@ LEFT JOIN civicrm_mailing_group g ON g.mailing_id = m.id $className != 'CRM_Contact_Form_Task_SMS' ) { $form->add('wysiwyg', 'html_message', - ts('HTML Format'), + strstr($className, 'PDF') ? ts('Document Body') : ts('HTML Format'), array( 'cols' => '80', 'rows' => '8', diff --git a/CRM/Member/Task.php b/CRM/Member/Task.php index 9598fc10d6..5470390e5b 100644 --- a/CRM/Member/Task.php +++ b/CRM/Member/Task.php @@ -105,7 +105,7 @@ class CRM_Member_Task { 'result' => TRUE, ), 7 => array( - 'title' => ts('PDF letters - print for memberships'), + 'title' => ts('Print/merge document for memberships'), 'class' => 'CRM_Member_Form_Task_PDFLetter', 'result' => FALSE, ), diff --git a/CRM/Upgrade/Incremental/sql/4.7.9.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.7.9.mysql.tpl index bdd685c2dd..5d38563929 100644 --- a/CRM/Upgrade/Incremental/sql/4.7.9.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.7.9.mysql.tpl @@ -1 +1,8 @@ {* file to handle db changes in 4.7.9 during upgrade *} + +-- CRM-17607 Change PDF activity type label +SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type'; +UPDATE civicrm_option_value SET + {localize field="label"}label = '{ts escape="sql"}Print/Merge Document{/ts}'{/localize}, + {localize field="description"}description = '{ts escape="sql"}Export letters and other printable documents.{/ts}'{/localize} +WHERE name = 'Print PDF Letter' AND option_group_id = @option_group_id_act; diff --git a/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php b/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php index 59815f7a2c..20a78fb26f 100644 --- a/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php +++ b/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php @@ -313,7 +313,7 @@ class WebTest_Generic_GeneralClickAroundTest extends CiviSeleniumTestCase { // Verify activity types $this->assertTextPresent("Meeting"); - $this->assertTextPresent("Print PDF Letter"); + $this->assertTextPresent("Print/Merge Document"); $this->assertTextPresent("Event Registration"); $this->assertTextPresent("Contribution"); $this->assertTextPresent("Membership Signup"); diff --git a/xml/templates/civicrm_data.tpl b/xml/templates/civicrm_data.tpl index eff7f199e9..af905d4db6 100644 --- a/xml/templates/civicrm_data.tpl +++ b/xml/templates/civicrm_data.tpl @@ -331,7 +331,7 @@ VALUES (@option_group_id_act, '{ts escape="sql"}Bulk Email{/ts}', 19, 'Bulk Email', NULL, 1, NULL, 19, '{ts escape="sql"}Bulk Email Sent.{/ts}', 0, 1, 1, NULL, NULL), (@option_group_id_act, '{ts escape="sql"}Assign Case Role{/ts}', 20, 'Assign Case Role', NULL,0, 0, 20, '', 0, 1, 1, @caseCompId, NULL), (@option_group_id_act, '{ts escape="sql"}Remove Case Role{/ts}', 21, 'Remove Case Role', NULL,0, 0, 21, '', 0, 1, 1, @caseCompId, NULL), - (@option_group_id_act, '{ts escape="sql"}Print PDF Letter{/ts}', 22, 'Print PDF Letter', NULL, 0, NULL, 22, '{ts escape="sql"}Print PDF Letter.{/ts}', 0, 1, 1, NULL, NULL), + (@option_group_id_act, '{ts escape="sql"}Print/Merge Document{/ts}', 22, 'Print PDF Letter', NULL, 0, NULL, 22, '{ts escape="sql"}Export letters and other printable documents.{/ts}', 0, 1, 1, NULL, NULL), (@option_group_id_act, '{ts escape="sql"}Merge Case{/ts}', 23, 'Merge Case', NULL, 0, NULL, 23, '', 0, 1, 1, @caseCompId, NULL ), (@option_group_id_act, '{ts escape="sql"}Reassigned Case{/ts}', 24, 'Reassigned Case', NULL, 0, NULL, 24, '', 0, 1, 1, @caseCompId, NULL ), (@option_group_id_act, '{ts escape="sql"}Link Cases{/ts}', 25, 'Link Cases', NULL, 0, NULL, 25, '', 0, 1, 1, @caseCompId, NULL ),