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
|
|
|
|
{
|
|
|
|
|
|
|
|
function __construct()
|
|
|
|
{
|
2016-08-18 05:43:35 +02:00
|
|
|
parent::__construct('addtocampaign', _t('CAMPAIGNS.ADDTOCAMPAIGN', 'Add to Campaign'));
|
|
|
|
|
2016-08-15 04:48:03 +02:00
|
|
|
$this->setUseButtonTag(false);
|
2016-08-11 01:40:23 +02:00
|
|
|
$this->addExtraClass('add-to-campaign-action');
|
|
|
|
$this->setValidationExempt(true);
|
2016-08-25 00:15:28 +02:00
|
|
|
$this->addExtraClass('btn');
|
2016-08-15 04:48:03 +02:00
|
|
|
$this->addExtraClass('btn-primary');
|
2016-08-11 01:40:23 +02:00
|
|
|
}
|
|
|
|
}
|