Beispiel #1
0
 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);
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 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);
 }
Beispiel #4
0
 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);
 }
Beispiel #5
0
 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);
 }
Beispiel #6
0
 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 &lt;a&gt; 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);
 }