本文整理汇总了PHP中Venne\Forms\Form::addSaveButton方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::addSaveButton方法的具体用法?PHP Form::addSaveButton怎么用?PHP Form::addSaveButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Venne\Forms\Form
的用法示例。
在下文中一共展示了Form::addSaveButton方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure
/**
* @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');
}
示例2: configure
/**
* @param Form $form
*/
public function configure(Form $form)
{
$form->addTextWithSelect('name', 'Name')->setItems(array('English', 'Deutsch', 'Čeština'), false)->setOption('description', '(english, deutsch,...)')->addRule($form::FILLED, 'Please set name');
$form->addTextWithSelect('short', 'Short')->setItems(array('en', 'de', 'cs'), false)->setOption('description', '(en, de,...)')->addRule($form::FILLED, 'Please set short');
$form->addTextWithSelect('alias', 'Alias')->setItems(array('en', 'de', 'cs', 'www'), false)->setOption('description', '(www, en, de,...)')->addRule($form::FILLED, 'Please set alias');
$form->addSaveButton('Save');
}
示例3: configure
/**
* @param Form $form
*/
public function configure(Form $form)
{
$container = $form->addContainer('_inputs');
$container->setCurrentGroup($form->addGroup());
$container->addText('_email', 'E-mail')->addRule($form::EMAIL)->setRequired(true);
$container->addText('_name', 'Name')->setRequired(true);
foreach ($form->data->inputs as $key => $input) {
if ($input->getType() === InputEntity::TYPE_GROUP) {
$container->setCurrentGroup($form->addGroup($input->getLabel()));
continue;
}
$control = $container->add($input->getType(), 'input_' . $key, $input->getLabel());
if ($input->required) {
$control->setRequired(true);
}
if (in_array($input->getType(), array(InputEntity::TYPE_SELECT, InputEntity::TYPE_CHECKBOX_LIST, InputEntity::TYPE_RADIO_LIST))) {
$items = array();
foreach ($input->getItems() as $item) {
$items[$item] = $item;
}
$control->setItems($items);
}
}
$form->addGroup();
$form->addSaveButton('Send');
}
示例4: configure
/**
* @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');
}
示例5: configure
/**
* @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');
}
示例6: configure
public function configure(Form $form)
{
$form->addGroup('Nastavení API');
$form->addText('accountNumber', 'Číslo účtu');
$form->setCurrentGroup();
$form->addSaveButton('Save');
}
示例7: configure
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');
}
示例8: configure
/**
* @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');
}
示例9: configure
/**
* @param Form $form
*/
public function configure(Venne\Forms\Form $form)
{
$form->addGroup('Template');
$form->addTextArea('template', 'Product template')->getControlPrototype()->attrs['class'] = 'input-block-level';
$form->addMailform('mailform');
$form->addSaveButton('Save');
}
示例10: configure
/**
* @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');
}
示例11: configure
/**
* @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');
}
示例12: configure
/**
* @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');
}
示例13: configure
/**
* @param Form $form
*/
public function configure(Form $form)
{
$form->addGroup('Settings');
$form->addText('itemsPerPage', 'Items per page');
$form->setCurrentGroup();
$form->addSaveButton('Save');
}
示例14: configure
/**
* @param Form $form
*/
protected function configure(Form $form)
{
$group = $form->addGroup('Registration');
$userTypes = array();
foreach ($this->securityManager->getUserTypes() as $name => $val) {
$userTypes[$name] = $val->getName();
}
$registrations = $form->addDynamic('registrations', function (Container $registration) use($form, $group, $userTypes) {
$group = $form->addGroup('Registration');
$registration->setCurrentGroup($group);
$registration->addCheckbox('enabled', 'Enabled')->addCondition($form::EQUAL, TRUE)->toggle('reg-' . $registration->name);
$registration->setCurrentGroup($registration->form->addGroup()->setOption('id', 'reg-' . $registration->name));
$registration->addText('name', 'Name');
$registration->addSelect('userType', 'Type', $userTypes);
$registration->addSelect('mode', 'Mode', PageEntity::getModes())->addCondition($form::IS_IN, array(PageEntity::MODE_MAIL, PageEntity::MODE_MAIL_CHECKUP))->toggle('email-' . $registration->name);
$registration->addSelect('loginProviderMode', 'Login provider mode', PageEntity::getSocialModes());
$registration->addMultiSelect('roles', 'Roles', $this->getRoles());
$email = $registration->addContainer('email');
$email->setCurrentGroup($form->addGroup()->setOption('id', 'email-' . $registration->name));
$email->addText('subject', 'Subject');
$email->addText('sender', 'Sender');
$email->addText('from', 'From');
$email->addTextArea('text', 'Text');
$registration->addSubmit('_remove', 'Remove')->addRemoveOnClick();
}, 1);
$registrations->setCurrentGroup($group);
$registrations->addSubmit('_add', 'Add')->addCreateOnClick();
$form->setCurrentGroup();
$form->addSaveButton('Save');
}
示例15: configure
/**
* @param Form $form
*/
protected function configure(Form $form)
{
$account = $form->addContainer('account');
$account->setCurrentGroup($form->addGroup("Account"));
$account->addCheckbox('activated', 'Activate')->addCondition($form::EQUAL, TRUE)->toggle('form-account-accountId');
$account->setCurrentGroup($form->addGroup()->setOption('id', 'form-account-accountId'));
$account->addText('accountId', 'Account ID');
$api = $form->addContainer('api');
$api->setCurrentGroup($form->addGroup('Access by API'));
$api->addCheckbox('activated', 'Activate')->addCondition($form::EQUAL, TRUE)->toggle('form-api');
$api->setCurrentGroup($form->addGroup()->setOption('id', 'form-api'));
$api->addText('applicationName', 'Application name');
$api->addText('clientId', 'Client ID')->getControlPrototype()->class[] = 'span12';
$api->addText('clientMail', 'Client mail')->getControlPrototype()->class[] = 'span12';
$gaId = $api->addText('gaId', 'GA ID or URL');
$gaId->getControlPrototype()->class[] = 'span12';
$gaId->getControlPrototype()->onChange[] = 'if ($(this).val().length > 20) { var url = $(this).val().split("p"); url = url[url.length - 1]; if(url.substr(url.length -1 , 1) == "/") { url = url.substr(0, url.length - 1); } $(this).val(url); }';
if (file_exists($this->googleanalyticsDir . '/key.p12')) {
$api->addCheckbox('keyFileNew', 'Change private key')->addCondition($form::EQUAL, TRUE)->toggle('group-keyFile');
}
$api->setCurrentGroup($form->addGroup()->setOption('id', 'group-keyFile'));
$api->addUpload('keyFile', 'Private key');
$form->addGroup();
$form->addSaveButton('Save');
}