/**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addText('appId', 'App ID');
     $form->addText('secret', 'Secret');
     $form->addSelect('cookie', 'Use cookie', array(TRUE => 'yes', FALSE => 'no'));
     $form->addSaveButton('Save');
 }
 /**
  * @param Form $form
  */
 protected function configure(Form $form)
 {
     $form->addGroup('Basic settings');
     $form->addSelect('driver', 'Driver')->setItems($this->drivers, false)->setDefaultValue('pdo_mysql');
     $form['driver']->addCondition($form::IS_IN, array('pdo_mysql', 'oci8', 'pdo_oci'))->toggle('group-charset');
     $form['driver']->addCondition($form::IS_IN, array('pdo_pgsql', 'pdo_mysql', 'oci8', 'pdo_oci', 'pdo_sqlsrv'))->toggle('group-connection');
     $form['driver']->addCondition($form::EQUAL, 'pdo_sqlite')->toggle('group-sqlite');
     $form->addGroup('Connection settings');
     $form->addText('user', 'Username');
     $form->addPassword('password', 'Password');
     $form->addGroup()->setOption('id', 'group-connection');
     $form->addText('host', 'Host');
     $form->addText('port', 'Port')->getControlPrototype()->placeholder[] = 'default';
     $form->addText('dbname', 'Database');
     $form->addGroup()->setOption('id', 'group-sqlite');
     $form->addTextWithSelect('path', 'Path')->setItems(array('%tempDir%/database.db'), false);
     $form->addCheckbox('memory', 'Db in memory');
     $form->addGroup()->setOption('id', 'group-charset');
     $form->addTextWithSelect('charset', 'Charset')->setItems(array('utf8'), false);
     $backups = $this->getBackups();
     if (count($backups)) {
         $form->addGroup('Restore from backup');
         $form->addSelect('_backup', 'Backup name', $backups)->setPrompt('--------');
     }
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #3
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addText('startDepth', 'Start depth')->addCondition($form::FILLED)->addRule($form::INTEGER);
     $form->addText('maxDepth', 'Max depth')->addCondition($form::FILLED)->addRule($form::INTEGER);
     $form->addManyToOne('root', 'Root page');
     $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)
 {
     $entity = $form->data;
     $form->addGroup('Supplier');
     $form->addManyToOne('supplier', 'person')->addRule($form::FILLED);
     $form->addGroup('Customer');
     $form->addManyToOne('customer', 'person')->addRule($form::FILLED);
     $form->addGroup('Billing information');
     $form->addText('identification', 'Identification');
     $form->addText('amount', 'Amount')->addRule($form::FILLED)->addRule($form::FLOAT);
     $form->addManyToOne('payment', 'Payment');
     $form->addSelect('type', 'Type')->setItems(InvoiceEntity::getTypes());
     $form->addSelect('state', 'State')->setItems(InvoiceEntity::getStates());
     $form->addText('constantSymbol', 'Constant sb.');
     $form->addText('variableSymbol', 'Variable sb.');
     $form->addText('specificSymbol', 'Specific sb.');
     $group = $form->addGroup('Items');
     $recipients = $form->addMany('items', function (Container $container) use($group, $form) {
         $container->setCurrentGroup($group);
         $container->addText('name', 'Name')->addRule($form::FILLED);
         $container->addText('unitValue', 'Unit value')->addRule($form::FILLED)->addRule($form::FLOAT);
         $container->addText('units', 'Units')->addRule($form::FILLED)->addRule($form::INTEGER);
         $container->addText('qUnit', 'Quantity unit')->addRule($form::FILLED);
         $container->addText('tax', 'Tax')->addRule($form::FLOAT);
         $container->addCheckbox('unitValueIsTaxed', 'Value is taxed');
         $container->addSubmit('remove', 'Remove')->addRemoveOnClick();
     }, function () use($entity) {
         return new ItemEntity($entity);
     });
     $recipients->setCurrentGroup($group);
     $recipients->addSubmit('add', 'Add item')->addCreateOnClick();
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
 public function configure(Form $form)
 {
     $form->addText('text', 'Text');
     $form->addText('priceFrom', 'Price from');
     $form->addText('priceTo', 'Price to');
     $form->addCheckboxList('labels', 'Labels')->setItems($this->getLabels(), FALSE);
     $form->addSaveButton('Apply');
 }
 /**
  * @param Form $form
  */
 protected function configure(Form $form)
 {
     $form->addGroup('Administration settings');
     $form->addText('routePrefix', 'Route prefix');
     $form->addText('defaultPresenter', 'Default presenter');
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #8
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addGroup('Settings');
     $form->addText('itemsPerPage', 'Items per page');
     $form->addText('messageMaxLength', 'Message max length')->addCondition($form::FILLED)->addRule($form::NUMERIC);
     $form->addGroup();
     $form->addSaveButton('Save');
 }
Example #9
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addGroup('Options');
     $form->addManyToOne('rootPage', 'Root page')->setPrompt(NULL);
     $form->addText('maxDepth', 'Maximal depth')->addRule($form::INTEGER);
     $form->addText('maxWidth', 'Maximal width')->addRule($form::INTEGER);
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #10
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addText('name', 'Jméno')->addRule($form::FILLED, 'Vyplňte prosím jméno');
     $form->addText('latitude', 'Zeměpisná šířka (N)')->addCondition($form::FILLED)->addRule($form::FLOAT, 'Zadaná souřadnice je ve špatném tvaru');
     $longitude = $form->addText('longitude', 'Zeměpisná výška (E)');
     $longitude->addCondition($form::FILLED)->addRule($form::FLOAT, 'Zadaná souřadnice je ve špatném tvaru');
     $form->addSubmit('_gps', 'Detekovat GPS')->onClick[] = $this->gpsClick;
     $form->addSaveButton('Save');
 }
