2016-08-11 01:40:23 +02:00
|
|
|
<?php
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2016-08-11 01:40:23 +02:00
|
|
|
namespace SilverStripe\Admin;
|
|
|
|
|
2016-08-19 00:51:35 +02:00
|
|
|
use SilverStripe\Forms\FormAction;
|
2016-08-11 01:40:23 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A form action to return from geCMSActions or otherwise include in a CMS Edit Form that
|
|
|
|
* has the right action name and CSS classes to trigger the AddToCampaignHandler.
|
|
|
|
*
|
|
|
|
* See SiteTree.php and CMSMain.php for an example of it's use
|
|
|
|
*/
|
|
|
|
class AddToCampaignHandler_FormAction extends FormAction
|
|
|
|
{
|
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct('addtocampaign', _t('CAMPAIGNS.ADDTOCAMPAIGN', 'Add to Campaign'));
|
2016-08-18 05:43:35 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
$this->setUseButtonTag(false);
|
|
|
|
$this->addExtraClass('add-to-campaign-action');
|
|
|
|
$this->setValidationExempt(true);
|
|
|
|
$this->addExtraClass('btn');
|
|
|
|
$this->addExtraClass('btn-primary');
|
|
|
|
}
|
2016-08-11 01:40:23 +02:00
|
|
|
}
|