public function renderForm()
 {
     if (!($obj = $this->loadObject(true))) {
         return;
     }
     $features = Feature::getFeatures($this->context->language->id);
     $current_product = new Product($obj->id);
     $id_lang_default = (int) Configuration::get('PS_LANG_DEFAULT');
     $this->fields_form = array('legend' => array('title' => $current_product->name[(int) $id_lang_default], 'icon' => 'icon-info-sign'), 'input' => array(), 'submit' => array('title' => $this->l('Save'), 'name' => 'submitAddMultiFeature'));
     foreach ($features as $feature) {
         $has_normal_value = QiMultiFeatureApi::HasThisFeatureNormalValue((int) $feature['id_feature']);
         // If the feature have custom feature value, make an input, else make a checkbox selector
         if ($has_normal_value == false) {
             $this->fields_form['input'][$feature['id_feature']] = array('type' => 'text', 'label' => $feature['name'], 'lang' => true, 'name' => $feature['id_feature']);
         } else {
             $this->fields_form['input'][$feature['id_feature']] = array('type' => 'checkbox', 'label' => $feature['name'], 'lang' => true, 'name' => $feature['id_feature'], 'values' => array('query' => array(), 'id' => 'id_feature_value', 'name' => 'name'));
             // Add checkbox value
             $feature_values = QiMultiFeatureApi::getValuesForFeatureId($feature['id_feature']);
             foreach ($feature_values as $value) {
                 $this->fields_form['input'][$value['id_feature']]['values']['query'][] = array('id_feature_value' => $value['id_feature_value'], 'name' => $value['value']);
             }
         }
     }
     return parent::renderForm();
 }
 public function renderForm()
 {
     if (!($obj = $this->loadObject(true))) {
         return;
     }
     $post = new BlogPost($obj->id_blog_post);
     $obj->post_title = $post->title;
     if (!is_null($obj->id_customer) && !empty($obj->id_customer)) {
         $tokenCustomer = Tools::getAdminToken('AdminCustomers' . (int) Tab::getIdFromClassName('AdminCustomers') . (int) $this->context->employee->id);
         $linkCustomer = '?tab=AdminCustomers&id_customer=' . $obj->id_customer . '&viewcustomer&token=' . $tokenCustomer;
         $obj->customer_name_label = '<a href="' . $linkCustomer . '"><strong>' . $obj->customer_name . '</strong></a>';
     } else {
         $obj->customer_name_label = $obj->customer_name;
     }
     $iso = $this->context->language->getIsoById($obj->id_lang);
     $obj->iso_code = $iso ? $iso : '&nbsp;';
     $shop = $this->context->shop->getShop($obj->id_shop);
     $obj->shop_name = $shop ? $shop['name'] : '&nbsp;';
     $this->fields_form = array('legend' => array('title' => '<img src="../img/admin/comment.gif"> ' . $this->l('Comment')), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     $this->fields_form['input'][] = array('type' => 'text_label', 'label' => $this->l('Date :'), 'name' => 'date_add');
     $this->fields_form['input'][] = array('type' => 'text_label', 'label' => $this->l('Post title :'), 'name' => 'post_title');
     $this->fields_form['input'][] = array('type' => 'text_label', 'label' => $this->l('Customer :'), 'name' => 'customer_name_label');
     $this->fields_form['input'][] = array('type' => 'text_label', 'label' => $this->l('Shop :'), 'name' => 'shop_name');
     $this->fields_form['input'][] = array('type' => 'text_label', 'label' => $this->l('Lang :'), 'name' => 'iso_code');
     $this->fields_form['input'][] = array('type' => 'hidden', 'name' => 'customer_name');
     $this->fields_form['input'][] = array('type' => 'hidden', 'name' => 'id_blog_post');
     $this->fields_form['input'][] = array('type' => 'textarea', 'label' => $this->l('Message :'), 'rows' => 4, 'cols' => 92, 'id' => 'comment_content', 'name' => 'content');
     $this->fields_form['input'][] = array('type' => 'radio', 'label' => $this->l('Active :'), 'name' => 'active', 'required' => false, 'class' => 't', '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'))));
     $this->tpl_form_vars = array('comment' => $obj);
     return parent::renderForm();
 }
 public function renderForm()
 {
     if (Tools::getValue('addfeatures')) {
         $obj_hotel_features = new HotelFeatures();
         $features_list = $obj_hotel_features->HotelAllCommonFeaturesArray();
         $this->context->smarty->assign('features_list', $features_list);
         $this->context->smarty->assign('addfeatures', 1);
     }
     if ($this->display == 'add') {
         $obj_hotel_features = new HotelFeatures();
         $features_list = $obj_hotel_features->HotelAllCommonFeaturesArray();
         $hotel_info_obj = new HotelBranchInformation();
         $unassigned_ftrs_hotels = $hotel_info_obj->getUnassignedFeaturesHotelIds();
         $this->context->smarty->assign('hotels', $unassigned_ftrs_hotels);
         $this->context->smarty->assign('features_list', $features_list);
     } elseif ($this->display == 'edit') {
         $id = Tools::getValue('id');
         $this->context->smarty->assign('edit', 1);
         $obj_hotel_features = new HotelFeatures();
         $hotel_info_obj = new HotelBranchInformation();
         $features_hotel = $hotel_info_obj->getFeaturesOfHotelByHotelId(Tools::getValue('id'));
         $features_list = $obj_hotel_features->HotelBranchSelectedFeaturesArray($features_hotel);
         $hotels = $hotel_info_obj->hotelsNameAndId();
         $this->context->smarty->assign('hotel_id', $id);
         $this->context->smarty->assign('hotels', $hotels);
         $this->context->smarty->assign('features_list', $features_list);
     }
     $this->fields_form = array('submit' => array('title' => $this->l('Save')));
     return parent::renderForm();
 }
 private function renderParameter()
 {
     $field_days = array(array('short_day' => 'L', 'name' => Translate::getAdminTranslation('Monday')), array('short_day' => 'M', 'name' => Translate::getAdminTranslation('Tuesday')), array('short_day' => 'C', 'name' => Translate::getAdminTranslation('Wednesday')), array('short_day' => 'J', 'name' => Translate::getAdminTranslation('Thursday')), array('short_day' => 'V', 'name' => Translate::getAdminTranslation('Friday')), array('short_day' => 'S', 'name' => Translate::getAdminTranslation('Saturday')), array('short_day' => 'D', 'name' => Translate::getAdminTranslation('Sunday')));
     $this->fields_form = array('legend' => array('title' => $this->module->l('Campaign configuration (step 1)', 'adminmarketingsstep1'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => _PS_MODE_DEV_ ? 'text' : 'hidden', 'lang' => false, 'label' => 'Ref :', 'name' => 'campaign_id', 'col' => 1, 'readonly' => 'readonly'), array('type' => 'text', 'lang' => false, 'label' => $this->module->l('Give a name to this campaign :', 'adminmarketingsstep1'), 'name' => 'campaign_name', 'col' => 7, 'required' => true), array('type' => 'datetime', 'lang' => false, 'name' => 'campaign_date_send', 'label' => $this->module->l('Sending date :', 'adminmarketingsstep1'), 'col' => 5, 'required' => true), array('type' => 'checkbox', 'label' => $this->module->l('Limit by day of the week :', 'adminmarketingsstep1'), 'class' => 'checkbox-inline', 'name' => 'week_day_limit', 'values' => array('query' => $field_days, 'id' => 'short_day', 'name' => 'name', 'class' => 'checkbox-inline')), array('type' => 'free', 'name' => 'schedule_sending', 'label' => $this->module->l('Schedule sending :', 'adminmarketingsstep1'))), 'submit' => array('title' => $this->module->l('Next', 'adminmarketingsstep1'), 'name' => 'submitSmsStep1', 'icon' => 'process-icon-next'));
     $output = parent::renderForm();
     return $this->getFormWrapperElement($output);
 }
 public function renderForm()
 {
     //tinymce setup
     $this->context->smarty->assign('path_css', _THEME_CSS_DIR_);
     $this->context->smarty->assign('ad', __PS_BASE_URI__ . basename(_PS_ADMIN_DIR_));
     $this->context->smarty->assign('autoload_rte', true);
     $this->context->smarty->assign('lang', true);
     $this->context->smarty->assign('iso', $this->context->language->iso_code);
     $obj_countries = new Country();
     $countries_var = Country::getCountries($this->context->language->id);
     if ($this->display == 'add') {
         $this->context->smarty->assign('country_var', $countries_var);
     } elseif ($this->display == 'edit') {
         $this->context->smarty->assign('edit', 1);
         $hotel_id = Tools::getValue('id');
         $hotel_branch_info_obj = new HotelBranchInformation();
         $hotel_branch_info = $hotel_branch_info_obj->hotelBranchInfoById($hotel_id);
         $country_id = $hotel_branch_info['country_id'];
         $statesbycountry = State::getStatesByIdCountry($country_id);
         if ($statesbycountry) {
             $states = array();
             foreach ($statesbycountry as $key => $value) {
                 $states[$key]['id'] = $value['id_state'];
                 $states[$key]['name'] = $value['name'];
             }
         }
         $this->context->smarty->assign('country_var', $countries_var);
         $this->context->smarty->assign('state_var', $states);
         $this->context->smarty->assign('hotel_info', $hotel_branch_info);
     }
     $this->fields_form = array('submit' => array('title' => $this->l('Save')));
     return parent::renderForm();
 }
 public function renderForm()
 {
     $this->initFormToolBar();
     if (!$this->loadObject(true)) {
         return;
     }
     $cover = false;
     $obj = $this->loadObject(true);
     if (isset($obj->id)) {
         $this->display = 'edit';
         $cover = ImageManager::thumbnail(_PS_MODULE_DIR_ . 'ph_simpleblog/covers_cat/' . $obj->id . '.' . $obj->cover, 'ph_simpleblog_cat_' . $obj->id . '.' . $obj->cover, 350, $obj->cover, false);
     } else {
         $this->display = 'add';
     }
     $this->fields_value = array('cover' => $cover ? $cover : false, 'cover_size' => $cover ? filesize(_PS_MODULE_DIR_ . 'ph_simpleblog/covers_cat/' . $obj->id . '.' . $obj->cover) / 1000 : false);
     $categories = SimpleBlogCategory::getCategories($this->context->language->id, true, true);
     array_unshift($categories, array('id' => 0, 'name' => $this->l('No parent')));
     foreach ($categories as $key => $category) {
         if (isset($obj->id) && $obj->id) {
             if ($category['id'] == $obj->id_simpleblog_category) {
                 unset($category[$key]);
             }
         }
     }
     $this->fields_form = array('legend' => array('title' => $this->l('Category'), 'image' => '../img/admin/tab-categories.gif'), 'input' => array(array('type' => 'select', 'label' => $this->l('Parent Category:'), 'name' => 'id_parent', 'required' => true, 'options' => array('id' => 'id', 'query' => $categories, 'name' => 'name')), array('type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', 'required' => true, 'lang' => true, 'class' => 'copy2friendlyUrl'), array('type' => 'textarea', 'label' => $this->l('Description:'), 'name' => 'description', 'lang' => true, 'rows' => 5, 'cols' => 40, 'autoload_rte' => true), array('type' => 'text', 'label' => $this->l('Meta title:'), 'name' => 'meta_title', 'lang' => true), array('type' => 'text', 'label' => $this->l('Meta description:'), 'name' => 'meta_description', 'lang' => true), array('type' => 'text', 'label' => $this->l('Meta keywords:'), 'name' => 'meta_keywords', 'lang' => true), array('type' => 'text', 'label' => $this->l('Friendly URL:'), 'name' => 'link_rewrite', 'required' => true, 'lang' => true), 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')))), array('type' => 'file', 'label' => $this->l('Category image:'), 'display_image' => true, 'name' => 'cover', 'desc' => $this->l('Upload a image from your computer.'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     if (Shop::isFeatureActive()) {
         $this->fields_form['input'][] = array('type' => 'shop', 'label' => $this->l('Shop association:'), 'name' => 'checkBoxShopAsso');
     }
     $this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int) Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL');
     $this->tpl_form_vars['PS_FORCE_FRIENDLY_PRODUCT'] = (int) Configuration::get('PS_FORCE_FRIENDLY_PRODUCT');
     return parent::renderForm();
 }
 public function renderForm()
 {
     if (!($obj = $this->loadObject(true))) {
         return;
     }
     $this->fields_form = array('legend' => array('title' => $this->l('Tag')), 'input' => array(array('type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', 'required' => true), array('type' => 'select', 'label' => $this->l('Language:'), 'name' => 'id_lang', 'required' => true, 'options' => array('query' => Language::getLanguages(false), 'id' => 'id_lang', 'name' => 'name'))), 'selects' => array('posts' => $obj->getPosts(true), 'posts_unselected' => $obj->getPosts(false)), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     return parent::renderForm();
 }
Esempio n. 8
0
 /**
  * @see AdminController::renderForm()
  */
 public function renderForm()
 {
     $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('Glossary'), 'image' => '../img/admin/cog.gif'), 'input' => array(array('type' => 'text', 'lang' => true, 'label' => $this->l('Name:'), 'name' => 'name'), array('type' => 'textarea', 'label' => $this->l('Description:'), 'name' => 'description', 'lang' => true, 'autoload_rte' => true), array('type' => 'switch', 'label' => $this->l('Enabled'), 'name' => 'active', 'required' => true, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'glossary_on', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'glossary_off', 'value' => 0, 'label' => $this->l('No'))))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     if (!($obj = $this->loadObject(true))) {
         return;
     }
     return parent::renderForm();
 }
 public function renderList()
 {
     $this->fields_form = array('legend' => array('title' => $this->module->l('Campaign configuration (step 2)', 'adminmarketingestep2'), 'icon' => 'icon-cogs'), 'description' => $this->module->l('Avoid sender names too commercial', 'adminmarketingestep2') . "<br>\r\n" . $this->module->l('Use a 2 words name. Like First and Last names', 'adminmarketingestep2'), 'input' => array(array('type' => _PS_MODE_DEV_ ? 'text' : 'hidden', 'lang' => false, 'label' => 'Ref :', 'name' => 'campaign_id', 'col' => 1, 'readonly' => 'readonly'), array('type' => 'text', 'lang' => false, 'label' => $this->module->l('Campaign sender email :', 'adminmarketingestep2'), 'name' => 'campaign_sender_email', 'prefix' => '<i class="icon-envelope-o"></i>', 'col' => 4, 'required' => true), array('type' => 'text', 'lang' => false, 'label' => $this->module->l('Campaign sender name :', 'adminmarketingestep2'), 'name' => 'campaign_sender_name', 'prefix' => '<i class="icon-user"></i>', 'col' => 4, 'required' => true)), 'submit' => array('title' => $this->module->l('Next', 'adminmarketingestep2'), 'name' => 'submitEmailingStep2', 'icon' => 'process-icon-next'), 'buttons' => array(array('href' => 'index.php?controller=AdminMarketingEStep1&campaign_id=' . $this->campaign_id . '&token=' . Tools::getAdminTokenLite('AdminMarketingEStep1'), 'title' => $this->module->l('Back', 'adminmarketingestep2'), 'icon' => 'process-icon-back')));
     $this->getFieldsValues();
     $output = parent::renderForm();
     $footer = $this->getTemplatePath() . 'footer.tpl';
     $output .= $this->context->smarty->fetch($footer);
     return $output;
 }
 public function renderForm()
 {
     $this->fields_form = array('legend' => array('title' => $this->l('Blog Comment')), 'input' => array(array('type' => 'textarea', 'label' => $this->l('Comment'), 'name' => 'content', 'rows' => 10, 'cols' => 62, 'class' => 'rte', 'autoload_rte' => false, 'required' => false, 'desc' => $this->l('Enter Your Category Description')), array('type' => 'radio', 'label' => $this->l('Status'), 'name' => 'active', 'required' => false, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'active', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active', 'value' => 0, 'label' => $this->l('Disabled'))))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     if (!($Blogcomment = $this->loadObject(true))) {
         return;
     }
     $this->fields_form['submit'] = array('title' => $this->l('Save   '), 'class' => 'button');
     return parent::renderForm();
 }
Esempio n. 11
0
 public function renderForm()
 {
     $this->fields_form = array('legend' => array('title' => $this->l('Blog Category')), 'input' => array(array('type' => 'text', 'label' => $this->l('Image Type Name'), 'name' => 'type_name', 'size' => 60, 'required' => true, 'desc' => $this->l('Enter Your Image Type Name Here')), array('type' => 'text', 'label' => $this->l('width'), 'name' => 'width', 'size' => 15, 'required' => true, 'desc' => $this->l('Image height in px')), array('type' => 'text', 'label' => $this->l('Height'), 'name' => 'height', 'size' => 15, 'required' => true, 'desc' => $this->l('Image height in px')), array('type' => 'select', 'label' => $this->l('Type'), 'name' => 'type', 'required' => true, 'options' => array('query' => array(array('id_option' => 'post', 'name' => 'Post'), array('id_option' => 'Category', 'name' => 'category'), array('id_option' => 'Author', 'name' => 'author')), 'id' => 'id_option', 'name' => 'name')), array('type' => 'radio', 'label' => $this->l('Status'), 'name' => 'active', 'required' => false, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'active', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active', 'value' => 0, 'label' => $this->l('Disabled'))))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     if (!($BlogImageType = $this->loadObject(true))) {
         return;
     }
     $this->fields_form['submit'] = array('title' => $this->l('Save   '), 'class' => 'button');
     return parent::renderForm();
 }
 public function renderList()
 {
     $this->fields_form = array('legend' => array('title' => $this->module->l('Test your fax-mailing before his validation (step 7)', 'adminmarketingfstep7'), 'icon' => 'icon-print'), 'input' => array(array('type' => _PS_MODE_DEV_ ? 'text' : 'hidden', 'lang' => false, 'label' => 'Ref :', 'name' => 'campaign_id', 'col' => 1, 'readonly' => 'readonly'), array('type' => 'text', 'lang' => false, 'label' => $this->module->l('Your fax number or an email address :', 'adminmarketingfstep7'), 'name' => 'campaign_last_tester', 'prefix' => '<i class="icon-phone"></i>', 'col' => 3, 'required' => true)), 'buttons' => array(array('href' => 'index.php?controller=AdminMarketingFStep8&campaign_id=' . $this->campaign_id . '&token=' . Tools::getAdminTokenLite('AdminMarketingFStep8'), 'title' => $this->module->l('Next', 'adminmarketingfstep7'), 'icon' => 'process-icon-next', 'class' => 'pull-right'), array('href' => 'index.php?controller=AdminMarketingFStep6&campaign_id=' . $this->campaign_id . '&token=' . Tools::getAdminTokenLite('AdminMarketingFStep6'), 'title' => $this->module->l('Back', 'adminmarketingfstep7'), 'icon' => 'process-icon-back'), array('type' => 'submit', 'title' => $this->module->l('Send a test', 'adminmarketingsstep6'), 'name' => 'submitFaxTest', 'icon' => 'process-icon-duplicate', 'class' => 'pull-right')));
     $this->getFieldsValues();
     $output = parent::renderForm();
     $footer = $this->getTemplatePath() . 'footer.tpl';
     $output .= $this->context->smarty->fetch($footer);
     return $output;
 }
 public function renderForm()
 {
     $id_lang = $this->context->language->id;
     $obj = $this->loadObject(true);
     $this->fields_form[0]['form'] = array('legend' => array('title' => $this->l('Comment')), 'input' => array(array('type' => 'hidden', 'name' => 'id_simpleblog_post'), array('type' => 'hidden', 'name' => 'id_customer', 'label' => $this->l('Customer')), array('type' => 'text', 'name' => 'id_simpleblog_post', 'label' => $this->l('Post ID')), array('type' => 'text', 'name' => 'name', 'label' => $this->l('Name'), 'required' => false, 'lang' => false), array('type' => 'text', 'name' => 'email', 'label' => $this->l('E-mail'), 'required' => false, 'lang' => false), array('type' => 'text', 'name' => 'ip', 'label' => $this->l('IP Address'), 'required' => false, 'lang' => false), array('type' => 'textarea', 'label' => $this->l('Comment'), 'name' => 'comment', 'cols' => 75, 'rows' => 7, 'required' => false, 'lang' => false), 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'), 'name' => 'savePostComment'));
     $this->multiple_fieldsets = true;
     $SimpleBlogPost = new SimpleBlogPost($obj->id_simpleblog_post, $id_lang);
     $this->tpl_form_vars = array('customerLink' => $this->context->link->getAdminLink('AdminCustomers'), 'blogPostLink' => $this->context->link->getAdminLink('AdminSimpleBlogPost'), 'blogPostName' => $SimpleBlogPost->meta_title);
     return parent::renderForm();
 }
 public function renderList()
 {
     $this->getFieldsValues();
     $output = parent::renderForm();
     $display = $this->getTemplatePath() . 'csv_column_selector.tpl';
     $output .= $this->context->smarty->fetch($display);
     $footer = $this->getTemplatePath() . 'footer.tpl';
     $output .= $this->context->smarty->fetch($footer);
     return $output;
 }
 public function renderList()
 {
     $this->getFieldsValues();
     $field_days = array(array('short_day' => 'L', 'name' => Translate::getAdminTranslation('Monday')), array('short_day' => 'M', 'name' => Translate::getAdminTranslation('Tuesday')), array('short_day' => 'C', 'name' => Translate::getAdminTranslation('Wednesday')), array('short_day' => 'J', 'name' => Translate::getAdminTranslation('Thursday')), array('short_day' => 'V', 'name' => Translate::getAdminTranslation('Friday')), array('short_day' => 'S', 'name' => Translate::getAdminTranslation('Saturday')), array('short_day' => 'D', 'name' => Translate::getAdminTranslation('Sunday')));
     $this->fields_form = array('legend' => array('title' => $this->module->l('Campaign configuration (step 1)', 'adminmarketingfstep1'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => _PS_MODE_DEV_ ? 'text' : 'hidden', 'lang' => false, 'label' => 'Ref :', 'name' => 'campaign_id', 'col' => 1, 'readonly' => 'readonly'), array('type' => 'text', 'lang' => false, 'label' => $this->module->l('Campaign name :', 'adminmarketingfstep1'), 'name' => 'campaign_name', 'col' => 5, 'required' => true), array('type' => 'datetime', 'lang' => false, 'name' => 'campaign_date_send', 'label' => $this->module->l('Sending date :', 'adminmarketingfstep1'), 'col' => 5, 'required' => true), array('type' => 'checkbox', 'label' => $this->module->l('Limit by day of the week :', 'adminmarketingfstep1'), 'class' => 'checkbox-inline', 'name' => 'week_day_limit', 'values' => array('query' => $field_days, 'id' => 'short_day', 'name' => 'name', 'class' => 'checkbox-inline')), array('type' => 'free', 'name' => 'start_end_hours', 'label' => $this->module->l('Schedule sending :', 'adminmarketingfstep1'), 'required' => true), array('type' => 'free', 'name' => 'campaign_day_limit', 'label' => $this->module->l('Daily sending limit :', 'adminmarketingfstep1'))), 'submit' => array('title' => $this->module->l('Next', 'adminmarketingfstep1'), 'name' => 'submitFaxStep1', 'icon' => 'process-icon-next'));
     $output = parent::renderForm();
     $footer = $this->getTemplatePath() . 'footer.tpl';
     $output .= $this->context->smarty->fetch($footer);
     return $output;
 }
 /**
  * @deprecated
  * @return mixed
  */
 public function renderForm()
 {
     /**
      * Ici j'essayais d'afficher un formulaire, peu importe son contenu.
      * J'ai laissé tomber cette méthode en passant par la page de configuration,
      * et de toute façon, je n'avais obtenu qu'une page avec les menus, tout ça,
      * mais rien du tout là ou je m'attendais à voir un formulaire.
      */
     $this->fields_form = array('legend' => array('title' => $this->l('Video'), 'image' => '../img/admin/tab-genders.gif'), 'input' => array(array('type' => 'text', 'label' => $this->l('Video Title:'), 'name' => 'title', 'lang' => true, 'size' => 70, 'hint' => $this->l('Invalid characters:') . ' 0-9!<>,;?=+()@#"�{}_$%:', 'required' => true), array('type' => 'textarea', 'label' => $this->l('Video Code'), 'name' => 'video_code', 'rows' => 5, 'cols' => 70, 'desc' => $this->l('Place the embed code for the video'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     return parent::renderForm();
 }
Esempio n. 17
0
 public function renderForm()
 {
     ${"GLOBALS"}["imfwllokec"] = "obj";
     global $cookie;
     if (!(${${"GLOBALS"}["imfwllokec"]} = $this->loadObject(true))) {
         return;
     }
     $this->fields_form = array("legend" => array("title" => $this->l('Seller Type'), "image" => "../img/admin/tab-customers.gif"), "input" => array(array("type" => "text", "label" => $this->l('Name'), "name" => "name", "size" => 33, "lang" => true, "required" => true)));
     $this->fields_form["submit"] = array("title" => $this->l('Save'), "class" => "btn btn-default pull-right");
     return parent::renderForm();
 }
 /**
  * @return mixed
  */
 public function renderForm()
 {
     if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj)) {
         $link = $obj->getImageLink();
         if (file_exists($obj->getImageLink(_PS_IMG_DIR_))) {
             $size = round(filesize($obj->getImageLink(_PS_IMG_DIR_)) / 1024);
         }
     }
     $this->fields_form = array('legend' => array('title' => $this->module->l('Bloc customer reference', 'AdminBlockCustomerReferences'), 'icon' => 'icon-list-alt'), 'input' => array(array('type' => 'text', 'label' => $this->module->l('Name', 'AdminBlockCustomerReferences'), 'name' => 'name', 'required' => true, 'lang' => true), array('type' => 'text', 'label' => $this->module->l('Link', 'AdminBlockCustomerReferences'), 'name' => 'link', 'lang' => true), array('type' => 'textarea', 'label' => $this->module->l('Description', 'AdminBlockCustomerReferences'), 'name' => 'description', 'required' => true, 'lang' => true, 'autoload_rte' => true), array('type' => 'file', 'label' => $this->module->l('Image (.png)', 'AdminBlockCustomerReferences'), 'name' => 'image', 'display_image' => true, 'show_thumbnail' => true, 'image' => isset($link) ? '<img src="' . $link . '"/>' : null, 'size' => isset($size) ? $size : null), array('type' => 'switch', 'label' => $this->module->l('Enable', 'AdminBlockCustomerReferences'), 'name' => 'active', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminBlockCustomerReferences')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminBlockCustomerReferences'))))), 'submit' => array('title' => $this->module->l('Save', 'AdminBlockCustomerReferences')));
     return parent::renderForm();
 }
 public function renderForm()
 {
     $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('Slideshow'), 'image' => '../img/admin/cog.gif'), 'input' => array(array('type' => 'text', 'label' => $this->l('Title:'), 'name' => 'title', 'size' => 40), array('type' => 'text', 'label' => $this->l('Link:'), 'name' => 'link', 'size' => 40), array('type' => 'file', 'label' => $this->l('Image:'), 'name' => 'image', 'desc' => $this->l('Upload  a banner from your computer.')), array('type' => 'textarea', 'label' => $this->l('Description'), 'name' => 'description', 'autoload_rte' => TRUE, 'lang' => false, 'required' => TRUE, 'rows' => 5, 'cols' => 40, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'text', 'label' => $this->l('Order:'), 'name' => 'porder', 'size' => 40, 'require' => false)), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default pull-right'));
     if (Shop::isFeatureActive()) {
         $this->fields_form['input'][] = array('type' => 'shop', 'label' => $this->l('Shop association:'), 'name' => 'checkBoxShopAsso');
     }
     if (!($obj = $this->loadObject(true))) {
         return;
     }
     return parent::renderForm();
 }
 /**
  * @return mixed
  */
 public function renderForm()
 {
     if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj)) {
         $link = $obj->getImageLink();
         if (file_exists($obj->getImageLink(_PS_IMG_DIR_))) {
             $size = round(filesize($obj->getImageLink(_PS_IMG_DIR_)) / 1024);
         }
     }
     $this->fields_form = array('legend' => array('title' => $this->module->l('Block Slideshow', 'AdminNowSlideshow'), 'icon' => 'icon-list-alt'), 'input' => array(array('type' => 'text', 'label' => $this->module->l('Name', 'AdminNowSlideshow'), 'name' => 'name', 'required' => true, 'lang' => true), array('type' => 'text', 'label' => $this->module->l('Title', 'AdminNowSlideshow'), 'name' => 'title', 'required' => true, 'lang' => true), array('type' => 'text', 'label' => $this->module->l('Button name', 'AdminNowSlideshow'), 'name' => 'button_name', 'required' => true, 'lang' => true), array('type' => 'textarea', 'label' => $this->module->l('Description', 'AdminNowSlideshow'), 'name' => 'description', 'required' => true, 'lang' => true, 'autoload_rte' => true), array('type' => 'select', 'label' => $this->module->l('Type of link', 'AdminNowSlideshow'), 'name' => 'type', 'required' => true, 'default_value' => NowSlideshow::TYPE_LINK, 'options' => array('query' => array(array('id_type' => NowSlideshow::TYPE_CATEGORY, 'type' => $this->module->l('Category', 'AdminNowSlideshow')), array('id_type' => NowSlideshow::TYPE_CMS, 'type' => $this->module->l('CMS', 'AdminNowSlideshow')), array('id_type' => NowSlideshow::TYPE_LINK, 'type' => $this->module->l('Link', 'AdminNowSlideshow')), array('id_type' => NowSlideshow::TYPE_MANUFACTURER, 'type' => $this->module->l('Manufacturer', 'AdminNowSlideshow'))), 'id' => 'id_type', 'name' => 'type')), array('type' => 'text', 'label' => $this->module->l('ID type', 'AdminNowSlideshow'), 'name' => 'id_type', 'form_group_class' => 'idTypeDiv'), array('type' => 'categories', 'label' => $this->l('Category'), 'name' => 'category', 'tree' => array('id' => 'categories-tree'), 'form_group_class' => 'categoryDiv'), array('type' => 'select', 'label' => $this->module->l('CMS', 'AdminNowSlideshow'), 'name' => 'cms', 'options' => array('query' => CMS::listCms($this->context->language->id), 'id' => 'id_cms', 'name' => 'meta_title'), 'form_group_class' => 'cmsDiv'), array('type' => 'select', 'label' => $this->module->l('Manufacturer', 'AdminNowSlideshow'), 'name' => 'manufacturer', 'options' => array('query' => Manufacturer::getManufacturers(false, $this->context->language->id), 'id' => 'id_manufacturer', 'name' => 'name'), 'form_group_class' => 'manufacturerDiv'), array('type' => 'text', 'label' => $this->module->l('Link', 'AdminNowSlideshow'), 'name' => 'link', 'form_group_class' => 'linkDiv', 'lang' => true), array('type' => 'file', 'label' => $this->module->l('Image (.png)', 'AdminNowSlideshow'), 'name' => 'image', 'display_image' => true, 'show_thumbnail' => true, 'image' => isset($link) ? '<img src="' . $link . '"/>' : null, 'size' => isset($size) ? $size : null), array('type' => 'switch', 'label' => $this->module->l('Enable', 'AdminNowSlideshow'), 'name' => 'active', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowSlideshow')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowSlideshow'))))), 'submit' => array('title' => $this->module->l('Save', 'AdminNowSlideshow')));
     return parent::renderForm();
 }
