|
Perforce Chronicle 2012.2/486814
API Documentation
|
Content sub-form to provide comment field used for changelist description. More...
Public Member Functions | |
| init () | |
| Called automatically when the form object is created. | |
Content sub-form to provide comment field used for changelist description.
| Content_Form_Save::init | ( | ) |
Called automatically when the form object is created.
{
// set the title of this form.
$this->setLegend('Save');
// add a comment element to provide a description that will appear in the version history.
$this->addElement(
'textarea',
'comment',
array(
'label' => 'Comment',
'description' => "Shown in the version history.",
'rows' => 3,
'ignore' => true
)
);
// add a save button.
$this->addElement(
'SubmitButton',
'save',
array(
'class' => 'content-save-button preferred',
'label' => 'Save',
'required' => false,
'ignore' => true
)
);
// put the save button in a fieldset at the bottom of the form.
$this->addDisplayGroup(
array('save'),
'buttons',
array(
'class' => 'buttons',
'order' => '1000'
)
);
}