|
Perforce Chronicle 2012.2/486814
API Documentation
|
This is the content delete form. More...
Public Member Functions | |
| init () | |
| Defines the elements that make up the content delete form. | |
This is the content delete form.
| Content_Form_Delete::init | ( | ) |
Defines the elements that make up the content delete form.
Called automatically when the form object is created.
{
// form should use p4cms-ui styles.
$this->setAttrib('class', 'p4cms-ui content-delete-form');
// add a field to collect the entry ids to delete
$this->addElement(
'hidden',
'ids',
array(
'required' => true
)
);
// add a blank note field to allow insert text later
$this->addElement(
'text',
'note',
array(
'helper' => 'FormNote'
)
);
$this->getElement('note')
->getDecorator('htmlTag')
->setOption('class', 'delete-confirmation');
// add a field to collect the comment
$this->addElement(
'textarea',
'comment',
array(
'label' => 'Comment',
'description' => "Shown in the version history.",
'rows' => 5
)
);
// add delete button
$this->addElement(
'SubmitButton',
'delete',
array(
'label' => 'Delete',
'required' => false,
'ignore' => true,
'class' => 'preferred'
)
);
$this->addDisplayGroup(
array('delete'),
'buttons',
array('class' => 'buttons')
);
}