public function renderForm() { if (!$this->loadObject(true)) { if (Validate::isLoadedObject($this->object)) { $this->display = 'edit'; } else { $this->display = 'add'; } } $this->initToolbar(); $this->initPageHeaderToolbar(); //$id_leoblogcat = (int) (Tools::getValue('id_leoblogcat')); //$obj = new leoblogcat($id_leoblogcat); //$tree = $obj->getTree(); //$menus = $obj->getDropdown(null, $obj->id_parent); $blog = new LeoBlogBlog($this->object->id_leoblog_blog, $this->context->language->id); $this->multiple_fieldsets = true; $this->object->blog_title = $blog->meta_title; $this->fields_form[0]['form'] = array('tinymce' => true, 'legend' => array('title' => $this->l('Blog Form'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'hidden', 'label' => $this->l('Comment ID'), 'name' => 'id_comment'), array('type' => 'text', 'label' => $this->l('Blog Title'), 'name' => 'blog_title'), array('type' => 'text', 'label' => $this->l('User'), 'name' => 'user'), array('type' => 'text', 'label' => $this->l('Email'), 'name' => 'email'), array('type' => 'textarea', 'label' => $this->l('Blog Content'), 'name' => 'comment', 'rows' => 5, 'cols' => 40, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'switch', 'label' => $this->l('Displayed:'), 'name' => 'active', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('Disabled'))))), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default')); $this->tpl_form_vars = array('active' => $this->object->active, 'PS_ALLOW_ACCENTED_CHARS_URL', (int) Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL')); $html = ' <script type="text/javascript"> var PS_ALLOW_ACCENTED_CHARS_URL = ' . (int) Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL') . '; </script> '; return $html . parent::renderForm(); }
public function renderForm() { if (!$this->loadObject(true)) { if (Validate::isLoadedObject($this->object)) { $this->display = 'edit'; } else { $this->display = 'add'; } } $this->initToolbar(); $this->initPageHeaderToolbar(); $this->multiple_fieldsets = true; $this->fields_form[0]['form'] = array('tinymce' => true, 'legend' => array('title' => $this->l('Citys'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'hidden', 'label' => $this->l('id'), 'name' => 'id_egms_city'), array('type' => 'text', 'label' => $this->l('cityname1'), 'name' => 'cityname1', 'required' => true, 'hint' => $this->l('cityname1')), array('type' => 'text', 'label' => $this->l('cityname2'), 'name' => 'cityname2', 'required' => true, 'hint' => $this->l('cityname2')), array('type' => 'text', 'label' => $this->l('cityname3'), 'name' => 'cityname3', 'required' => true, 'hint' => $this->l('cityname3')), array('type' => 'text', 'label' => $this->l('psyname'), 'name' => 'psyname', 'hint' => $this->l('psyname')), array('type' => 'text', 'label' => $this->l('alias'), 'name' => 'alias', 'hint' => $this->l('alias'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default pull-right')); $this->tpl_form_vars = array('fields_value' => $this->getFieldsValues()); return parent::renderForm(); }
public function renderForm() { $this->fields_form = array('legend' => array('title' => $this->module->l('Product type', 'AdminNowProductType'), 'icon' => 'icon-money'), 'input' => array(array('type' => 'text', 'label' => $this->module->l('Name', 'AdminNowProductType'), 'name' => 'name', 'required' => true, 'lang' => true), array('type' => 'text', 'label' => $this->module->l('Button name', 'AdminNowProductType'), 'name' => 'button_name', 'required' => true, 'lang' => true), array('type' => 'select', 'label' => $this->module->l('Type de page', 'AdminNowProductType'), 'name' => 'type', 'required' => true, 'default_value' => 'CONTENT', 'options' => array('query' => array(array('id' => 'CONTENT', 'name' => $this->module->l('Contenu', 'AdminNowProductType')), array('id' => 'BUTTON', 'name' => $this->module->l('Bouton', 'AdminNowProductType'))), 'id' => 'id', 'name' => 'name')), array('type' => 'switch', 'label' => $this->module->l('Enable', 'AdminNowProductType'), 'name' => 'active', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowProductType')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowProductType'))))), 'submit' => array('title' => $this->module->l('Save', 'AdminNowProductType'))); return parent::renderForm(); }
public function renderForm() { if (!$this->loadObject(true)) { if (Validate::isLoadedObject($this->object)) { $this->display = 'edit'; } else { $this->display = 'add'; } } $this->initToolbar(); $this->initPageHeaderToolbar(); $id_leoblogcat = (int) Tools::getValue('id_leoblogcat'); $obj = new leoblogcat($id_leoblogcat); // $tree = $obj->getTree(); # validate module $obj->getTree(); $menus = $obj->getDropdown(null, $obj->id_parent); if ($this->object->image) { # validate module $thumb = __PS_BASE_URI__ . 'modules/leoblog/views/img/b/' . $this->object->image; } else { # validate module $thumb = ''; } $this->multiple_fieldsets = true; $this->fields_form[0]['form'] = array('tinymce' => true, 'legend' => array('title' => $this->l('Blog Form'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'select', 'label' => $this->l('Category'), 'name' => 'id_leoblogcat', 'options' => array('query' => $menus, 'id' => 'id', 'name' => 'title'), 'default' => $id_leoblogcat), array('type' => 'text', 'label' => $this->l('Meta title:'), 'name' => 'meta_title', 'id' => 'name', 'lang' => true, 'required' => true, 'class' => 'copyMeta2friendlyURL', 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'text', 'label' => $this->l('Friendly URL'), 'name' => 'link_rewrite', 'required' => true, 'lang' => true, 'hint' => $this->l('Only letters and the minus (-) character are allowed')), array('type' => 'tags', 'label' => $this->l('Tags'), 'name' => 'tags', 'lang' => true, 'hint' => array($this->l('Invalid characters:') . ' <>;=#{}', $this->l('To add "tags" click in the field, write something, and then press "Enter."'))), array('type' => 'file', 'label' => $this->l('Image'), 'name' => 'image', 'display_image' => true, 'default' => '', 'desc' => $this->l(''), 'thumb' => $thumb), array('type' => 'textarea', 'label' => $this->l('Video Code'), 'name' => 'video_code', 'rows' => 5, 'cols' => 30, 'hint' => $this->l('Enter Video Code Copying From Youtube, Vimeo') . ' <>;=#{}'), array('type' => 'textarea', 'label' => $this->l('Blog description'), 'name' => 'description', 'autoload_rte' => true, 'lang' => true, 'rows' => 5, 'cols' => 30, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'textarea', 'label' => $this->l('Blog Content'), 'name' => 'content', 'autoload_rte' => true, 'lang' => true, 'rows' => 5, 'cols' => 40, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'switch', 'label' => $this->l('Indexation (by search engines):'), 'name' => 'indexation', 'required' => false, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'indexation_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'indexation_off', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => 'switch', 'label' => $this->l('Displayed:'), 'name' => 'active', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('Disabled'))))), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default pull-right')); $this->fields_form[1]['form'] = array('tinymce' => true, 'legend' => array('title' => $this->l('SEO'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'textarea', 'label' => $this->l('Meta description'), 'name' => 'meta_description', 'lang' => true, 'cols' => 40, 'rows' => 10, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'tags', 'label' => $this->l('Meta keywords'), 'name' => 'meta_keywords', 'lang' => true, 'hint' => array($this->l('Invalid characters:') . ' <>;=#{}', $this->l('To add "tags" click in the field, write something, and then press "Enter."'))))); /* if (Shop::isFeatureActive()) { $this->fields_form['input'][] = array( 'type' => 'shop', 'label' => $this->l('Shop association:'), 'name' => 'checkBoxShopAsso', ); } */ $this->tpl_form_vars = array('active' => $this->object->active, 'PS_ALLOW_ACCENTED_CHARS_URL', (int) Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL')); $html = ' <script type="text/javascript"> var PS_ALLOW_ACCENTED_CHARS_URL = ' . (int) Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL') . '; </script> '; return $html . parent::renderForm(); }
/** * @return mixed */ public function renderform() { $this->fields_form = array('legend' => array('title' => $this->module->l('Add or Update a delivery time rule', 'AdminNowDeliveryTime'), 'icon' => 'icon-settings'), 'input' => array(array('type' => 'select', 'label' => $this->module->l('Carrier', 'AdminNowDeliveryTime'), 'name' => 'id_carrier', 'required' => true, 'options' => array('query' => Carrier::getCarriers(Context::getContext()->language->id, true), 'id' => 'id_carrier', 'name' => 'name')), array('type' => 'switch', 'label' => $this->module->l('Saturday shipping', 'AdminNowDeliveryTime'), 'name' => 'saturday_shipping', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowDeliveryTime')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowDeliveryTime')))), array('type' => 'switch', 'label' => $this->module->l('Sunday shipping', 'AdminNowDeliveryTime'), 'name' => 'sunday_shipping', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowDeliveryTime')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowDeliveryTime')))), array('type' => 'switch', 'label' => $this->module->l('Shipping holidays', 'AdminNowDeliveryTime'), 'name' => 'shipping_holidays', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowDeliveryTime')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowDeliveryTime')))), array('type' => 'switch', 'label' => $this->module->l('Saturday delivery', 'AdminNowDeliveryTime'), 'name' => 'saturday_delivery', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowDeliveryTime')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowDeliveryTime')))), array('type' => 'switch', 'label' => $this->module->l('Sunday delivery', 'AdminNowDeliveryTime'), 'name' => 'sunday_delivery', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowDeliveryTime')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowDeliveryTime')))), array('type' => 'switch', 'label' => $this->module->l('Delivery holidays', 'AdminNowDeliveryTime'), 'name' => 'delivery_holidays', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowDeliveryTime')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowDeliveryTime')))), array('type' => 'text', 'label' => $this->module->l('Minimum day', 'AdminNowDeliveryTime'), 'name' => 'day_min', 'required' => true, 'suffix' => $this->module->l('days', 'AdminNowDeliveryTime')), array('type' => 'text', 'label' => $this->module->l('Maximum day', 'AdminNowDeliveryTime'), 'name' => 'day_max', 'required' => true, 'suffix' => $this->module->l('days', 'AdminNowDeliveryTime')), array('type' => 'textarea', 'label' => $this->module->l('Description', 'AdminNowDeliveryTime'), 'name' => 'description', 'lang' => true), array('type' => 'textarea', 'label' => $this->module->l('Timeslot', 'AdminNowDeliveryTime'), 'name' => 'timeslot', 'lang' => true)), 'submit' => array('title' => $this->module->l('Save', 'AdminNowDeliveryTime'))); return parent::renderForm(); }
public function renderForm() { if (!$this->loadObject(true)) { if (Validate::isLoadedObject($this->object)) { $this->display = 'edit'; } else { $this->display = 'add'; } } $this->initToolbar(); $this->initPageHeaderToolbar(); $this->multiple_fieldsets = true; $soption = array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('Disabled'))); $this->fields_form[0]['form'] = array('tinymce' => true, 'legend' => array('title' => $this->l('Shops by Citys'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'hidden', 'label' => $this->l('id'), 'name' => 'id_egms_cu'), array('type' => 'select', 'label' => $this->l('Citys'), 'name' => 'id_city', 'required' => true, 'options' => array('query' => $this->citys, 'id' => 'id', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Shop URL'), 'name' => 'id_shop_url', 'required' => true, 'options' => array('query' => $this->urls, 'id' => 'id', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('veryf_yandex'), 'name' => 'veryf_yandex', 'hint' => $this->l('veryf_yandex')), array('type' => 'text', 'label' => $this->l('veryf_google'), 'name' => 'veryf_google', 'hint' => $this->l('veryf_google')), array('type' => 'text', 'label' => $this->l('veryf_mail'), 'name' => 'veryf_mail', 'hint' => $this->l('veryf_mail')), array('type' => 'text', 'label' => $this->l('phone'), 'name' => 'phone', 'hint' => $this->l('phone')), array('type' => 'switch', 'label' => $this->l('Is Active'), 'name' => 'active', 'values' => $soption, 'default' => '1'), array('type' => 'checkbox', 'label' => $this->l('Manufacturers'), 'multiple' => true, 'name' => 'manufacturer', 'hint' => $this->l('Manufacturers hint'), 'desc' => $this->l('Manufacturers'), 'values' => array('query' => $this->manufacturers, 'id' => 'id', 'name' => 'name'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default pull-right')); $this->tpl_form_vars = array('fields_value' => $this->getFieldsValues()); return parent::renderForm(); }
/** * @return mixed */ public function renderform() { $this->fields_form = array('legend' => array('title' => $this->module->l('Add or Update holidays date or public holidays date', 'AdminNowHolidays'), 'icon' => 'icon-settings'), 'input' => array(array('type' => 'text', 'label' => $this->module->l('Evenment name', 'AdminNowHolidays'), 'required' => true, 'name' => 'evenment_name'), array('type' => 'select', 'label' => $this->module->l('Type', 'AdminNowHolidays'), 'name' => 'type', 'required' => true, 'options' => array('query' => array(array('id' => NowHolidays::PUBLIC_HOLIDAYS, 'name' => $this->module->l('Public holidays', 'AdminNowHolidays')), array('id' => NowHolidays::HOLIDAYS, 'name' => $this->module->l('Holidays', 'AdminNowHolidays'))), 'id' => 'id', 'name' => 'name')), array('type' => 'date', 'label' => $this->module->l('Start date', 'AdminNowHolidays'), 'required' => true, 'name' => 'date_start'), array('type' => 'date', 'label' => $this->module->l('End date', 'AdminNowHolidays'), 'required' => true, 'name' => 'date_end'), array('type' => 'switch', 'label' => $this->module->l('Preparation', 'AdminNowHolidays'), 'hint' => $this->module->l('Indicate whether the preparation of orders not will be carried out over this period', 'AdminNowHolidays'), 'name' => 'preparation', 'required' => true, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowHolidays')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowHolidays')))), array('type' => 'switch', 'label' => $this->module->l('Shipping', 'AdminNowHolidays'), 'hint' => $this->module->l('Indicate whether the shipment of orders not will be carried out over this period', 'AdminNowHolidays'), 'name' => 'shipping', 'required' => true, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowHolidays')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowHolidays')))), array('type' => 'switch', 'label' => $this->module->l('Delivery', 'AdminNowHolidays'), 'hint' => $this->module->l('Indicate whether the delivery of orders not will be carried out over this period', 'AdminNowHolidays'), 'name' => 'delivery', 'required' => true, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowHolidays')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowHolidays'))))), 'submit' => array('title' => $this->module->l('Save', 'AdminNowHolidays'))); return parent::renderForm(); }