Skip to content

Commit

Permalink
Say which extension being operated on
Browse files Browse the repository at this point in the history
This changes the title of the extension form to include the name of the extension being disabled. This makes it clear if users are batch disabling extensions.
  • Loading branch information
JohnFF committed Sep 30, 2014
1 parent f3e103b commit 17d48d2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions CRM/Admin/Form/Extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,30 +105,34 @@ function setDefaultValues() {
*/
public function buildQuickForm() {

$info = CRM_Extension_System::singleton()->getMapper()->keyToInfo($this->_key);
$extInfo = CRM_Admin_Page_Extensions::createExtendedInfo($info);
$extName = $extInfo['name'];

switch ($this->_action) {
case CRM_Core_Action::ADD:
$buttonName = ts('Install');
$title = ts('Install Extension');
$title = ts('Install ' . $extName . '?');
break;

case CRM_Core_Action::UPDATE:
$buttonName = ts('Download and Install');
$title = ts('Download and Install Extension');
$title = ts('Download and Install ' . $extName . '?');
break;

case CRM_Core_Action::DELETE:
$buttonName = ts('Uninstall');
$title = ts('Uninstall Extension');
$title = ts('Uninstall ' . $extName . '?');
break;

case CRM_Core_Action::ENABLE:
$buttonName = ts('Enable');
$title = ts('Enable Extension');
$title = ts('Enable ' . $extName . '?');
break;

case CRM_Core_Action::DISABLE:
$buttonName = ts('Disable');
$title = ts('Disable Extension');
$title = ts('Disable ' . $extName . '?');
break;
}

Expand Down

0 comments on commit 17d48d2

Please sign in to comment.