public function __construct($templateId) { parent::__construct(); $router = new Shared_Controller_Router(); $this->setAction($router->assemble(array('id' => $templateId), 'template')); $this->setMethod('post'); // privacy $privacy = new Zend_Dojo_Form_Element_ComboBox('privacy'); $privacy->setLabel(__('Privacy')); $privacy->setRequired(true); $privacy->addMultiOptions(array('private' => __('Private: users can follow this these events'), 'public' => __('Public: users cannot follow these events'))); $privacy->setValue('public'); $this->addElement($privacy); // web hooks $webhooks = new Zend_Dojo_Form_Element_CheckBox('web_hooks'); $webhooks->setLabel(__('Allow web hooks')); $webhooks->setRequired(true); $webhooks->setChecked(true); $webhooks->setCheckedValue('yes'); $webhooks->setUncheckedValue('no'); $this->addElement($webhooks); // submit $submit = new Zend_Dojo_Form_Element_SubmitButton('submit'); $submit->setLabel(__('Submit')); $this->addElement($submit); }
public function __construct() { parent::__construct(); $router = new Shared_Controller_Router(); $this->setAction($router->assemble(array(), 'login')); $this->setMethod('post'); // email $email = new Zend_Dojo_Form_Element_TextBox('email'); $email->setLabel(__('Email')); $email->setRequired(true); $this->addElement($email); // password $password = new Zend_Dojo_Form_Element_PasswordTextBox('password'); $password->setLabel(__('Password')); $password->setRequired(true); $this->addElement($password); // remember $remember = new Zend_Dojo_Form_Element_CheckBox('remember'); $remember->setLabel(__('Remember me on this computer')); $remember->setCheckedValue('yes'); $remember->setUncheckedValue('no'); $remember->setChecked(true); $this->addElement($remember); // submit $submit = new Zend_Dojo_Form_Element_SubmitButton('submit'); $submit->setLabel(__('Submit')); $this->addElement($submit); }
public function __construct() { parent::__construct(); $router = new Shared_Controller_Router(); $this->setAction($router->assemble(array(), 'application-new')); $this->setMethod('post'); // name $name = new Zend_Dojo_Form_Element_TextBox('name'); $name->setLabel(__('Name')); $name->setRequired(true); $this->addElement($name); // description $description = new Zend_Dojo_Form_Element_Textarea('description'); $description->setLabel(__('Description')); $description->setAttrib('rows', '5'); $description->setAttrib('cols', '60'); $this->addElement($description); // url $url = new Zend_Dojo_Form_Element_TextBox('url'); $url->setLabel(__('URL')); $url->setRequired(true); $this->addElement($url); // privacy $privacy = new Zend_Dojo_Form_Element_ComboBox('privacy'); $privacy->setLabel(__('Privacy')); $privacy->setRequired(true); $privacy->addMultiOptions(array('private' => __('Private: users cannot follow this application'), 'public' => __('Public: users can follow this application'))); $privacy->setValue('public'); $this->addElement($privacy); // submit $submit = new Zend_Dojo_Form_Element_SubmitButton('submit'); $submit->setLabel(__('Submit')); $this->addElement($submit); }
public function __construct($options = null) { // Configurações Iniciais $this->setMethod(self::METHOD_POST)->setAction($this->getView()->url()); // Superclasse parent::__construct($options); }
public function __construct() { parent::__construct(); //$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$decorator,$value $formfield = new App_Form_Field(); //$vtype=array('Alpha'); $datefrom = $formfield->field('Text', 'datefrom', '', '', 'mand', 'From date', true, '', '', '', '', '', 0, ''); $this->addElements(array($datefrom)); }
public function __construct($options = null) { if (isset($options['adaptors'])) { $this->adaptors = (array) $options['adaptors']; } if (isset($options['request'])) { // Should be on the same line but too long to fit $httpClassName = 'Zend_Controller_Request_Http'; if (get_class($options['request']) === $httpClassName) { $this->request = $options['request']; } } parent::__construct($options); }
public function __construct($path) { Zend_Dojo::enableForm($this); parent::__construct($path); $formfield = new App_Form_Field(); // $fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value $branch = $formfield->field('Select', 'branch', '', '', '', '', false, '', '', '', '', '', 0, 0); $branch->setAttrib('onchange', 'Getuser(this.value,"' . $path . '")'); $loanofficer = $formfield->field('Select', 'loanofficer', '', '', '', '', false, '', '', '', '', '', 0, 0); $fromdate = $formfield->field('Text', 'fromdate', '', '', '', '', false, '', '', '', '', '', 0, 0); $submit = new Zend_Form_Element_Submit('Search'); $pdf = new Zend_Form_Element_Submit('PDF'); $this->addElements(array($fromdate, $branch, $loanofficer, $submit, $pdf)); }
public function __construct($applicationId) { parent::__construct(); $router = new Shared_Controller_Router(); $this->setAction($router->assemble(array('id' => $applicationId), 'application')); $this->setMethod('post'); // privacy $privacy = new Zend_Dojo_Form_Element_ComboBox('privacy'); $privacy->setLabel(__('Privacy')); $privacy->setRequired(true); $privacy->addMultiOptions(array('private' => __('Private: users can follow this application'), 'public' => __('Public: users cannot follow this application'))); $privacy->setValue('public'); $this->addElement($privacy); // submit $submit = new Zend_Dojo_Form_Element_SubmitButton('submit'); $submit->setLabel(__('Submit')); $this->addElement($submit); }
public function __construct($options = null) { parent::__construct($options); //$this->setAction($options['action'])->setMethod('post'); // initialize form $this->setName('newOutlayForm')->setAction('/projects/outlay/create')->setMethod('post'); $humanResource = new Zend_Form_Element_Hidden('humanResource'); $humanResource->addValidator('Int')->addFilter('StringTrim'); $this->addElement($humanResource); $project = new Zend_Form_Element_Hidden('project'); $project->addValidator('Int')->addFilter('StringTrim'); $this->addElement($project); $action = new Zend_Form_Element_Hidden('action'); $action->addValidator('Int')->addFilter('StringTrim'); $this->addElement($action); $this->setDecorators(array('FormElements', array('TabContainer', array('id' => 'tabContainer', 'style' => 'width:660px; height:500px', 'dijitParams' => array('tabPosition' => 'top')), 'DijitForm'))); // create rich editor $observation = new Zend_Dojo_Form_Element_Editor('observation'); $observation->setLabel('Observation:')->setOptions(array('width' => '120px', 'height' => '40px')); $this->addElement($observation); }
public function __construct() { parent::__construct(); $router = new Shared_Controller_Router(); $this->setAction($router->assemble(array(), 'register')); $this->setMethod('post'); // email $email = new Zend_Dojo_Form_Element_TextBox('email'); $email->setLabel(__('Email')); $email->setRequired(true); $this->addElement($email); // password $password = new Zend_Dojo_Form_Element_PasswordTextBox('password'); $password->setLabel(__('Password')); $password->setRequired(true); $this->addElement($password); // submit $submit = new Zend_Dojo_Form_Element_SubmitButton('submit'); $submit->setLabel(__('Submit')); $this->addElement($submit); }
public function __construct($applicationId) { parent::__construct(); $router = new Shared_Controller_Router(); $this->setAction($router->assemble(array(), 'template-new') . '?applicationid=' . $applicationId); $this->setMethod('post'); // name $name = new Zend_Dojo_Form_Element_TextBox('name'); $name->setLabel(__('Name')); $name->setRequired(true); $this->addElement($name); // body $body = new Zend_Dojo_Form_Element_Textarea('body'); $body->setLabel(__('Body')); $body->setRequired(true); $body->setAttrib('rows', '5'); $body->setAttrib('cols', '60'); $body->setDescription(__('HTML: You may only use the <a> tag.') . '<br />' . __('Tokens: Tokens should be %-delimeted, e.g. %post_url%.')); $body->getDecorator('Description')->setEscape(false); $this->addElement($body); // privacy $privacy = new Zend_Dojo_Form_Element_ComboBox('privacy'); $privacy->setLabel(__('Privacy')); $privacy->setRequired(true); $privacy->addMultiOptions(array('private' => __('Private: users can follow this these events'), 'public' => __('Public: users cannot follow these events'))); $privacy->setValue('public'); $this->addElement($privacy); // web hooks $webhooks = new Zend_Dojo_Form_Element_CheckBox('web_hooks'); $webhooks->setLabel(__('Allow web hooks')); $webhooks->setRequired(true); $webhooks->setChecked(true); $webhooks->setCheckedValue('yes'); $webhooks->setUncheckedValue('no'); $this->addElement($webhooks); // submit $submit = new Zend_Dojo_Form_Element_SubmitButton('submit'); $submit->setLabel(__('Submit')); $this->addElement($submit); }
public function __construct() { $filename = preg_replace('~php$~', 'ini', __FILE__); $ini = new Zend_Config_Ini($filename, 'fields'); parent::__construct($ini); }