Exemple #1
0
 public function initialize()
 {
     parent::initialize();
     $this->addHidden('id');
     if ($this->isCreate()) {
         $this->addHidden('abbr');
     } else {
         $this->addText('abbr', "systemModule.staticPageForm.abbr")->addRule(Form::FILLED, "systemModule.staticPageForm.abbrMustFill")->setRequired();
     }
     $this->addText('title', "systemModule.staticPageForm.title")->addRule(Form::FILLED, "systemModule.staticPageForm.titleMustFill")->setRequired("systemModule.staticPageForm.titleMustFill");
     //	$this->addSelect('parent', "systemModule.staticPageForm.parent",
     //		$this->getPages())
     //		->setPrompt("systemModule.staticPageForm.pageSel")
     //		->addRule(Form::FILLED, "systemModule.staticPageForm.parentMustFill")
     //		->setRequired("systemModule.staticPageForm.parentMustFill");
     $this->addSelect("group", "systemModule.staticPageForm.group", $this->getSportGroups());
     $this->addSelect("status", "systemModule.staticPageForm.status", $this->getStates());
     $this->addSelect("commentMode", "systemModule.staticPageForm.commentMode", $this->getCommentModes())->setDefaultValue(CommentMode::RESTRICTED);
     if ($this->isUpdate()) {
         $this->addDate("updated", "systemModule.staticPageForm.updated", DateInput::TYPE_DATE)->addRule(Form::FILLED, "systemModule.staticPageForm.updatedMustFill")->setRequired("systemModule.staticPageForm.updatedMustFill");
         $this->addSelect("editor", "systemModule.staticPageForm.editor", $this->getUsers())->setDisabled();
     }
     $this->addTextArea('content', "systemModule.staticPageForm.content", 55, 20);
     $this->addSubmit('submit', "system.forms.submitButton.label");
     $this->onSuccess[] = $this->presenter->staticPageFormSubmitted;
 }
Exemple #2
0
 public function initialize()
 {
     parent::initialize();
     $wpStates = WebProfileStatus::getOptions();
     $rows = 2;
     $cols = 50;
     $this->addHidden('id');
     $this->addGroup('usersModule.admin.profileEdit');
     $this->addTextArea('personalLikes', 'usersModule.webProfForm.personalLikes.label', $cols, $rows);
     $this->addTextArea('personalDislikes', 'usersModule.webProfForm.personalDisLikes.label', $cols, $rows);
     $this->addTextArea('personalInterests', 'usersModule.webProfForm.personalInterests.label', $cols, $rows);
     $this->addText('jerseyNumber', 'usersModule.webProfForm.jerseyNumber.label')->addRule(Form::NUMERIC, "usersModule.webProfForm.jerseyNumber.mustNumber");
     $this->addTextArea('equipment', 'usersModule.webProfForm.equipment.label', $cols, $rows);
     $this->addTextArea('favouriteBrand', 'usersModule.webProfForm.favBrand.label', $cols, $rows);
     $this->addTextArea('favouriteClub', 'usersModule.webProfForm.favClub.label', $cols, $rows);
     $this->addTextArea('sportExperience', 'usersModule.webProfForm.experience.label', $cols, $rows);
     $this->addTextArea('howGotThere', 'usersModule.webProfForm.howGotThere.label', $cols, $rows);
     $this->addTextArea('aditionalInfo', 'usersModule.webProfForm.moreAboutMe.label', $cols, $rows);
     $this->addUpload("picture", "usersModule.webProfForm.picture.label");
     $this->addTextArea('signature', 'usersModule.webProfForm.signature.label', $cols, $rows);
     $this->addCheckbox("publish", 'usersModule.webProfForm.publish.label');
     $this->addSelect("status", "usersModule.webProfForm.status.label", $wpStates);
     $this->addSubmit('submitButton', 'system.forms.submitButton.label');
     $this->onSuccess[] = callback($this->presenter, 'webProfileFormSuccess');
 }