Skip to content

Commit

Permalink
MINOR Removed unused LeftAndMain->PublishItemsForm(), has been replac…
Browse files Browse the repository at this point in the history
…ed by CMSBatchAction a while ago

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92742 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Nov 21, 2009
1 parent d081a4b commit 420d0a5
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions code/CMSMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'getpagecount',
'getversion',
'publishall',
'publishitems',
'PublishItemsForm',
'restore',
'revert',
'rollback',
Expand Down Expand Up @@ -980,52 +978,6 @@ function compareversions() {
function batchactions() {
return new CMSBatchActionHandler($this, 'batchactions');
}

/**
* @return Form
*/
public function PublishItemsForm() {
$form = new Form(
$this,
'PublishItemsForm',
new FieldSet(
new HiddenField('csvIDs'),
new CheckboxField('ShowDrafts', _t('CMSMain_left.ss.SHOWONLYCHANGED','Show only changed pages'))
),
new FieldSet(
new FormAction('publishitems', _t('CMSMain_left.ss.PUBLISHCONFIRM','Publish the selected pages'))
)
);
$form->addExtraClass('actionparams');
return $form;
}

function BatchActionParameters() {
$batchActions = CMSBatchActionHandler::$batch_actions;

$forms = array();
foreach($batchActions as $urlSegment => $batchAction) {
if ($fieldset = singleton($batchAction)->getParameterFields()) {
$formHtml = '';
foreach($fieldset as $field) {
$formHtml .= $field->Field();
}
$forms[$urlSegment] = $formHtml;
}
}
$pageHtml = '';
foreach($forms as $urlSegment => $html) {
$pageHtml .= "<div class=\"params\" id=\"BatchActionParameters_$urlSegment\">$html</div>\n\n";
}
return new LiteralField("BatchActionParameters", '<div id="BatchActionParameters" style="display:none">'.$pageHtml.'</div>');
}
/**
* Returns a list of batch actions
*/
function BatchActionList() {
return $this->batchactions()->batchActionList();
}

/**
* @return Form
*/
Expand Down

0 comments on commit 420d0a5

Please sign in to comment.