Example #1
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 #2
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);
     $route->setCurrentGroup($form->addGroup('Content'));
     $route->addContentEditor('text', NULL, NULL, 20);
     $form->addSaveButton('Save');
 }
Example #3
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addManyToOne('account', 'Account');
     $form->addManyToOne('offset', 'Offset');
     $form->addText('paymentId', 'Payment ID');
     $form->addDateTime('date', 'Date');
     $form->addText('amount', 'Amount');
     $form->addText('constantSymbol', 'Constant sb.');
     $form->addText('variableSymbol', 'Variable sb.');
     $form->addText('specificSymbol', 'Specific sb.');
     $form->addText('userIdentification', 'User identific.');
     $form->addTextArea('message', 'Message')->addRule($form::MAX_LENGTH, NULL, 140);
     $form->addText('type', 'Type');
     $form->addText('performed', 'Performed')->addRule($form::MAX_LENGTH, NULL, 50);
     $form->addText('specification', 'Specification');
     $form->addText('comment', 'Comment');
     $form->addText('bic', 'BIC');
     $form->addText('instructionId', 'Instruction ID');
     $form->addSaveButton('Save');
 }
Example #4
0
 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $codes = $this->getCodes();
     $form->addGroup();
     $form->addManyToOne('person', 'Person');
     $c = $form->addManyToOne('bank', 'Bank')->addRule($form::FILLED);
     foreach ($codes as $id => $code) {
         $c->addCondition($form::EQUAL, $id)->toggle('form-' . $code);
     }
     $form->addDateTime('syncDate', 'Last sync. date')->addRule($form::FILLED);
     $form->addText('name', 'Account number')->addRule($form::FILLED);
     $form->addManyToOne('currency', 'Currency')->addRule($form::FILLED);
     $form->addText('iban', 'IBAN');
     $form->addText('bic', 'BIC');
     $drivers = $form->addContainer('drivers');
     foreach ($this->paymentManager->getDrivers() as $driver) {
         $container = $drivers->addContainer($driver->getCode());
         $container->setCurrentGroup($form->addGroup($driver->getName())->setOption('id', 'form-' . $driver->getCode()));
         $driver->configureOptionsContainer($container);
     }
     $form->addGroup();
     $form->addSaveButton('Save');
 }