Exemplo n.º 1
5
 public function renderForm()
 {
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Homepage categories'), 'icon' => ''), 'input' => array(array('type' => 'cat_choice', 'label' => '', 'name' => 'cats')), 'submit' => array('name' => 'submitBlockhomecats', 'title' => $this->l('Save'))));
     $lang = $this->context->language;
     if ($selectedCats = Configuration::get('MOD_BLOCKHOMECATS_CATS')) {
         $selectedCats = explode(',', $selectedCats);
         foreach ($selectedCats as $index => $id_category) {
             $selectedCats[$index] = new Category($id_category, $this->context->language->id);
         }
     } else {
         $selectedCats = null;
     }
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $helper->module = $this;
     $helper->identifier = 'id_blocklink';
     $helper->submit_action = 'submit';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->fields_value = array('text' => 'text');
     $categories = Category::getNestedCategories(2, $this->context->language->id, false);
     $helper->tpl_vars = array('allCats' => $this->getAllCats(current($categories)), 'selectedCats' => $selectedCats);
     return $helper->generateForm(array($fields_form));
 }
 public function renderConfigurationForm()
 {
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $langs = Language::getLanguages();
     $id_shop = (int) $this->context->shop->id;
     foreach ($langs as $key => $language) {
         $options[] = array('id_option' => $language['id_lang'], 'name' => $language['name']);
     }
     $cats = $this->getCategories($lang->id, true, $id_shop);
     $categories[] = array('id_option' => 99999, 'name' => 'All');
     foreach ($cats as $key => $cat) {
         $categories[] = array('id_option' => $cat['id_category'], 'name' => $cat['name']);
     }
     $inputs = array(array('type' => 'select', 'label' => $this->l('Language'), 'desc' => $this->l('Choose a language you wish to export'), 'name' => 'export_language', 'class' => 't', 'options' => array('query' => $options, 'id' => 'id_option', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('Delimiter'), 'name' => 'export_delimiter', 'value' => ',', 'desc' => $this->l('The character to separate the fields')), array('type' => 'radio', 'label' => $this->l('Export active products?'), 'name' => 'export_active', 'values' => array(array('id' => 'active_off', 'value' => 0, 'label' => 'no, export all products.'), array('id' => 'active_on', 'value' => 1, 'label' => 'yes, export only active products')), 'is_bool' => true), array('type' => 'select', 'label' => $this->l('Product Category'), 'desc' => $this->l('Choose a product category you wish to export'), 'name' => 'export_category', 'class' => 't', 'options' => array('query' => $categories, 'id' => 'id_option', 'name' => 'name')));
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Export Options'), 'icon' => 'icon-cogs'), 'input' => $inputs, 'submit' => array('title' => $this->l('Export'))));
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $this->fields_form = array();
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitExport';
     $helper->currentIndex = self::$currentIndex;
     $helper->token = Tools::getAdminTokenLite('AdminExportProducts');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form));
 }
