View file application/modules/Core/Form/Admin/Widget/RichText.php

File size: 1.29Kb
<?php

class Core_Form_Admin_Widget_RichText extends Engine_Form
{
  public function init()
  {
    $this
      ->setAttrib('class', 'global_form_popup')
      ->setAction($_SERVER['REQUEST_URI'])
      ;

    $this->addElement('Text', 'title', array(
      'label' => 'Title',
      'order' => -100,
    ));
    $this->addElement('Text', 'adminTitle', array(
      'label' => 'Admin Title',
      'order' => -99,
      'maxlength'=> 64,
    ));
    $this->addElement('TinyMce', 'data', array(
      'label' => 'Content',
      'editorOptions' => array(
        'html' => true,
        'code_dialog_width' => '500'
      )
    ));

    $this->addElement('Hidden', 'name', array(
      'order' => 100005,
    ));

    $this->addElement('Button', 'execute', array(
      'label' => 'Save Changes',
      'type' => 'submit',
      'order' => 100006,
      'ignore' => true,
      'decorators' => array('ViewHelper'),
    ));
    
    $this->addElement('Cancel', 'cancel', array(
      'label' => 'cancel',
      'link' => true,
      'prependText' => ' or ',
      'onclick' => 'parent.Smoothbox.close();',
      'ignore' => true,
      'order' => 100007,
      'decorators' => array('ViewHelper'),
    ));

     $this->addDisplayGroup(array('execute', 'cancel'), 'buttons', array(
      'order' => 100008,
    ));
  }
}