Save.php #1

  • //
  • guest/
  • perforce_software/
  • chronicle/
  • main/
  • application/
  • content/
  • forms/
  • Save.php
  • View
  • Commits
  • Open Download .zip Download (1 KB)
<?php
/**
 * Content sub-form to provide comment field used for changelist description.
 *
 * @copyright   2012 Perforce Software. All rights reserved.
 * @license     Please see LICENSE.txt in top-level folder of this distribution.
 * @version     <release>/<patch>
 */
class Content_Form_Save extends P4Cms_Form_SubForm
{
    /**
     * Called automatically when the form object is created.
     */
    public function init()
    {
        // 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'
            )
        );
    }
}
# Change User Description Committed
#1 16170 perforce_software Move Chronicle files to follow new path scheme for branching.
//guest/perforce_software/chronicle/application/content/forms/Save.php
#1 8972 Matt Attaway Initial add of the Chronicle source code