Esempio n. 21
0
 public function renderForm()
 {
     $this->toolbar_btn['save-and-stay'] = array('href' => '#', 'desc' => $this->l('Save and stay'));
     $this->initToolbar();
     if (!$this->loadObject(true)) {
         return;
     }
     $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('Category'), 'image' => '../img/admin/tab-categories.gif'), 'input' => array(array('type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', 'required' => true, 'lang' => true, 'class' => 'copy2friendlyUrl', 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'textarea', 'label' => $this->l('Description :'), 'name' => 'description', 'autoload_rte' => true, 'rows' => 10, 'cols' => 100, 'lang' => true, 'desc' => $this->l('Will be displayed in top of category page'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     $this->fields_form['input'][] = array('type' => 'text', 'label' => $this->l('Position :'), 'size' => 3, 'name' => 'position');
     $this->fields_form['input'][] = array('type' => 'radio', 'label' => $this->l('Status :'), 'name' => 'active', 'required' => false, 'class' => 't', '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'))));
     return parent::renderForm();
 }
Esempio n. 22
0
 public function renderForm()
 {
     $listEffect = array(array('kind_effect' => 'Effect1', 'id_effect' => 1), array('kind_effect' => 'Effect2', 'id_effect' => 2), array('kind_effect' => 'Effect3', 'id_effect' => 3), array('kind_effect' => 'Effect4', 'id_effect' => 4));
     $listAnimate = array(array('animate' => 'Animate In', 'id_animate' => 'animate-in'), array('animate' => 'Animate Out', 'id_animate' => 'animate-out'));
     $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('Banner Fraction'), 'image' => '../img/admin/cog.gif'), 'input' => array(array('type' => 'select', 'label' => $this->l('Animation:'), 'name' => 'animate', 'required' => true, 'options' => array('query' => $listAnimate, 'id' => 'id_animate', 'name' => 'animate'), 'desc' => $this->l('Choose the type of the Hooks')), array('type' => 'text', 'label' => $this->l('Title1:'), 'name' => 'title1', 'lang' => true, 'size' => 40), array('type' => 'text', 'label' => $this->l('Title2:'), 'name' => 'title2', 'lang' => true, 'size' => 40), array('type' => 'text', 'label' => $this->l('Link:'), 'name' => 'link', 'lang' => true, 'size' => 40), array('type' => 'file', 'label' => $this->l('Backgorund Image:'), 'name' => 'bgimage', 'desc' => $this->l('Upload  a banner from your computer.')), array('type' => 'file', 'label' => $this->l('Image:'), 'name' => 'image', 'desc' => $this->l('Upload  a banner from your computer.')), array('type' => 'file', 'label' => $this->l('Image2:'), 'name' => 'image2', 'desc' => $this->l('Upload  a banner from your computer.')), array('type' => 'textarea', 'label' => $this->l('Description'), 'name' => 'description', 'autoload_rte' => TRUE, 'lang' => true, 'required' => TRUE, 'rows' => 5, 'cols' => 40, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'text', 'label' => $this->l('Order:'), 'name' => 'porder', 'size' => 40, 'require' => false), array('type' => 'select', 'label' => $this->l('Kind Effect:'), 'name' => 'kind_effect', 'required' => true, 'options' => array('query' => $listEffect, 'id' => 'id_effect', 'name' => 'kind_effect'), 'desc' => $this->l('Choose the type of the Hooks')), array('type' => 'radio', 'label' => $this->l('Displayed:'), 'name' => 'active', 'required' => FALSE, 'class' => 't', 'is_bool' => FALSE, 'values' => array(array('id' => 'require_on', 'value' => 1, 'label' => $this->l('Yes')), array('id' => 'require_off', 'value' => 0, 'label' => $this->l('No'))))), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default pull-right'));
     if (Shop::isFeatureActive()) {
         $this->fields_form['input'][] = array('type' => 'shop', 'label' => $this->l('Shop association:'), 'name' => 'checkBoxShopAsso');
     }
     if (!($obj = $this->loadObject(true))) {
         return;
     }
     return parent::renderForm();
 }
 public function renderList()
 {
     $this->initFieldsValues();
     $this->setSmartyVars();
     $this->fields_form = array('legend' => array('title' => $this->module->l('Add document(s) to the campaign (step 2)', 'adminmarketingfstep2'), 'icon' => 'icon-print'), 'input' => array(array('type' => _PS_MODE_DEV_ ? 'text' : 'hidden', 'lang' => false, 'label' => 'Ref :', 'name' => 'campaign_id', 'col' => 1, 'readonly' => 'readonly'), array('type' => 'file', 'label' => $this->module->l('Choose a document (Pdf or Word file) :', 'adminmarketingfstep2'), 'name' => 'document', 'required' => false)), 'submit' => array('title' => $this->module->l('Add this document', 'adminmarketingfstep2'), 'name' => 'uploadFaxStep2', 'icon' => 'process-icon-duplicate'), 'buttons' => array(array('href' => 'index.php?controller=AdminMarketingFStep1&campaign_id=' . $this->campaign_id . '&token=' . Tools::getAdminTokenLite('AdminMarketingFStep1'), 'title' => $this->module->l('Back', 'adminmarketingfstep2'), 'icon' => 'process-icon-back')));
     $output = parent::renderForm();
     if (!is_null($this->settled_pages) && !empty($this->settled_pages)) {
         $fax_preview = $this->getTemplatePath() . 'marketingf_step2/fax_preview.tpl';
         $output .= $this->context->smarty->fetch($fax_preview);
     }
     $footer = $this->getTemplatePath() . 'footer.tpl';
     $output .= $this->context->smarty->fetch($footer);
     return $output;
 }
 public function renderForm()
 {
     $mod = new posstaticblocks();
     $listModules = $mod->getListModuleInstalled();
     $listHookPosition = array(array('hook_position' => 'top'), array('hook_position' => 'rightColumn'), array('hook_position' => 'leftColumn'), array('hook_position' => 'displayHeader'), array('hook_position' => 'footer'), array('hook_position' => 'home'), array('hook_position' => 'blockPosition1'), array('hook_position' => 'blockPosition2'), array('hook_position' => 'blockPosition3'), array('hook_position' => 'bannerSequence'));
     $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('Slideshow'), 'image' => '../img/admin/cog.gif'), 'input' => array(array('type' => 'text', 'label' => $this->l('Title:'), 'name' => 'title', 'size' => 40, 'lang' => true), array('type' => 'text', 'label' => $this->l('Identify:'), 'name' => 'identify', 'size' => 40, 'require' => false), array('type' => 'radio', 'label' => $this->l('Show/hide title'), 'desc' => $this->l('Show/hide title?'), 'name' => 'active', 'required' => true, 'class' => 't', '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')))), array('type' => 'select', 'label' => $this->l('Hook Position:'), 'name' => 'hook_position', 'required' => true, 'options' => array('query' => $listHookPosition, 'id' => 'hook_position', 'name' => 'hook_position'), 'desc' => $this->l('Choose the type of the Hooks')), array('type' => 'radio', 'label' => $this->l('Show/hide Hook'), 'desc' => $this->l('Show/hide Hook?'), 'name' => 'showhook', 'required' => true, 'class' => 't', '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')))), array('type' => 'textarea', 'label' => $this->l('Description'), 'name' => 'description', 'autoload_rte' => TRUE, 'lang' => true, 'required' => TRUE, 'rows' => 5, 'cols' => 40, 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'text', 'label' => $this->l('Order:'), 'name' => 'posorder', 'size' => 40, 'require' => false), array('type' => 'radio', 'label' => $this->l('Insert Module?'), 'desc' => $this->l('Insert module?'), 'name' => 'insert_module', 'required' => true, 'class' => 't', 'is_bool' => true, 'values' => array(array('id' => 'active_on_module', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active_off_module', 'value' => 0, 'label' => $this->l('Disabled')))), array('type' => 'select', 'label' => $this->l('Modules:'), 'name' => 'name_module', 'required' => true, 'options' => array('query' => $listModules, 'id' => 'name', 'name' => 'name'), 'desc' => $this->l('Choose the type of the Module')), array('type' => 'select', 'label' => $this->l('Hook-Modules:'), 'name' => 'hook_module', 'required' => true, 'options' => array('query' => $listHookPosition, 'id' => 'hook_position', 'name' => 'hook_position'), 'desc' => $this->l('Choose the type of the Hooks'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default pull-right'));
     if (Shop::isFeatureActive()) {
         $this->fields_form['input'][] = array('type' => 'shop', 'label' => $this->l('Shop association:'), 'name' => 'checkBoxShopAsso');
     }
     if (!($obj = $this->loadObject(true))) {
         return;
     }
     return parent::renderForm();
 }
 public function renderForm()
 {
     //some basics information, only used to include your own javascript
     /*$this->context->smarty->assign(array(
     		'mymodule_controller_url' => $this->context->link->getAdminLink('Adminmymodule'),//give the url for ajax query
     		));*/
     // cf tuto http://www.custommyself.com/prestashop-tutorial-create-a-module-with-an-admin-panel/
     $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('Configuration de la carte.')), 'input' => array(array('type' => 'text', 'label' => $this->l("Description") . " :", 'name' => 'description', 'size' => 40, 'required' => true, 'hint' => $this->l('The text that will be added to the attribute description.'))));
     //add the save button
     $this->fields_form['submit'] = array('title' => $this->l('   Save   '), 'class' => 'button');
     //what do we want to add to the default template
     //$more = $this->module->display($path, 'view/mappa.tpl');
     return parent::renderForm();
     //add you own information to the rendered template
 }
 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('Delivery by manufacturer'), 'icon' => 'icon-folder-close'), 'input' => array(array('type' => 'hidden', 'label' => $this->l('id'), 'name' => 'id_egms_delivery'), array('type' => 'select', 'label' => $this->l('Shop'), 'name' => 'id_egms_cu', 'required' => true, 'options' => array('query' => $this->shops, 'id' => 'id', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Manufacturer'), 'name' => 'id_manufacturer', 'required' => true, 'options' => array('query' => $this->manufacturers, 'id' => 'id', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('dlex'), 'name' => 'dlex', 'hint' => $this->l('dlex')), array('type' => 'text', 'label' => $this->l('carriers'), 'name' => 'carriers', 'hint' => $this->l('carriers')), array('type' => 'text', 'label' => $this->l('payments'), 'name' => 'payments', 'hint' => $this->l('payments')), array('type' => 'text', 'label' => $this->l('address'), 'name' => 'address', 'hint' => $this->l('address')), array('type' => 'text', 'label' => $this->l('chema'), 'name' => 'chema', 'hint' => $this->l('chema')), array('type' => 'switch', 'label' => $this->l('Is Active'), 'name' => 'active', 'values' => $soption, 'default' => '1')), '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->initForm();
     if ($this->display == 'edit') {
         if (!($obj = $this->loadObject(true))) {
             return;
         }
         $this->fields_value['id_product_purchased'] = $obj->id_product_purchased;
         if (Tools::getIsset('id_product_purchased')) {
             $this->fields_value['id_product_purchased'] = Tools::getValue('id_product_purchased');
         }
         $this->fields_value['id_product_discounted'] = $obj->id_product_discounted;
         if (Tools::getIsset('id_product_discounted')) {
             $this->fields_value['id_product_discounted'] = Tools::getValue('id_product_discounted');
         }
     }
     return parent::renderForm();
 }
 public function renderList()
 {
     // 1er bloc : Tests avant envoi
     // ----------------------------
     $this->fields_form = array('legend' => array('title' => $this->module->l('Test your e-mailing before his validation (step 7)', 'adminmarketingestep7'), 'icon' => 'icon-envelope-alt'), 'input' => array(array('type' => _PS_MODE_DEV_ ? 'text' : 'hidden', 'lang' => false, 'label' => 'Ref :', 'name' => 'campaign_id', 'col' => 1, 'readonly' => 'readonly'), array('type' => 'text', 'lang' => false, 'label' => $this->module->l('Your email address', 'adminmarketingestep7'), 'name' => 'campaign_last_tester', 'prefix' => '<i class="icon-envelope-o"></i>', 'required' => true)), 'submit' => array('title' => $this->module->l('Send a test', 'adminmarketingestep7'), 'name' => 'submitEmailingTest', 'icon' => 'process-icon-envelope'));
     $this->getFieldsValues();
     $output = parent::renderForm();
     // 2eme bloc : Apercu du HTML
     // --------------------------
     $this->context->smarty->assign('campaign_id', $this->campaign_id);
     $email_preview = $this->getTemplatePath() . 'marketinge_step7/email_preview.tpl';
     $output .= $this->context->smarty->fetch($email_preview);
     // Puis on renvoi la fusion des 2 blocs + le footer
     // ------------------------------------------------
     $footer = $this->getTemplatePath() . 'footer.tpl';
     $output .= $this->context->smarty->fetch($footer);
     return $output;
 }
Esempio n. 29
0
 public function renderForm()
 {
     $this->toolbar_btn['save-and-stay'] = array('href' => '#', 'desc' => $this->l('Save and stay'));
     $defaultLanguage = $this->default_form_language;
     $this->initToolbar();
     if (!$this->loadObject(true)) {
         return;
     }
     $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('Photo'), 'image' => '../img/admin/tab-categories.gif'), 'input' => array(array('type' => 'text', 'label' => $this->l('Title:'), 'name' => 'name', 'required' => true, 'lang' => true, 'class' => 'copy2friendlyUrl', 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'text', 'label' => $this->l('Meta Title:'), 'name' => 'meta_title', 'lang' => true, 'class' => '', 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'text', 'label' => $this->l('Meta Keword:'), 'name' => 'meta_keywords', 'lang' => true, 'class' => '', 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'textarea', 'label' => $this->l('Meta Description :'), 'name' => 'meta_description', 'autoload_rte' => true, 'rows' => 10, 'cols' => 100, 'lang' => true, 'desc' => $this->l('Will be displayed in top of category page')), array('type' => 'textarea', 'label' => $this->l('Description :'), 'name' => 'description', 'autoload_rte' => true, 'rows' => 10, 'cols' => 100, 'lang' => true, 'desc' => $this->l('Will be displayed in top of category page')), array('type' => 'file', 'label' => $this->l('Image :'), 'name' => 'image', 'required' => true), array('type' => 'text', 'label' => $this->l('Youtube:'), 'name' => 'youtube_id', 'class' => '', 'required' => FALSE), array('type' => 'text', 'label' => $this->l('Friendly URL:'), 'name' => 'link_rewrite', 'lang' => true, 'required' => true, 'hint' => $this->l('Only letters and the minus (-) character are allowed.'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     $this->fields_form['input'][] = array('type' => 'text', 'label' => $this->l('Position :'), 'size' => 3, 'name' => 'position');
     $this->fields_form['input'][] = array('type' => 'radio', 'label' => $this->l('Status :'), 'name' => 'active', 'required' => false, 'class' => 't', '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'))));
     if (!($news = $this->loadObject(true))) {
         return;
     }
     $image = ImageManager::thumbnail(_PS_PSNEWS_IMG_DIR_ . '/' . $news->id_news . '.jpg', $this->table . '_' . (int) $news->id_news . '.' . $this->imageType, 350, $this->imageType, true);
     $this->fields_value = array('image' => $image ? $image : false, 'size' => $image ? filesize(_PS_PSNEWS_IMG_DIR_ . '/' . $news->id_news . '.jpg') / 1000 : false);
     $this->tpl_form_vars = array('active' => $this->object->active, 'PS_ALLOW_ACCENTED_CHARS_URL', (int) Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'));
     return parent::renderForm();
 }
Esempio n. 30
0
     $this->addJqueryUi('ui.widget');
     $this->addJqueryPlugin('tagify');
 }
 public function renderForm()
 {
     $this->toolbar_btn['save-and-stay'] = array('href' => '#', 'desc' => $this->l('Save and stay'));
     $this->initToolbar();
     $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('Friend Image/Video'), 'image' => '../img/admin/tab-categories.gif'), 'input' => array(array('type' => 'text', 'label' => $this->l('Title:'), 'name' => 'title', 'required' => true, 'lang' => true, 'class' => 'copy2friendlyUrl', 'hint' => $this->l('Invalid characters:') . ' <>;=#{}'), array('type' => 'text', 'label' => $this->l('Video ID:'), 'name' => 'youtube_id', 'class' => 'copy2friendlyUrl', 'hint' => $this->l('This is the id of youtube video')), array('type' => 'file', 'label' => $this->l('Image:'), 'name' => 'image', 'display_image' => true)), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     $this->fields_form['input'][] = array('type' => 'text', 'label' => $this->l('Position :'), 'size' => 3, 'name' => 'position');
     $friends = FriendsInfo::listFriends();
     $this->fields_form['input'][] = array('type' => 'select', 'label' => $this->l('Friend'), 'desc' => $this->l('Choose a friend'), 'name' => 'id_friend', 'required' => true, 'options' => array('query' => $friends, 'id' => 'id_option', 'name' => 'name'));
     $this->fields_form['input'][] = array('type' => 'radio', 'label' => $this->l('Status :'), 'name' => 'active', 'required' => false, 'class' => 't', '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'))));
     if (!($friends = $this->loadObject(true))) {
         return;
     }
     //        $image = ImageManager::thumbnail(_PS_MYFRIENDS_IMG_DIR_.'/'.$friends->id.'.jpg', $this->table.'_'.(int)$friends->id.'.'.$this->imageType, 350, $this->imageType, true);
     //		$this->fields_value = array(
     //			'image' => $image ? $image : false,
     //			'size' => $image ? filesize(_PS_MYFRIENDS_IMG_DIR_.'/'.$friends->id.'.jpg') / 1000 : false