/** * @param Form $form */ public function configure(Form $form) { $form->addText('itemsPerPage', 'Items per page'); $form->addManyToMany('pages', 'Pages'); $form->addManyToMany('categories', 'Categories'); $form->addSaveButton('Save'); }
public function configure(Form $form) { $_this = $this; $route = $form->addOne('route'); $group = $form->addGroup(); $route->setCurrentGroup($group); $form->addText('name', 'Name'); $form->addText('price', 'Price')->setDefaultValue(0)->addCondition($form::FILLED)->addRule($form::FLOAT); $form->addText('rrp', 'RRP')->addCondition($form::FILLED)->addRule($form::FLOAT); $route->addTextArea('notation', 'Description'); $route->addFileEntityInput('photo', 'Image'); $form->addText('inStock', 'In stock')->addCondition($form::FILLED)->addRule($form::FLOAT); $form->addGroup(''); $form->addManyToOne('category', 'Main category'); $form->addManyToMany('categories', 'Next categories'); $form->addGroup(); $form->addManyToMany('labels', 'Labels'); $tags = $form->addContainer('tags'); $tags->setCurrentGroup($group = $form->addGroup()); $form->addGroup('Types'); $form->addTags('typesAsArray', 'Types')->setSuggestCallback(function () use($_this, $form) { $ret = array(); foreach ($_this->getTagsFromCategories($form) as $tag) { $ret[$tag] = $tag; } return $ret; })->setDelimiter('[;]+')->setJoiner(';'); $form->addGroup(); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $form->addGroup(); $form->addText('itemsPerPage', 'Items per page'); $form->addManyToMany('pages', 'Pages'); $form->addManyToMany('categories', 'Categories'); $form->addGroup('Dimensions'); $form->addText('width', 'Width')->addCondition($form::FILLED)->addRule($form::INTEGER); $form->addText('height', 'Height')->addCondition($form::FILLED)->addRule($form::INTEGER); $form->addGroup(); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $form->addManyToMany('accounts', 'Accounts'); $form->addText('itemsPerPage', 'Items per page')->addRule($form::FILLED)->addRule($form::NUMERIC); $form->setCurrentGroup(); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $form->addGroup('Person'); $form->addSelect('type', 'Person', PersonEntity::getTypes()); $form->addText('name', 'Name'); $form->addFileEntityInput('logo', 'Logo'); $form->addManyToMany('users', 'Users'); $form->addTextArea('description', 'Description'); $form->addGroup('Address'); $form->addText('street', 'Street'); $form->addText('number', 'Number'); $form->addText('city', 'City'); $form->addText('zip', 'ZIP'); $form->addGroup('Contacts'); $form->addText('email', 'Email')->addCondition($form::FILLED)->addRule($form::EMAIL); $form->addText('phone', 'Phone'); $form->addText('fax', 'Fax'); $form->addText('website', 'Website')->addCondition($form::FILLED)->addRule($form::URL); $form->addGroup('Billing information'); $form->addText('identificationNumber', 'IN'); $form->addText('taxIdentificationNumber', 'TIN'); $form->addText('registration', 'Registration'); $form->addCheckbox('taxpayer', 'Taxpayer'); $form->addFileEntityInput('signature', 'Signature'); $form->addSaveButton('Save'); }
/** * @param Form $form */ protected function configure(Form $form) { $form->addGroup(); $form->addText('name', 'Name'); if ($form->data->id) { $form->addManyToOne('parent', 'Parent')->setCriteria(array('invisible' => FALSE))->setOrderBy(array('path' => 'ASC')); } $form->addGroup('Permissions'); $form->addManyToOne('author', 'Owner'); $form->addManyToMany('write', 'Write'); $form->addManyToMany('read', 'Read'); $form->addCheckbox('protected', 'Protected'); $form->addCheckbox('recursively', 'Change recursively'); $form->setCurrentGroup(); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $form->addGroup('Settings'); $form->addText('itemsPerPage', 'Items per page'); $form->addManyToMany('roles', 'Roles'); $form->setCurrentGroup(); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $form->addGroup('Kontakty'); $form->addText('city', 'Město'); $form->addText('street', 'Ulice'); $form->addText('zip', 'PSČ'); $form->addText('phone', 'Telefon'); $form->addText('email', 'E-mail'); $form->addText('account', 'Číslo účtu'); $form->addGroup('Sociální sítě'); $form->addText('fb', 'Facebook'); $form->addGroup('Lidé'); $form->addManyToOne('coordinator', 'Koordinátor'); $form->addManyToMany('members', 'Členové'); $form->addManyToMany('supporters', 'Přiznivci'); $form->setCurrentGroup(); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $form->addGroup('Options'); $form->addManyToOne('newsletter', 'Newsletter')->setOrderBy(array('created' => 'DESC'))->setPrompt(NULL); $form->addCheckbox('allUsers', 'Send to all')->addCondition($form::EQUAL, FALSE)->toggle('form-users'); $form->addGroup()->setOption('id', 'form-users'); $form->addManyToMany('users', 'Users'); $form->addGroup(); $form->addSaveButton('Odeslat newsletter'); }
/** * @param Form $form */ protected function configure(Form $form) { $form->addGroup(); if ($form->data->id) { $form->addText('name', 'Name')->addCondition($form::FILLED); } else { $form->addUpload('file', 'File')->addCondition($form::FILLED); } if ($form->data->id) { $form->addManyToOne('parent', 'Parent')->setCriteria(array('invisible' => FALSE))->setOrderBy(array('path' => 'ASC')); } $form->addGroup('Permissions'); $form->addManyToOne('author', 'Owner'); $form->addManyToMany('write', 'Write'); $form->addCheckbox('protected', 'Protected')->addCondition($form::EQUAL, TRUE)->toggle('form-permissions'); $form->addGroup()->setOption('id', 'form-permissions'); $form->addManyToMany('read', 'Read'); $form->setCurrentGroup(); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $extendedRoute = $form->data; $form->addGroup('Settings'); $form->addText('subject', 'Předmět')->addRule($form::FILLED); $box = $form->addMany('boxes', function (Container $box) use($form) { $box->setCurrentGroup($form->addGroup('Box')); $box->addText('name', 'Nadpis'); $box->addTextArea('text', 'text'); $box->addFileEntityInput('photo', 'Photo'); $box->addSubmit('remove', 'Smazat box')->addRemoveOnClick(); }, function () use($extendedRoute) { return new BoxEntity($extendedRoute); }); $box->addSubmit('add', 'Přidat box')->addCreateOnClick(); // metodu vytváří replicator $form->addGroup(); $form->addManyToMany('events', 'Events'); $form->addManyToMany('blogs', 'Blogs'); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $route = $form->addContainer('mainRoute'); $group = $form->addGroup('Settings'); $form->addText('name', 'Name')->addRule($form::FILLED); $route->setCurrentGroup($group); $route->addTextArea('notation', 'Notation'); $form->addText('items', 'Items')->addRule($form::FILLED)->addRule($form::INTEGER); $form->addGroup('Target'); $form->addSelect('class', 'Route type', $this->getClasses())->setPrompt('--------'); $form->addManyToMany('targetPages', 'Target pages'); $form->setCurrentGroup(); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $form->addGroup('Settings'); $form->addSelect('mode', 'Registration mode', PageEntity::getModes())->addCondition($form::IS_IN, array(PageEntity::MODE_MAIL, PageEntity::MODE_MAIL_CHECKUP))->toggle('form-group-email'); $form->addSelect('socialMode', 'Login provider mode', PageEntity::getSocialModes()); $form->addSelect('userType', 'User type', $this->getUserTypes()); $form->addManyToMany('roles', 'Roles for new user'); $form->addGroup('E-mail')->setOption('id', 'form-group-email'); $form->addText('mailFrom', 'From')->addConditionOn($form['mode'], $form::IS_IN, array(PageEntity::MODE_MAIL, PageEntity::MODE_MAIL_CHECKUP))->addRule($form::EMAIL); $form->addText('sender', 'Sender'); $form->addText('subject', 'Subject'); $form->addEditor('email', 'E-mail body'); $form->setCurrentGroup(); $form->addSaveButton('Save'); }
/** * @param Form $form */ public function configure(Form $form) { $route = $form->addOne('route'); $group = $form->addGroup(); $form->addText('name', 'Name'); $route->setCurrentGroup($group); $route->addFileEntityInput('photo', 'Photo'); $route->addManyToOne('author', 'Author')->setDisabled(TRUE); $form->addManyToOne('category', 'Main category'); $form->addManyToMany('categories', 'Categories'); $route->addDateTime('released', 'Release date')->addRule($form::FILLED); $route->addDateTime('expired', 'Expiry date'); $route->addTextArea('notation', 'Notation'); $route->setCurrentGroup($form->addGroup('Content')); $route->addContentEditor('text', NULL, NULL, 20); $form->addSaveButton('Save'); }