Example #11
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addText('name', 'Name')->addRule($form::FILLED);
     $form->addText('domain', 'Domain')->addRule($form::FILLED);
     /** @var ManyToOne $page */
     $page = $form->addOneToOne('page', 'Page');
     $page->setQuery($this->pageRepository->createQueryBuilder('a')->orderBy('a.positionString', 'ASC'));
     $form->addSaveButton('Save');
 }
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addText('name', 'Name');
     $form->addManyToOne('account', 'Account')->addRule($form::FILLED);
     $form->addText('identificationFormat', 'ID format')->addRule($form::FILLED);
     $form->addSelect('identificationInterval', 'ID interval', AccountEntity::getIntervals())->addRule($form::FILLED);
     $form->addText('due', 'Invoice due')->addRule($form::FILLED)->addRule($form::INTEGER);
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #13
0
 /**
  * @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');
 }
Example #14
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addGroup('Settings');
     $form->addText('itemsPerPage', 'Items per page');
     $form->addGroup('Notation');
     $form->addCheckbox('notationInHtml', 'In HTML format');
     $form->addCheckbox('autoNotation', 'Auto generate')->addCondition($form::EQUAL, true)->toggle('notationLength');
     $form->addGroup()->setOption('id', 'notationLength');
     $form->addText('notationLength', 'Length')->addRule($form::INTEGER);
     $form->addGroup();
     $form->addSaveButton('Save');
 }
Example #15
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addGroup();
     $form->addText('name', 'Name');
     $form->addText('localUrl', 'URL');
     $form->addText('title', 'Title');
     $form->addText('keywords', 'Keywords');
     $form->addText('description', 'Description');
     $form->addManyToOne('author', 'Author');
     $form->addSelect('robots', 'Robots')->setItems(RouteEntity::getRobotsValues(), FALSE);
     $form->addSelect('changefreq', 'Change frequency')->setItems(RouteEntity::getChangefreqValues(), FALSE)->setPrompt('-------');
     $form->addSelect('priority', 'Priority')->setItems(RouteEntity::getPriorityValues(), FALSE)->setPrompt('-------');
     // layout
     $form->setCurrentGroup($form->addGroup());
     $form->addCheckbox('copyLayoutFromParent', 'Layout from parent');
     $form['copyLayoutFromParent']->addCondition($form::EQUAL, FALSE)->toggle('group-layout_' . $form->data->id);
     $form->setCurrentGroup($form->getForm()->addGroup()->setOption('id', 'group-layout_' . $form->data->id));
     $form->addManyToOne('layout', 'Layout');
     $form->setCurrentGroup($form->addGroup());
     $form->addCheckbox('copyLayoutToChildren', 'Share layout with children');
     $form['copyLayoutToChildren']->addCondition($form::EQUAL, FALSE)->toggle('group-layout2_' . $form->data->id);
     $form->setCurrentGroup($form->getForm()->addGroup()->setOption('id', 'group-layout2_' . $form->data->id));
     $form->addManyToOne('childrenLayout', 'Share new layout');
     // cache
     $form->setCurrentGroup($form->addGroup());
     $form->addCheckbox('copyCacheModeFromParent', 'Cache mode from parent');
     $form['copyCacheModeFromParent']->addCondition($form::EQUAL, FALSE)->toggle('group-cache_' . $form->data->id);
     $form->setCurrentGroup($form->getForm()->addGroup()->setOption('id', 'group-cache_' . $form->data->id));
     $form->addSelect('cacheMode', 'Cache strategy')->setItems(\CmsModule\Content\Entities\RouteEntity::getCacheModes(), FALSE)->setPrompt('off');
     $form->setCurrentGroup($form->addGroup());
     $form->addFileEntityInput('photo', 'Photo');
     $form->addTextArea('notation', 'Notation');
     $form->addTextArea('text', 'Text');
     $form->addGroup('Dates');
     $form->addDateTime('created', 'Created')->setDisabled(TRUE);
     $form->addDateTime('updated', 'Updated')->setDisabled(TRUE);
     $form->addDateTime('released', 'Released')->addRule($form::FILLED);
     $form->addDateTime('expired', 'Expired');
     $form->addGroup('Tags');
     $form->addContentTags('tags');
     $aliases = $form->addMany('aliases', function (\Venne\Forms\Container $container) use($form) {
         $container->setCurrentGroup($form->addGroup('URL alias'));
         $container->addText('aliasUrl', 'Url')->setRequired();
         $container->addText('aliasLang', 'Language alias');
         $container->addText('aliasDomain', 'Domain url');
         $container->addSubmit('remove', 'Remove alias')->addRemoveOnClick();
     });
     $aliases->addSubmit('add', 'Add alias')->addCreateOnClick();
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #16
0
 /**
  * @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');
 }
Example #17
0
 /**
  * @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');
 }
Example #18
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addGroup('Settings');
     $form->addManyToOne('registration', 'Register by');
     $form->addGroup('Forgot password');
     $enabled = $form->addCheckbox('resetEnabled', 'Enabled');
     $enabled->addCondition($form::EQUAL, TRUE)->toggle('form-reset');
     $form->addGroup()->setOption('id', 'form-reset');
     $form->addText('resetSubject', 'Subject')->addConditionOn($enabled, $form::EQUAL, TRUE)->addRule($form::FILLED);
     $form->addText('resetSender', 'Sender')->addConditionOn($enabled, $form::EQUAL, TRUE)->addRule($form::FILLED);
     $form->addText('resetFrom', 'From')->addConditionOn($enabled, $form::EQUAL, TRUE)->addRule($form::FILLED)->addRule($form::EMAIL);
     $form->addTextArea('resetText', 'Text')->addConditionOn($enabled, $form::EQUAL, TRUE)->addRule($form::FILLED);
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #19
0
 /**
  * @param Form $form
  */
 protected function configure(Form $form)
 {
     $form->addGroup();
     $form->addSelect('target', 'Target module')->setTranslator(NULL)->setItems(array_keys($this->modules), FALSE);
     $form->addSelect('type', 'Type', $this->types)->addCondition($form::EQUAL, self::TYPE_LAYOUT)->toggle('form-layout')->endCondition()->addCondition($form::EQUAL, self::TYPE_TEMPLATE)->toggle('form-template');
     $form->addGroup()->setOption('id', 'form-layout');
     $form->addText('layoutName', 'Layout');
     $form->addGroup()->setOption('id', 'form-template');
     $form->addSelect('layout', 'Layout');
     $form->addText('template', 'Template');
     $form->addGroup('Template')->setOption('class', 'full');
     $form->addCode('text', NULL, NULL, 30)->getControlPrototype()->attrs['class'] = 'input-block-level';
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #20
0
 /**
  * @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)
 {
     $group = $form->addGroup();
     $form->addText('name', 'Name');
     $form->addOne('route')->setCurrentGroup($group)->addTextArea('notation', 'Notation', NULL, 4)->getControlPrototype()->attrs['class'] = 'input-block-level';
     $form->addSaveButton('Save');
 }
Example #22
0
 public function configure(Form $form)
 {
     $form->addGroup('Nastavení API');
     $form->addText('accountNumber', 'Číslo účtu');
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #23
0
 public function configure(Form $form)
 {
     $group = $form->addGroup();
     $form->addText('name', 'Name');
     $form->addOne('route')->setCurrentGroup($group)->addTextArea('notation', 'Description', NULL, 4);
     $form->addSaveButton('Save');
 }
Example #24
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addGroup('Settings');
     $form->addText('itemsPerPage', 'Items per page');
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #25
0
 /**
  * @param Form $form
  */
 protected function configure(Form $form)
 {
     $form->addGroup('Mailer');
     $smtp = $form->addCheckbox('smtp', 'Use SMTP');
     $smtp->addCondition($form::EQUAL, TRUE)->toggle('form-smtp');
     $form->addGroup()->setOption('id', 'form-smtp');
     $form->addText('host', 'Host')->addConditionOn($smtp, $form::EQUAL, TRUE)->addRule($form::FILLED, 'Enter host');
     $form->addText('port', 'Port')->addConditionOn($smtp, $form::EQUAL, TRUE)->addCondition($form::FILLED)->addRule($form::INTEGER, 'Enter number format');
     $form['port']->setOption('placeholder', '25');
     $form->addSelect('secure', 'Secure', array('ssl' => 'ssl', 'tls' => 'tls'))->setPrompt('-----');
     $form->addText('username', 'Username')->addConditionOn($smtp, $form::EQUAL, TRUE)->addCondition($form::FILLED)->addRule($form::EMAIL, 'Enter email address');
     $form->addPassword('password', 'Password');
     $form->addText('timeout', 'Timeout')->addConditionOn($smtp, $form::EQUAL, TRUE)->addCondition($form::FILLED)->addRule($form::INTEGER, 'Enter number format');
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #26
0
 /**
  * @param Form $form
  */
 protected function configure(Form $form)
 {
     $form->addText('name', 'Name');
     $form->addSelect('file', 'File')->setItems($this->templateManager->getLayouts());
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Example #27
0
 /**
  * @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');
 }
Example #28
0
 public function configure(Form $form)
 {
     $group = $form->addGroup();
     $form->addText('name', 'Name');
     $form->addOne('route')->setCurrentGroup($group)->addTextArea('notation', 'Notation', NULL, 4)->getControlPrototype()->attrs['class'] = 'input-block-level';
     $form->addManyToOne('linkedRoute', 'Linked route')->setCriteria(array('page' => $form->data->extendedPage->linkedPage->id));
     $form->addSaveButton('Save');
 }
Example #29
0
 /**
  * @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);
     $route->addDateTime('released', 'Release date')->addRule($form::FILLED);
     $route->addDateTime('expired', 'Expiry date');
     $route->addTextArea('notation', 'Notation');
     $form->addGroup('Event settings');
     $form->addDateTime('date', 'Date')->addRule($form::FILLED);
     $form->addText('facebookLink', 'Odkaz na Facebook');
     $route->setCurrentGroup($form->addGroup('Content'));
     $route->addContentEditor('text', NULL, NULL, 20);
     $form->addSaveButton('Save');
 }
Example #30
0
 /**
  * @param Form $form
  */
 protected function configure(Form $form)
 {
     $form->addGroup('Options');
     $form->addRadioList('section', 'Section', array('all' => 'All', 'namespace' => 'Namespace', 'sessions' => 'Sessions'))->setDefaultValue('all')->addCondition($form::EQUAL, 'namespace')->toggle('namespace');
     $form->addGroup('Namespace')->setOption('id', 'namespace');
     $form->addText('namespace');
     $form->setCurrentGroup();
     $form->addSaveButton('Clear');
 }