public function init() { parent::init(); $typeDef = $this->record->getTypeDef(); $type = $this->addSelect('type', null, array('options' => Am_Di::getInstance()->savedFormTable->getTypeOptions())); $type->setLabel(___('Form Type')); if (!empty($this->record->type)) { $type->toggleFrozen(true); } $title = $this->addText('title', array('class' => 'el-wide'))->setLabel(___("Custom Signup Form Title\n" . "keep empty to use default title")); $comment = $this->addText('comment', array('class' => 'el-wide'))->setLabel(___("Comment\nfor admin reference")); if ($this->record->isSignup() || $this->record->isProfile()) { if (!empty($typeDef['generateCode'])) { $code = $this->addText('code')->setLabel(___("Secret Code\n" . "if form is not choosen as default, this code\n" . "(inside URL) will be necessary to open form"))->addRule('regex', ___('Value must be alpha-numeric'), '/[a-zA-Z0-9_]/'); } } if ($this->record->type == SavedForm::T_SIGNUP || $this->record->type == SavedForm::T_PROFILE) { $this->addAdvCheckbox('hide')->setLabel(___("Hide from Menu\n" . "do not include link to this form in members menu")); } $this->brickEditor = $this->addElement(new Am_Form_Element_BricksEditor('fields', array(), $this->record->createForm()))->setLabel(array('Fields')); if ($this->record->isSignup()) { $this->addSelect('tpl')->setLabel(___("Template\nalternative template for signup page") . "\n" . ___("aMember will look for templates in [application/default/views/signup/] folder\n" . "and in theme's [signup/] folder\n" . "and template filename must start with [signup]"))->loadOptions($this->getSignupTemplates()); } $fs = $this->addAdvFieldset('meta', array('id' => 'meta'))->setLabel(___('Meta Data')); $fs->addText('meta_title', array('class' => 'el-wide'))->setLabel(___('Title')); $fs->addText('meta_keywords', array('class' => 'el-wide'))->setLabel(___('Keywords')); $fs->addText('meta_description', array('class' => 'el-wide'))->setLabel(___('Description')); }
public function init() { parent::init(); $typeDef = $this->record->getTypeDef(); $type = $this->addSelect('type', null, array('options' => Am_Di::getInstance()->savedFormTable->getTypeOptions())); $type->setLabel(___('Form Type')); if (!empty($this->record->type)) { $type->toggleFrozen(true); } $title = $this->addText('title', array('size' => 40))->setLabel(___("Custom Signup Form Title\n" . "keep empty to use default title")); $comment = $this->addText('comment', array('size' => 40))->setLabel(___("Comment\nfor admin reference")); if ($this->record->isSignup()) { if (!empty($typeDef['generateCode'])) { $code = $this->addText('code')->setLabel(___("Secret Code\n" . "if form is not choosen as default, this code\n" . "(inside URL) will be necessary to open form"))->addRule('regex', ___('Value must be alpha-numeric'), '/[a-zA-Z0-9_]/'); } } $this->brickEditor = $this->addElement(new Am_Form_Element_BricksEditor('fields', array(), $this->record->createForm()))->setLabel(array('Fields')); if ($this->record->isSignup()) { $this->addSelect('tpl')->setLabel(___("Template\nalternative template for signup page"))->loadOptions($this->getSignupTemplates()); } }