Exemplo n.º 3
0
 public function displayForm()
 {
     // Get default Language
     $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
     // Init Fields form array
     $fields_form[0]['form'] = array('legend' => array('title' => $this->l('Product Update')), 'input' => array(array('type' => 'text', 'label' => $this->l('List'), 'name' => 'PRODUCTUPDATE_LIST', 'size' => 20, 'required' => true)), 'submit' => array('title' => $this->l('Update'), 'class' => 'button'));
     $helper = new HelperForm();
     // Module, t    oken and currentIndex
     $helper->module = $this;
     $helper->name_controller = $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
     // Language
     $helper->default_form_language = $default_lang;
     $helper->allow_employee_form_lang = $default_lang;
     // Title and toolbar
     $helper->title = $this->displayName;
     $helper->show_toolbar = true;
     // false -> remove toolbar
     $helper->toolbar_scroll = true;
     // yes - > Toolbar is always visible on the top of the screen.
     $helper->submit_action = 'submit' . $this->name;
     $helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
     // Load current value
     $helper->fields_value['PRODUCTUPDATE_LIST'] = Configuration::get('PRODUCTUPDATE_LIST');
     return $helper->generateForm($fields_form);
 }
 public function displayForm()
 {
     // Get default language
     $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
     // Init Fields form array
     $fields_form[0]['form'] = array('legend' => array('title' => $this->l('Ustawienia Integracyjne')), 'input' => array(array('type' => 'text', 'label' => $this->l('Hash sklepu w Shopconnector'), 'name' => 'SHOPCONNECTORMODULE_HASH', 'size' => 20, 'required' => true)), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     $helper = new HelperForm();
     if (!extension_loaded('mcrypt')) {
         echo '<div style="padding: 20px; text-align: center; background-color: yellow; font-weight: bold;">Do poprawnego działania wtyczki ShopConnector wymagane jest zainstalowanie rozszerzenia PHP mcrypt.</div>';
     }
     // Module, token and currentIndex
     $helper->module = $this;
     $helper->name_controller = $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
     // Language
     $helper->default_form_language = $default_lang;
     $helper->allow_employee_form_lang = $default_lang;
     // Title and toolbar
     $helper->title = $this->displayName;
     $helper->show_toolbar = true;
     // false -> remove toolbar
     $helper->toolbar_scroll = true;
     // yes - > Toolbar is always visible on the top of the screen.
     $helper->submit_action = 'submit' . $this->name;
     $helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
     // Load current value
     $helper->fields_value['SHOPCONNECTORMODULE_HASH'] = Configuration::get('SHOPCONNECTORMODULE_HASH');
     return $helper->generateForm($fields_form);
 }
Exemplo n.º 5
0
 public function renderForm()
 {
     $root_category = Category::getRootCategory();
     $root_category = array('id_category' => $root_category->id, 'name' => $root_category->name);
     $cats = array();
     if ($c = Configuration::get('yamarket_с_categories')) {
         $uc = unserialize($c);
         if (is_array($uc)) {
             $cats = $uc;
         }
     }
     $this->fields_form[0]['form'] = array('legend' => array('title' => $this->l('Settings'), 'image' => _PS_ADMIN_IMG_ . 'information.png'), 'input' => array(array('type' => 'text', 'label' => $this->l('Shop Name'), 'desc' => $this->l('Shop name in yandex market'), 'name' => 'yamarket_с_shop'), array('type' => 'text', 'label' => $this->l('Сompany name'), 'desc' => $this->l('Your company name'), 'name' => 'yamarket_с_company'), array('type' => 'text', 'label' => $this->l('Shipping cost'), 'desc' => $this->l('Shipping cost in shop region'), 'name' => 'yamarket_с_shippingcost'), array('type' => 'text', 'label' => $this->l('Information'), 'desc' => $this->l('Information about minimal order cost, minimal product quantity or prepayment'), 'name' => 'yamarket_с_info'), array('type' => 'switch', 'label' => $this->l('Gzip compression'), 'desc' => $this->l('Compress export file'), 'name' => 'yamarket_с_gzip', 'values' => array(array('id' => 'yamarket_с_gzip_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'yamarket_с_gzip_off', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => 'switch', 'label' => $this->l('Combinations'), 'desc' => $this->l('Export combinations'), 'name' => 'yamarket_с_combinations', 'values' => array(array('id' => 'yamarket_с_combinations_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'yamarket_с_combinations_off', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => 'checkbox', 'label' => $this->l('Shipping'), 'desc' => $this->l('Delivery, pickup and store'), 'name' => 'yamarket_с_shipping', 'is_bool' => false, 'values' => array('id' => 'id', 'name' => 'label', 'query' => array(array('id' => '[1]', 'val' => 1, 'label' => $this->l('Delivery availability')), array('id' => '[2]', 'val' => 1, 'label' => $this->l('Pickup in store availability')), array('id' => '[3]', 'val' => 1, 'label' => $this->l('Can buy in Store'))))), array('type' => 'switch', 'label' => $this->l('Currencies'), 'desc' => $this->l('If not checked will be used default currency'), 'name' => 'yamarket_с_currencies', 'values' => array(array('id' => 'yamarket_с_currencies_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'yamarket_с_currencies_off', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => 'radio', 'label' => $this->l('Availability'), 'desc' => $this->l('Product availability'), 'name' => 'yamarket_с_availability', 'is_bool' => false, 'values' => array(array('id' => 'yamarket_с_availability_0', 'value' => 0, 'label' => $this->l('All avaible')), array('id' => 'yamarket_с_availability_1', 'value' => 1, 'label' => $this->l('If quantity >0, then avaible, else on request')), array('id' => 'yamarket_с_availability_2', 'value' => 2, 'label' => $this->l('If quantity = 0, product not exported')), array('id' => 'yamarket_с_availability_3', 'value' => 3, 'label' => $this->l('All on request')))), array('type' => 'categories', 'label' => $this->l('Categories'), 'desc' => $this->l('Categories to export. If necessary, subcategories must be checked too.'), 'name' => 'yamarket_с_categories', 'tree' => array('use_search' => false, 'id' => 'categoryBox', 'use_checkbox' => true, 'selected_categories' => $cats))), 'submit' => array('name' => 'submityamarket_с', 'title' => $this->l('Save')));
     $this->fields_form[1]['form'] = array('legend' => array('title' => $this->l('Yandex Market configuration information'), 'image' => _PS_ADMIN_IMG_ . 'information.png'), 'input' => array(array('type' => 'text', 'label' => $this->l('Static url'), 'desc' => $this->l('URL to download file generated by cron or Export button.'), 'name' => 'url1'), array('type' => 'text', 'label' => $this->l('Dinamic url'), 'desc' => $this->l('URL to download dinamicaly generated export file.'), 'name' => 'url2'), array('type' => 'text', 'label' => $this->l('Cron url'), 'desc' => $this->l('URL to regenerate export file by cron.'), 'name' => 'url3')));
     $helper = new HelperForm();
     $helper->module = $this;
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submityamarket_с';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm($this->fields_form);
 }
 public function renderForm()
 {
     $fields_form = array('form' => array('legend' => array('title' => $this->trans('Settings', array(), 'Admin.Global'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'text', 'label' => $this->trans('Facebook URL', array(), 'Modules.SocialFollow.Admin'), 'name' => 'blocksocial_facebook', 'desc' => $this->trans('Your Facebook fan page.', array(), 'Modules.SocialFollow.Admin')), array('type' => 'text', 'label' => $this->trans('Twitter URL', array(), 'Modules.SocialFollow.Admin'), 'name' => 'blocksocial_twitter', 'desc' => $this->trans('Your official Twitter account.', array(), 'Modules.SocialFollow.Admin')), array('type' => 'text', 'label' => $this->trans('RSS URL', array(), 'Modules.SocialFollow.Admin'), 'name' => 'blocksocial_rss', 'desc' => $this->trans('The RSS feed of your choice (your blog, your store, etc.).', array(), 'Modules.SocialFollow.Admin')), array('type' => 'text', 'label' => $this->trans('YouTube URL', array(), 'Modules.SocialFollow.Admin'), 'name' => 'blocksocial_youtube', 'desc' => $this->trans('Your official YouTube account.', array(), 'Modules.SocialFollow.Admin')), array('type' => 'text', 'label' => $this->trans('Google+ URL:', array(), 'Modules.SocialFollow.Admin'), 'name' => 'blocksocial_google_plus', 'desc' => $this->trans('Your official Google+ page.', array(), 'Modules.SocialFollow.Admin')), array('type' => 'text', 'label' => $this->trans('Pinterest URL:', array(), 'Modules.SocialFollow.Admin'), 'name' => 'blocksocial_pinterest', 'desc' => $this->trans('Your official Pinterest account.', array(), 'Modules.SocialFollow.Admin')), array('type' => 'text', 'label' => $this->trans('Vimeo URL:', array(), 'Modules.SocialFollow.Admin'), 'name' => 'blocksocial_vimeo', 'desc' => $this->trans('Your official Vimeo account.', array(), 'Modules.SocialFollow.Admin')), array('type' => 'text', 'label' => $this->trans('Instagram URL:', array(), 'Modules.SocialFollow.Admin'), 'name' => 'blocksocial_instagram', 'desc' => $this->trans('Your official Instagram account.', array(), 'Modules.SocialFollow.Admin'))), 'submit' => array('title' => $this->trans('Save', array(), 'Admin.Global'))));
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $helper->submit_action = 'submitModule';
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues());
     return $helper->generateForm(array($fields_form));
 }
 public function counterForm()
 {
     $fields_form[0]['form'] = array('legend' => array('title' => $this->l('Counter')), 'input' => array(array('type' => 'file', 'label' => $this->l('Vos fichier'), 'name' => 'file', 'required' => true)), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default pull-right'));
     $helper = new HelperForm();
     $helper->module = $this->module;
     $helper->token = Tools::getValue('token');
     $helper->title = 'Counter of files';
     $helper->submit_action = 'submitFileCounter';
     return $helper->generateForm($fields_form);
 }
Exemplo n.º 8
0
 public function renderForm()
 {
     $inputs = array(array('name' => 'MYMOD_CA_EMAIL', 'label' => $this->module->l('E-mail'), 'type' => 'text'), array('name' => 'MYMOD_CA_TOKEN', 'label' => $this->module->l('Token'), 'type' => 'text'));
     $fields_form = array('form' => array('legend' => array('title' => $this->module->l('My Module configuration'), 'icon' => 'icon-wrench'), 'input' => $inputs, 'submit' => array('title' => $this->module->l('Save'))));
     $helper = new HelperForm();
     $helper->table = 'mymodcarrier';
     $helper->default_form_language = (int) Configuration::get('PS_LANG_DEFAULT');
     $helper->allow_employee_form_lang = (int) Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG');
     $helper->submit_action = 'mymodcarrier_form';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->module->name . '&tab_module=' . $this->module->tab . '&module_name=' . $this->module->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => array('MYMOD_CA_EMAIL' => Tools::getValue('MYMOD_CA_EMAIL', Configuration::get('MYMOD_CA_EMAIL')), 'MYMOD_CA_TOKEN' => Tools::getValue('MYMOD_CA_TOKEN', Configuration::get('MYMOD_CA_TOKEN'))), 'languages' => $this->context->controller->getLanguages());
     return $helper->generateForm(array($fields_form));
 }
Exemplo n.º 9
0
 public function renderForm()
 {
     $inputs = array(array('name' => 'MYMOD_CH_ORDER', 'label' => $this->module->l('Check order'), 'type' => 'text'), array('name' => 'MYMOD_CH_ADDRESS', 'label' => $this->module->l('Check address'), 'type' => 'textarea'), array('name' => 'MYMOD_BA_OWNER', 'label' => $this->module->l('Bankwire owner'), 'type' => 'text'), array('name' => 'MYMOD_BA_DETAILS', 'label' => $this->module->l('Bankwire details'), 'type' => 'textarea'), array('name' => 'MYMOD_API_URL', 'label' => $this->module->l('API URL'), 'type' => 'text'), array('name' => 'MYMOD_API_CRED_ID', 'label' => $this->module->l('API credentials ID'), 'type' => 'text'), array('name' => 'MYMOD_API_CRED_SALT', 'label' => $this->module->l('API credentials SALT'), 'type' => 'text'));
     $fields_form = array('form' => array('legend' => array('title' => $this->module->l('My Module configuration'), 'icon' => 'icon-wrench'), 'input' => $inputs, 'submit' => array('title' => $this->module->l('Save'))));
     $helper = new HelperForm();
     $helper->table = 'mymodpayment';
     $helper->default_form_language = (int) Configuration::get('PS_LANG_DEFAULT');
     $helper->allow_employee_form_lang = (int) Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG');
     $helper->submit_action = 'mymodpayment_form';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->module->name . '&tab_module=' . $this->module->tab . '&module_name=' . $this->module->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => array('MYMOD_CH_ORDER' => Tools::getValue('MYMOD_CH_ORDER', Configuration::get('MYMOD_CH_ORDER')), 'MYMOD_CH_ADDRESS' => Tools::getValue('MYMOD_CH_ADDRESS', Configuration::get('MYMOD_CH_ADDRESS')), 'MYMOD_BA_OWNER' => Tools::getValue('MYMOD_BA_OWNER', Configuration::get('MYMOD_BA_OWNER')), 'MYMOD_BA_DETAILS' => Tools::getValue('MYMOD_BA_DETAILS', Configuration::get('MYMOD_BA_DETAILS')), 'MYMOD_API_URL' => Tools::getValue('MYMOD_API_URL', Configuration::get('MYMOD_API_URL')), 'MYMOD_API_CRED_ID' => Tools::getValue('MYMOD_API_CRED_ID', Configuration::get('MYMOD_API_CRED_ID')), 'MYMOD_API_CRED_SALT' => Tools::getValue('MYMOD_API_CRED_SALT', Configuration::get('MYMOD_API_CRED_SALT'))), 'languages' => $this->context->controller->getLanguages());
     return $helper->generateForm(array($fields_form));
 }
 protected function renderForm()
 {
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $helper->module = $this;
     $helper->default_form_language = $this->context->language->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitDarwinpricingModule';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFormValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($this->getConfigForm()));
 }
Exemplo n.º 11
0
 public function displayForm()
 {
     $fields_form = array();
     // Get default language
     $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
     // Init Fields form array
     $fields_form[0]['form'] = array('legend' => array('title' => $this->l('Step 3: Connect Your LivePerson Account')), 'input' => array(array('type' => 'text', 'label' => $this->l('LiveEngage Account Number'), 'name' => 'LP_SITEID', 'size' => 20, 'required' => true)), 'submit' => array('title' => $this->l('Connect'), 'class' => 'button'));
     $helper = new HelperForm();
     // Module, token and currentIndex
     $helper->module = $this;
     $helper->name_controller = $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
     // Language
     $helper->default_form_language = $default_lang;
     $helper->allow_employee_form_lang = $default_lang;
     // Title and toolbar
     $helper->title = $this->displayName;
     $helper->show_toolbar = false;
     // false -> remove toolbar
     $helper->toolbar_scroll = false;
     // yes - > Toolbar is always visible on the top of the screen.
     $helper->submit_action = 'submit' . $this->name;
     // Load current value
     $helper->fields_value['LP_SITEID'] = Configuration::get('LP_SITEID');
     return $helper->generateForm($fields_form);
 }
 public function initRuleForm()
 {
     $this->fields_form[0]['form'] = array('legend' => array('title' => $this->l('New tax rule'), 'icon' => 'icon-money'), 'input' => array(array('type' => 'select', 'label' => $this->l('Country'), 'name' => 'country', 'id' => 'country', 'options' => array('query' => Country::getCountries($this->context->language->id), 'id' => 'id_country', 'name' => 'name', 'default' => array('value' => 0, 'label' => $this->l('All')))), array('type' => 'select', 'label' => $this->l('State'), 'name' => 'states[]', 'id' => 'states', 'multiple' => true, 'options' => array('query' => array(), 'id' => 'id_state', 'name' => 'name', 'default' => array('value' => 0, 'label' => $this->l('All')))), array('type' => 'hidden', 'name' => 'action'), array('type' => 'text', 'label' => $this->l('Zip/postal code range'), 'name' => 'zipcode', 'required' => false, 'hint' => $this->l('You can define a range of Zip/postal codes (e.g., 75000-75015) or simply use one Zip/postal code.')), array('type' => 'select', 'label' => $this->l('Behavior'), 'name' => 'behavior', 'required' => false, 'options' => array('query' => array(array('id' => 0, 'name' => $this->l('This tax only')), array('id' => 1, 'name' => $this->l('Combine')), array('id' => 2, 'name' => $this->l('One after another'))), 'id' => 'id', 'name' => 'name'), 'hint' => array($this->l('You must define the behavior if an address matches multiple rules:') . '<br>', $this->l('- This tax only: Will apply only this tax') . '<br>', $this->l('- Combine: Combine taxes (e.g.: 10% + 5% = 15%)') . '<br>', $this->l('- One after another: Apply taxes one after another (e.g.: 0 + 10% = 0 + 5% = 5.5)'))), array('type' => 'select', 'label' => $this->l('Tax'), 'name' => 'id_tax', 'required' => false, 'options' => array('query' => Tax::getTaxes((int) $this->context->language->id), 'id' => 'id_tax', 'name' => 'name', 'default' => array('value' => 0, 'label' => $this->l('No Tax'))), 'hint' => sprintf($this->l('(Total tax: %s)'), '9%')), array('type' => 'select', 'label' => $this->l('Grupos'), 'name' => 'id_group', 'required' => false, 'options' => array('query' => Group::getGroups($this->default_form_language, true), 'id' => 'id_group', 'name' => 'name', 'default' => array('value' => 0, 'label' => $this->l('Default'))), 'hint' => sprintf($this->l('(Total tax: %s)'), '9%')), array('type' => 'text', 'label' => $this->l('Description'), 'name' => 'description')), 'submit' => array('title' => $this->l('Save and stay'), 'stay' => true));
     if (!($obj = $this->loadObject(true))) {
         return;
     }
     $this->fields_value = array('action' => 'create_rule', 'id_tax_rules_group' => $obj->id, 'id_tax_rule' => '');
     $this->getlanguages();
     $helper = new HelperForm();
     $helper->override_folder = $this->tpl_folder;
     $helper->currentIndex = self::$currentIndex;
     $helper->token = $this->token;
     $helper->table = 'tax_rule';
     $helper->identifier = 'id_tax_rule';
     $helper->id = $obj->id;
     $helper->toolbar_scroll = true;
     $helper->show_toolbar = true;
     $helper->languages = $this->_languages;
     $helper->default_form_language = $this->default_form_language;
     $helper->allow_employee_form_lang = $this->allow_employee_form_lang;
     $helper->fields_value = $this->getFieldsValue($this->object);
     $helper->toolbar_btn['save_new_rule'] = array('href' => self::$currentIndex . '&amp;id_tax_rules_group=' . $obj->id . '&amp;action=create_rule&amp;token=' . $this->token, 'desc' => 'Save tax rule', 'class' => 'process-icon-save');
     $helper->submit_action = 'create_rule';
     return $helper->generateForm($this->fields_form);
 }
Exemplo n.º 13
0
 public function displayForm()
 {
     $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
     // Init Fields form array
     $fields_form[0]['form'] = array('legend' => array('title' => $this->l('Opciones')), 'input' => array(array('type' => 'text', 'label' => $this->l('Dirección de la Tienda'), 'name' => 'ADDRESS_SHOP', 'size' => 60, 'required' => false), array('type' => 'file', 'label' => $this->l('Background del pdf'), 'name' => 'PDFBAGROUND', 'desc' => $this->l('Seleciona el fichero para el backgroun del pdf.'), 'required' => false)), 'submit' => array('title' => $this->l('Guardar Configuracion'), 'class' => 'button'));
     $helper = new HelperForm();
     // Module, token and currentIndex
     $helper->module = $this;
     $helper->name_controller = $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
     // Language
     $helper->default_form_language = $default_lang;
     $helper->allow_employee_form_lang = $default_lang;
     // Title and toolbar
     $helper->title = $this->displayName;
     $helper->show_toolbar = true;
     // false -> remove toolbar
     $helper->toolbar_scroll = true;
     // yes - > Toolbar is always visible on the top of the screen.
     $helper->submit_action = 'submit' . $this->name;
     $helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
     $helper->fields_value['ADDRESS_SHOP'] = Configuration::get('ADDRESS_SHOP');
     return $helper->generateForm($fields_form);
 }
Exemplo n.º 14
0
 public function displayForm()
 {
     // Get default Language
     $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
     // Init Fields form array
     $fields_form[0]['form'] = array('legend' => array('title' => $this->l('Website Settings')), 'input' => array(array('type' => 'switch', 'label' => $this->l('Dynamic Price'), 'name' => 'PRODUCT_DYNAMIC_PRICE', 'id' => 'prd_dynamic_price', 'required' => false, 'class' => 't', 'is_bool' => true, 'hint' => $this->l('Enable to Calculate price as, web service cost + store product margin'), 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Dynamic Price')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('Static Price')))), array('type' => 'text', 'label' => $this->l('Set Profit Margin'), 'name' => 'PROFIT_MARGIN', 'size' => 20, 'required' => true), array('type' => 'switch', 'label' => $this->l('Orders to be confirm by manager'), 'name' => 'ADMIN_CONFIRM_ORDER', 'required' => false, 'class' => 't', 'is_bool' => true, 'hint' => $this->l('Enabled: Orders needs to be confirmed by manager before Approval'), 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('No')))), array('type' => 'text', 'label' => $this->l('Manager Email'), 'name' => 'ORDER_CNF_MANAGER_EMAIL', 'size' => 100, 'required' => false), array('type' => 'switch', 'label' => $this->l('Request A Sample'), 'name' => 'PRODUCT_REQUEST_SAMPLE', 'required' => false, 'class' => 't', 'is_bool' => true, 'hint' => $this->l('Enabled: To show request a sample button on product page'), 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('No')))), array('type' => 'switch', 'label' => $this->l('Product Download Button'), 'name' => 'PRODUCT_DOWNLOAD_BUTTON', 'required' => false, 'class' => 't', 'is_bool' => true, 'hint' => $this->l('Enabled: To show download button on product page'), 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('No')))), array('type' => 'text', 'label' => $this->l('Email for Request Sample/Quote'), 'name' => 'PRODUCT_REQUEST_EMAIL', 'size' => 100, 'required' => false)), 'submit' => array('title' => $this->l('Update'), 'class' => 'button'));
     $helper = new HelperForm();
     // Module, t    oken and currentIndex
     $helper->module = $this;
     $helper->name_controller = $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
     // Language
     $helper->default_form_language = $default_lang;
     $helper->allow_employee_form_lang = $default_lang;
     // Title and toolbar
     $helper->title = $this->displayName;
     $helper->show_toolbar = true;
     // false -> remove toolbar
     $helper->toolbar_scroll = true;
     // yes - > Toolbar is always visible on the top of the screen.
     $helper->submit_action = 'submit' . $this->name;
     $helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
     // Load current value
     $helper->fields_value['PROFIT_MARGIN'] = Configuration::get('PROFIT_MARGIN');
     $helper->fields_value['ADMIN_CONFIRM_ORDER'] = Configuration::get('ADMIN_CONFIRM_ORDER');
     $helper->fields_value['ORDER_CNF_MANAGER_EMAIL'] = Configuration::get('ORDER_CNF_MANAGER_EMAIL');
     $helper->fields_value['PRODUCT_DYNAMIC_PRICE'] = Configuration::get('PRODUCT_DYNAMIC_PRICE');
     $helper->fields_value['PRODUCT_REQUEST_SAMPLE'] = Configuration::get('PRODUCT_REQUEST_SAMPLE');
     $helper->fields_value['PRODUCT_DOWNLOAD_BUTTON'] = Configuration::get('PRODUCT_DOWNLOAD_BUTTON');
     $helper->fields_value['PRODUCT_REQUEST_EMAIL'] = Configuration::get('PRODUCT_REQUEST_EMAIL');
     return $helper->generateForm($fields_form);
 }
 public function displayForm()
 {
     // Get default language
     $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
     // Init Fields form array
     $fields_form[0]['form'] = array('legend' => array('title' => $this->l('Settings')), 'input' => array(array('type' => 'switch', 'label' => $this->l('Activate e-mail notification'), 'name' => 'BLA_ACTIV_EMAIL', 'is_bool' => true, 'values' => array(array('id' => 'BLA_ACTIV_EMAIL_ON', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'BLA_ACTIV_EMAIL_OFF', 'value' => 0, 'label' => $this->l('No')))), array('type' => 'text', 'label' => $this->l('E-mail for Notifications'), 'name' => 'BLA_EMAIL', 'size' => 20, 'required' => true)), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     // Select what you want to log
     $fields_form[1]['form'] = array('legend' => array('title' => $this->l('Select what you want to log')), 'input' => array(array('type' => 'switch', 'label' => $this->l('Log Carrier Update'), 'name' => 'BLA_ISLOG_CARUP', 'is_bool' => true, 'values' => array(array('id' => 'BLA_ISLOG_CARUP_ON', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'BLA_ISLOG_CARUP_OFF', 'value' => 0, 'label' => $this->l('No')))), array('type' => 'switch', 'label' => $this->l('Log Module Install'), 'name' => 'BLA_ISLOG_MODINST', 'is_bool' => true, 'values' => array(array('id' => 'BLA_ISLOG_MODINST_ON', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'BLA_ISLOG_MODINST_OFF', 'value' => 0, 'label' => $this->l('No')))), array('type' => 'switch', 'label' => $this->l('Log Module Register Hook'), 'name' => 'BLA_ISLOG_MODREG', 'is_bool' => true, 'values' => array(array('id' => 'BLA_ISLOG_MODREG_ON', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'BLA_ISLOG_MODREG_OFF', 'value' => 0, 'label' => $this->l('No')))), array('type' => 'switch', 'label' => $this->l('Log Module UnRegister Hook'), 'name' => 'BLA_ISLOG_MODUREG', 'is_bool' => true, 'values' => array(array('id' => 'BLA_ISLOG_MODUREG_ON', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'BLA_ISLOG_MODUREG_OFF', 'value' => 0, 'label' => $this->l('No'))))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     $helper = new HelperForm();
     // Module, token and currentIndex
     $helper->module = $this;
     $helper->name_controller = $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
     // Language
     $helper->default_form_language = $default_lang;
     $helper->allow_employee_form_lang = $default_lang;
     // Title and toolbar
     $helper->title = $this->displayName;
     $helper->show_toolbar = true;
     // false -> remove toolbar
     $helper->toolbar_scroll = true;
     // yes - > Toolbar is always visible on the top of the screen.
     $helper->submit_action = 'submit' . $this->name;
     $helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
     // Load current value
     $helper->fields_value['BLA_ISLOG_CARUP'] = Configuration::get('BLA_ISLOG_CARUP');
     $helper->fields_value['BLA_ISLOG_MODINST'] = Configuration::get('BLA_ISLOG_MODINST');
     $helper->fields_value['BLA_ISLOG_MODREG'] = Configuration::get('BLA_ISLOG_MODREG');
     $helper->fields_value['BLA_ISLOG_MODUREG'] = Configuration::get('BLA_ISLOG_MODUREG');
     $helper->fields_value['BLA_ACTIV_EMAIL'] = Configuration::get('BLA_ACTIV_EMAIL');
     $helper->fields_value['BLA_EMAIL'] = Configuration::get('BLA_EMAIL');
     return $helper->generateForm($fields_form);
 }
Exemplo n.º 16
0
 public function renderForm()
 {
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Settings'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'text', 'label' => $this->l('Facebook URL'), 'name' => 'blocksocial_facebook', 'desc' => $this->l('Your Facebook fan page.')), array('type' => 'text', 'label' => $this->l('Twitter URL'), 'name' => 'blocksocial_twitter', 'desc' => $this->l('Your official Twitter account.')), array('type' => 'text', 'label' => $this->l('RSS URL'), 'name' => 'blocksocial_rss', 'desc' => $this->l('The RSS feed of your choice (your blog, your store, etc.).')), array('type' => 'text', 'label' => $this->l('YouTube URL'), 'name' => 'blocksocial_youtube', 'desc' => $this->l('Your official YouTube account.')), array('type' => 'text', 'label' => $this->l('Google+ URL:'), 'name' => 'blocksocial_google_plus', 'desc' => $this->l('Your official Google+ page.')), array('type' => 'text', 'label' => $this->l('Pinterest URL:'), 'name' => 'blocksocial_pinterest', 'desc' => $this->l('Your official Pinterest account.')), array('type' => 'text', 'label' => $this->l('Vimeo URL:'), 'name' => 'blocksocial_vimeo', 'desc' => $this->l('Your official Vimeo account.')), array('type' => 'text', 'label' => $this->l('Instagram URL:'), 'name' => 'blocksocial_instagram', 'desc' => $this->l('Your official Instagram account.'))), 'submit' => array('title' => $this->l('Save'))));
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitModule';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form));
 }
Exemplo n.º 17
0
 public static function &getInstance()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 public function displayForm()
 {
     // Get default Language
     $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
     // Init Fields form array
     $fields_form[0]['form'] = array('legend' => array('title' => $this->l('Settings')), 'input' => array(array('type' => 'text', 'label' => $this->l('ID Facebook:'), 'name' => 'facebookgraph_id', 'size' => '100', 'desc' => $this->l('A Facebook Platform application ID that administers this page.')), array('type' => 'text', 'label' => $this->l('Name shop:'), 'name' => 'facebookgraph_name', 'size' => '100', 'desc' => $this->l('Name of this shop.')), array('type' => 'text', 'label' => $this->l('Url shop:'), 'name' => 'facebookgraph_url', 'size' => '100', 'desc' => $this->l('The canonical URL of this shop.')), array('type' => 'text', 'label' => $this->l('Type shop:'), 'name' => 'facebookgraph_type', 'size' => '100', 'desc' => $this->l('The type of this shop.')), array('type' => 'text', 'label' => $this->l('Title:'), 'name' => 'facebookgraph_title', 'size' => '100', 'desc' => $this->l('The title of this shop.')), array('type' => 'text', 'label' => $this->l('Description:'), 'name' => 'facebookgraph_description', 'size' => '100', 'desc' => $this->l('A one to two sentence description of this shop.')), array('type' => 'text', 'label' => $this->l('Image url:'), 'name' => 'facebookgraph_image', 'size' => '100', 'desc' => $this->l('An image URL which should represent your shop within the graph. The image must be at least 50px by 50px (though minimum 200px by 200px is preferred) and have a maximum aspect ratio of 3:1. We support PNG, JPEG and GIF formats.'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     $helper = new HelperForm();
     // Module, t    oken and currentIndex
     $helper->module = $this;
     $helper->name_controller = $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name;
     // Language
     $helper->default_form_language = $default_lang;
     $helper->allow_employee_form_lang = $default_lang;
     // Title and toolbar
     $helper->title = $this->displayName;
     $helper->show_toolbar = true;
     // false -> remove toolbar
     $helper->toolbar_scroll = true;
     // yes - > Toolbar is always visible on the top of the screen.
     $helper->submit_action = 'submit' . $this->name;
     $helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')));
     // Load current value
     $helper->fields_value['facebookgraph_id'] = Configuration::get('facebookgraph_id');
     $helper->fields_value['facebookgraph_type'] = Configuration::get('facebookgraph_type');
     $helper->fields_value['facebookgraph_title'] = Configuration::get('facebookgraph_title');
     $helper->fields_value['facebookgraph_url'] = Configuration::get('facebookgraph_url');
     $helper->fields_value['facebookgraph_name'] = Configuration::get('facebookgraph_name');
     $helper->fields_value['facebookgraph_image'] = Configuration::get('facebookgraph_image');
     $helper->fields_value['facebookgraph_description'] = Configuration::get('facebookgraph_description');
     return $helper->generateForm($fields_form);
 }
Exemplo n.º 19
0
 public function displayForm()
 {
     $default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
     $fields_form1[0] = array('form' => array('legend' => array('title' => $this->l('Settings'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'switch', 'label' => $this->l('Dynamic'), 'name' => 'EGSITEMAP_MAIN_FDAT', 'desc' => $this->l('Activate dynamic (animated) mode for category sublevels.'), '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'))));
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $helper->default_form_language = $default_lang;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $helper->identifier = $this->identifier;
     //$helper->submit_action = 'submitBlockCategories';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => array('EGSITEMAP_MAIN_FDAT' => (bool) Configuration::get('EGSITEMAP_MAIN_FDAT')), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm($fields_form1);
 }
 public function renderForm()
 {
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Settings'), 'icon' => 'icon-cog'), 'input' => array(array('type' => 'text', 'label' => $this->l('Content Selector'), 'name' => 'MU_INF_SCROLL_CONTENT_SELECTOR', 'class' => 'fixed-width-xl'), array('type' => 'text', 'label' => $this->l('Navigation Selector'), 'name' => 'MU_INF_SCROLL_NAV_SELECTOR', 'class' => 'fixed-width-xl'), array('type' => 'text', 'label' => $this->l('Next Selector'), 'name' => 'MU_INF_SCROLL_NEXT_SELECTOR', 'class' => 'fixed-width-xl'), array('type' => 'text', 'label' => $this->l('Item Selector'), 'name' => 'MU_INF_SCROLL_ITEM_SELECTOR', 'class' => 'fixed-width-xl'), array('type' => 'textarea', 'label' => $this->l('Loading message'), 'name' => 'MU_INF_SCROLL_LOADING_TXT', 'class' => 'fixed-width-xl'), array('type' => 'textarea', 'label' => $this->l('End message'), 'name' => 'MU_INF_SCROLL_LOADING_END', 'class' => 'fixed-width-xl'), array('type' => 'text', 'label' => $this->l('Loading img'), 'name' => 'MU_INF_SCROLL_LOADING_IMG', 'class' => 'fixed-width-xl')), 'submit' => array('title' => $this->l('Save'))));
     $helper = new HelperForm();
     $helper->show_toolbar = true;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $this->fields_form = array();
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitMuInfiniteScroll';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => array('MU_INF_SCROLL_CONTENT_SELECTOR' => Tools::getValue('MU_INF_SCROLL_CONTENT_SELECTOR', Configuration::get('MU_INF_SCROLL_CONTENT_SELECTOR')), 'MU_INF_SCROLL_NAV_SELECTOR' => Tools::getValue('MU_INF_SCROLL_NAV_SELECTOR', Configuration::get('MU_INF_SCROLL_NAV_SELECTOR')), 'MU_INF_SCROLL_NEXT_SELECTOR' => Tools::getValue('MU_INF_SCROLL_NEXT_SELECTOR', Configuration::get('MU_INF_SCROLL_NEXT_SELECTOR')), 'MU_INF_SCROLL_ITEM_SELECTOR' => Tools::getValue('MU_INF_SCROLL_ITEM_SELECTOR', Configuration::get('MU_INF_SCROLL_ITEM_SELECTOR')), 'MU_INF_SCROLL_LOADING_TXT' => Tools::getValue('MU_INF_SCROLL_LOADING_TXT', Configuration::get('MU_INF_SCROLL_LOADING_TXT')), 'MU_INF_SCROLL_LOADING_END' => Tools::getValue('MU_INF_SCROLL_LOADING_END', Configuration::get('MU_INF_SCROLL_LOADING_END')), 'MU_INF_SCROLL_LOADING_IMG' => Tools::getValue('MU_INF_SCROLL_LOADING_IMG', Configuration::get('MU_INF_SCROLL_LOADING_IMG'))), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form));
 }
Exemplo n.º 21
0
 public function renderForm()
 {
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Configuration'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'switch', 'label' => $this->l('Live mode'), 'name' => 'DESJARDINS_MODE', 'is_bool' => true, 'desc' => $this->l('Production mode should be used only if your store is live'), 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Production')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('Test')))), array('type' => 'text', 'label' => $this->l('TPE'), 'name' => 'DESJARDINS_TPE', 'required' => true, 'class' => 'fixed-width-xxl', 'desc' => $this->l('Your Desjardins Electronic Payment Terminal ID')), array('type' => 'text', 'label' => $this->l('Key'), 'name' => 'DESJARDINS_CLE', 'required' => true, 'class' => 'fixed-width-xxl', 'desc' => $this->l('Your Desjardins Secret Key')), array('type' => 'text', 'label' => $this->l('Company code'), 'name' => 'DESJARDINS_CODE_SOCIETE', 'required' => true, 'class' => 'fixed-width-xxl', 'desc' => $this->l('Your Desjardins Company Code'))), 'submit' => array('title' => $this->l('Save settings'), 'class' => 'btn btn-default pull-right')));
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $this->fields_form = array();
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitDesjardins';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => Configuration::getMultiple(array('DESJARDINS_TPE', 'DESJARDINS_CLE', 'DESJARDINS_MODE', 'DESJARDINS_CODE_SOCIETE')), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form));
 }
Exemplo n.º 22
0
 public function renderForm()
 {
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Settings'), 'icon' => 'icon-cogs'), 'description' => $this->l('Set the id number of the gift product.'), 'input' => array(array('type' => 'text', 'label' => $this->l('Product ID'), 'name' => 'customgift_productid')), 'submit' => array('title' => $this->l('Save'))));
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $this->fields_form = array();
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitModule';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form));
 }
Exemplo n.º 23
0
 public function displayFormSettings()
 {
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Settings Paymentwall'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'text', 'label' => $this->l('Application key'), 'name' => 'PAYMENTWALL_APP_KEY', 'suffix' => 'Application key for payment method: Paymentwall', 'class' => 'w220'), array('type' => 'text', 'label' => $this->l('Secret key'), 'name' => 'PAYMENTWALL_SECRET_KEY', 'suffix' => 'Secret key for payment method: Paymentwall', 'class' => 'w220'), array('type' => 'select', 'label' => $this->l('Order status'), 'name' => 'PAYMENTWALL_ORDER_STATUS', 'class' => 'w220', 'options' => $this->getOrderStates()), array('type' => 'text', 'label' => $this->l('Widget code'), 'name' => 'PAYMENTWALL_WIDGET_TYPE', 'suffix' => 'Type of widget for payment method: Paymentwall', 'class' => 'w50'), array('type' => 'switch', 'label' => $this->l('Test mode'), 'name' => 'PAYMENTWALL_TEST_MODE', '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'))));
     $helper = new HelperForm();
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     $this->_html .= $helper->generateForm(array($fields_form));
     $this->_html .= $this->display(__FILE__, '/views/information.tpl');
 }
Exemplo n.º 24
0
 public function displayForm()
 {
     $this->fields_form[0]['form'] = array('legend' => array('title' => $this->l('Convead')), 'input' => array(array('type' => 'text', 'label' => $this->l('app_key'), 'name' => 'APP_KEY', 'required' => true)), 'submit' => array('name' => 'submitConvead', 'title' => $this->l('Save')));
     $helper = new HelperForm();
     $helper->module = $this;
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'convead';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm($this->fields_form);
 }
Exemplo n.º 25
0
 public function renderForm()
 {
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Settings'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'textarea', 'label' => $this->l('HTML CODE'), 'name' => 'footerhtml_val', 'desc' => $this->l('Put your own html code. Usefull for example for tracking codes;'))), 'submit' => array('title' => $this->l('Save'))));
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $this->fields_form = array();
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitModule';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form));
 }
 public function renderForm()
 {
     if (version_compare(_PS_VERSION_, '1.6', '<')) {
         $fields_form = array('form' => array('legend' => array('title' => $this->l('Settings'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'radio', 'class' => 't', 'label' => $this->l('Enable list categories'), 'desc' => $this->l('Would you like show  categories ?'), 'name' => 'CATE_ON', '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'))));
     }
     if (version_compare(_PS_VERSION_, '1.6', '>=')) {
         $fields_form = array('form' => array('legend' => array('title' => $this->l('Settings'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'switch', 'label' => $this->l('Enable list categories'), 'desc' => $this->l('Would you like show  categories ?'), 'name' => 'CATE_ON', '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'))));
     }
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitUpdate';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form));
 }
 public function renderForm()
 {
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Settings'), 'icon' => 'icon-cogs'), 'description' => $this->l('Add Your own addship publisher id to track your blog post status.'), 'input' => array(array('type' => 'text', 'label' => $this->l('Publisher Id'), 'name' => 'SMARTBBLOG_ADD_THIS_API_KEY', 'class' => 'fixed-width-ls', 'desc' => $this->l('Set the Publisher Id from  https://www.addthis.com '))), 'submit' => array('title' => $this->l('Save'))));
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $this->fields_form = array();
     $helper->id = (int) Tools::getValue('id_carrier');
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitSmartBlogAddThis';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form));
 }
Exemplo n.º 28
0
 private function renderForm()
 {
     $fields_form1 = array('form' => array('legend' => array('title' => $this->l('Callback button'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'select', 'label' => $this->l('Type of button :'), 'name' => 'button_type', 'desc' => $this->l('Select view of your callback button.'), 'options' => array('query' => array(0 => array('id' => 'Hide', 'name' => $this->l('Hide')), 1 => array('id' => 'Link', 'name' => $this->l('Link')), 2 => array('id' => 'Button', 'name' => $this->l('Button'))), 'id' => 'id', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('Emails for notifications:'), 'name' => 'email_notify', 'desc' => $this->l('Specify multiple email through a separator ";".')), array('type' => 'text', 'label' => $this->l('Http Notification 1:'), 'name' => 'http_note_1', 'hint' => $this->l('Specify some http request 1.'), 'desc' => $this->l('Example for sms: http://sms.ru/send?api_id=999&to=+412345678&text={text}. {text} is defined keywords will be replased of text bellow.')), array('type' => 'text', 'label' => $this->l('Http Notification text 1:'), 'name' => 'http_note_1_txt', 'hint' => $this->l('Specify some text for request 1.'), 'desc' => $this->l('put text with defined keywords {message} {phone} {fname} {lname} {host}')), array('type' => 'text', 'label' => $this->l('Http Notification 2:'), 'name' => 'http_note_2', 'hint' => $this->l('Specify some http request 2.'), 'desc' => $this->l('Example for sms response: http://sms.ru/send?api_id=999&to={phone}&text={text}. {phone} is defined keywords will be replased to phone of client.')), array('type' => 'text', 'label' => $this->l('Http Notification text 2:'), 'name' => 'http_note_2_txt', 'hint' => $this->l('Specify some text for request 2.'), 'desc' => $this->l('put text with defined keywords {message} {phone} {fname} {lname} {host}')), array('type' => 'text', 'label' => $this->l('Http Notification 3:'), 'name' => 'http_note_3', 'hint' => $this->l('Specify some http request 3.'), 'desc' => $this->l('Example for telegram: http://api.telegram.org/yourBotId/sendMessage?chat_id=999&text={message}. {message} is defined keywords will be replased.')), array('type' => 'text', 'label' => $this->l('Http Notification text 3:'), 'name' => 'http_note_3_txt', 'hint' => $this->l('Specify some text for request 3.'), 'desc' => $this->l('put text with defined keywords {message} {phone} {fname} {lname} {host}'))), 'submit' => array('title' => $this->l('Save'))));
     $fields_form2 = array('form' => array('legend' => array('title' => $this->l('Additional button'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'select', 'label' => $this->l('Tube button:'), 'name' => 'button_type_tube', 'desc' => $this->l('View additional Tube button.'), 'options' => array('query' => array(0 => array('id' => 'No', 'name' => $this->l('No')), 1 => array('id' => 'Show', 'name' => $this->l('Show')), 2 => array('id' => 'Animation', 'name' => $this->l('Animation'))), 'id' => 'id', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('Tube color:'), 'name' => 'tube_color', 'desc' => $this->l('Specify color of your tube(hex value). Example #FF0000'))), 'submit' => array('title' => $this->l('Save'))));
     $fields_form3 = array('form' => array('legend' => array('title' => $this->l('Window configuration'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'text', 'label' => $this->l('Phone mask:'), 'name' => 'mask', 'desc' => $this->l('Set the input mask for a telephone number. Example: +4 (999) 999-99-99')), array('type' => 'select', 'label' => $this->l('First name:'), 'name' => 'fname', 'desc' => $this->l('Hide, Show or require Fist name field.'), 'options' => array('query' => array(0 => array('id' => 'Hide', 'name' => $this->l('Hide')), 1 => array('id' => 'Show', 'name' => $this->l('Show')), 2 => array('id' => 'Required', 'name' => $this->l('Required'))), 'id' => 'id', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Last name:'), 'name' => 'lname', 'desc' => $this->l('Hide, Show or require Last name field.'), 'options' => array('query' => array(0 => array('id' => 'Hide', 'name' => $this->l('Hide')), 1 => array('id' => 'Show', 'name' => $this->l('Show')), 2 => array('id' => 'Required', 'name' => $this->l('Required'))), 'id' => 'id', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Message:'), 'name' => 'message', 'desc' => $this->l('Hide, Show or require Message field.'), 'options' => array('query' => array(0 => array('id' => 'Hide', 'name' => $this->l('Hide')), 1 => array('id' => 'Show', 'name' => $this->l('Show')), 2 => array('id' => 'Required', 'name' => $this->l('Required'))), 'id' => 'id', 'name' => 'name'))), 'submit' => array('title' => $this->l('Save'))));
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitEgcallme';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form1, $fields_form2, $fields_form3));
 }
Exemplo n.º 29
0
    private function _displayForm()
    {
        $this->_html .= '<div class="panel clearfix">';
        $this->_html .= '<div id="fb-root"></div>
					<script>(function(d, s, id) {
					  var js, fjs = d.getElementsByTagName(s)[0];
					  if (d.getElementById(id)) return;
					  js = d.createElement(s); js.id = id;
					  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
					  fjs.parentNode.insertBefore(js, fjs);
					}(document, \'script\', \'facebook-jssdk\'));</script>';
        $this->_html .= '<p>' . $this->l('Provided for FREE by') . ' <a style="text-decoration:underline" target="_blank" href="http://store.nemops.com#fromthemextender" title="store.nemops.com!">store.nemops.com!</a> ' . $this->l('Would you like to support Nemo\'s Post Scriptum to get more free modules?') . '</p>';
        $this->_html .= '<div class="fb-like-box" style="float:left" data-href="https://www.facebook.com/pages/Nemos-Post-Scriptum/358370864236645" data-width="250" data-colorscheme="light" data-show-faces="false" data-header="false" data-stream="false" data-show-border="false"></div>';
        $this->_html .= '
			<div  style="float:left">

			<form style="text-align:right" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
			<input type="hidden" name="cmd" value="_s-xclick">
			<input type="hidden" name="hosted_button_id" value="GSG68TUKQC24J">
			<input type="image" src="https://www.paypalobjects.com/en_US/IT/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
			<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
			</form>
			</div>
			
		</div> ';
        $this->_html .= '<div class="clear">&nbsp;</div>';
        // get current schemes and add color entries!
        $current_extended_schemes = unserialize(Configuration::get('PS_TC_EXTENDED_THEMES'));
        if ($current_extended_schemes) {
            $this->_html .= '<div class="panel clearfix">';
            $this->_html .= '<div class="panel-heading">' . $this->l('Added Schemes') . '</div>';
            foreach ($current_extended_schemes as $scheme) {
                $this->_html .= '<p>' . $scheme['name'] . '<a href="' . AdminController::$currentIndex . '&token=' . Tools::getValue('token') . '&configure=' . $this->name . '&delete_scheme=' . $scheme['name'] . '" title="' . $this->l('Delete this fee') . '"><img src="../img/admin/delete.gif" alt=""></a>' . '</p>';
            }
            $this->_html .= '</div>';
        }
        $inputs[] = array('type' => 'text', 'label' => $this->l('Name'), 'name' => 'name', 'desc' => $this->l('All lowercase, no spaces'));
        $inputs[] = array('type' => 'file', 'label' => $this->l('Theme file'), 'name' => 'themefile', 'desc' => $this->l('The .css file containing your rules'));
        $inputs[] = array('type' => 'color', 'label' => $this->l('Main Color'), 'name' => 'maincolor', 'desc' => $this->l('The main color of your theme'));
        $inputs[] = array('type' => 'color', 'label' => $this->l('Secondary Color'), 'name' => 'seccolor', 'desc' => $this->l('The secondary color of your theme'));
        $fields_form = array('form' => array('legend' => array('title' => $this->l('Settings'), 'icon' => 'icon-cogs'), 'input' => $inputs, 'submit' => array('title' => $this->l('Add'), 'class' => 'btn btn-default pull-right')));
        $helper = new HelperForm();
        $helper->show_toolbar = false;
        $helper->table = $this->table;
        $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
        $helper->default_form_language = $lang->id;
        $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
        $this->fields_form = array();
        $helper->identifier = $this->identifier;
        $helper->submit_action = 'submitModule';
        $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
        $helper->token = Tools::getAdminTokenLite('AdminModules');
        $helper->tpl_vars = array('fields_value' => array('name' => '', 'maincolor' => '', 'seccolor' => '', 'themefile' => ''), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
        $this->_html .= $helper->generateForm(array($fields_form));
    }
Exemplo n.º 30
0
 private function _displayGeneralForm()
 {
     $soption = array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('Disabled')));
     $fields_form = array('form' => array('legend' => array('title' => $this->l('General Setting'), 'icon' => 'icon-cogs'), 'description' => $this->l('General Setting For Current Theme:') . ' <strong>' . $this->themeName . '</strong>', 'input' => array(array('type' => 'text', 'label' => $this->l('Layout Width'), 'name' => $this->getConfigName('layout_width'), 'default' => 100), array('type' => 'text', 'label' => $this->l('Default Skin'), 'name' => $this->getConfigName('default_skin'), 'default' => 100), array('type' => 'switch', 'label' => $this->l('Enable Copyright'), 'name' => $this->getConfigName('enable_copyright'), 'values' => $soption, 'default' => '1', 'desc' => $this->l('Allow to display your copyright information at bottom of site.')), array('type' => 'textarea', 'label' => $this->l('Copyright'), 'name' => $this->getConfigName('copyright'), 'default' => 'Copyright 2014 Powered by PrestaShop. All Rights Reserved.'), array('type' => 'switch', 'label' => $this->l('Enable Panel Tool'), 'name' => $this->getConfigName('paneltool'), 'default' => 0, 'values' => $soption, 'desc' => $this->l('Whethere to display Panel Tool appearing on left of site.'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default')));
     $helper = new HelperForm();
     $helper->show_toolbar = true;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $this->fields_form = array();
     $helper->toolbar_scroll = true;
     $helper->toolbar_btn = array('save' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')), 'back' => array('href' => AdminController::$currentIndex . '&configure=' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->l('Back to list')), 'save2' => array('desc' => $this->l('Save'), 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&save' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')));
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitModule';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => self::getConfigFieldsValues($fields_form['form']['input']), 'languages' => $languages, 'id_language' => $id_language);
     return $helper->generateForm(array($fields_form));
 }