/**
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'mf_form', 'html_id_prefix' => 'mf_form_', 'use_container' => true, 'method' => 'post', 'action' => $this->getUrl('*/*/save', array('_current' => true)), 'field_name_suffix' => 'fields', 'field_container_id_prefix' => 'mf_form_tr_', 'flat_model' => $this->getFlatModel(), 'edit_model' => $this->getEditModel()));
     $fieldset = $this->addFieldset($form, 'mfs_general', array('title' => $this->__('General'), 'legend' => $this->__('General')));
     $this->addField($fieldset, 'description', 'label', array('label' => $this->__('Description'), 'name' => 'description', 'bold' => true));
     $this->addField($fieldset, 'status', 'select_text', array('options' => $this->getStatusSourceModel()->getOptionArray(), 'label' => $this->__('Status'), 'name' => 'status', 'bold' => true));
     $this->addField($fieldset, 'position', 'label', array('label' => $this->__('Position'), 'name' => 'position', 'bold' => true));
     $this->addField($fieldset, 'global_schema_id', 'select_text', array('options' => $this->getSchemas(), 'label' => $this->__('Schema'), 'name' => 'global_schema_id', 'bold' => true));
     if (!Mage::app()->isSingleStoreMode()) {
         $this->addField($fieldset, 'store_id', 'select_text', array('options' => $this->getStoreSourceModel()->load()->toOptionHash(), 'label' => $this->__('Store'), 'name' => 'store_id', 'bold' => true));
     }
     $fieldset = $this->addFieldset($form, 'mfs_url_key', array('title' => $this->__('URL Key'), 'legend' => $this->__('URL Key')));
     $this->addField($fieldset, 'url_key', 'label', array('label' => $this->__('Default URL Key'), 'name' => 'url_key', 'bold' => true));
     if (!($this->getFlatModel()->getData('is_page') && $this->getFlatModel()->getData('type') == 'category')) {
         $this->addField($fieldset, 'manual_url_key', 'text', array('label' => $this->__('Manual URL Key'), 'name' => 'manual_url_key', 'note' => $this->__('If not empty, this is used instead of default URL key')));
         $this->addField($fieldset, 'final_url_key', 'label', array('label' => $this->__('Actually Used URL Key'), 'name' => 'final_url_key', 'bold' => true));
     }
     if ($this->getFlatModel()->getData('is_attribute_value')) {
         $fieldset = $this->addFieldset($form, 'mfs_include_filter_name', array('title' => $this->__('Include Filter Name'), 'legend' => $this->__('Include Filter Name')));
         $this->addField($fieldset, 'include_filter_name', 'select_text', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Default Value'), 'name' => 'include_filter_name', 'bold' => true));
         $this->addField($fieldset, 'force_include_filter_name', 'select', array('options' => $this->getYesNoDefaultSourceModel()->getOptionArray(), 'label' => $this->__('Manual Value'), 'name' => 'force_include_filter_name', 'note' => $this->__("If not equal to 'Use Default', this is used instead of default value")));
         $this->addField($fieldset, 'final_include_filter_name', 'select_text', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Actually Used Value'), 'name' => 'final_include_filter_name', 'bold' => true));
     }
     $this->setForm($form);
     return parent::_prepareForm();
 }
Ejemplo n.º 2
0
 /**
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'mf_url', 'html_id_prefix' => 'mf_url_', 'field_container_id_prefix' => 'mf_url_tr_', 'use_container' => true, 'method' => 'post', 'action' => $this->getUrl('*/*/save', array('_current' => true)), 'field_name_suffix' => 'fields', 'flat_model' => $this->getFlatModel(), 'edit_model' => $this->getEditModel()));
     $fieldset = $this->addFieldset($form, 'mfs_general', array('title' => $this->__('General'), 'legend' => $this->__('General')));
     $this->addField($fieldset, 'sample', 'label', array('label' => $this->__('Sample URL'), 'note' => $this->__("Demonstrates how URL separators and parameters/filters of different kind appear in URL"), 'name' => 'sample', 'bold' => true));
     $this->addField($fieldset, 'name', 'text', array('label' => $this->__('Name'), 'name' => 'name', 'required' => true));
     if ($this->adminHelper()->isGlobal()) {
         $this->addField($fieldset, 'status', 'select', array_merge(array('options' => $this->getStatusSourceModel()->getOptionArray(), 'label' => $this->__('Status'), 'name' => 'status', 'required' => true), $this->getFlatModel()->getStatus() == Mana_Seo_Model_Schema::STATUS_ACTIVE ? array('disabled' => true, 'note' => $this->__("You can't change status of active schema. However, you can set another 'Redirect' schema as 'Active' (after this active schema status automatically changes to 'Redirect').")) : array('note' => $this->__("If changed to 'Active', previously active schema status is set to 'Redirect'."))));
     } else {
         $this->addField($fieldset, 'status', 'select', array('options' => $this->getStatusSourceModel()->getOptionArray(), 'label' => $this->__('Status'), 'name' => 'status', 'required' => true, 'disabled' => true, 'hide_use_default' => true, 'note' => $this->__("You can't change status on store level.")));
     }
     $fieldset = $this->addFieldset($form, 'mfs_separator', array('title' => $this->__('Separators'), 'legend' => $this->__('Separators')));
     $this->addField($fieldset, 'query_separator', 'text', array('label' => $this->__('Query Separator'), 'name' => 'query_separator', 'required' => true));
     $this->addField($fieldset, 'param_separator', 'text', array('label' => $this->__('Parameter Separator'), 'name' => 'param_separator', 'required' => true));
     $this->addField($fieldset, 'first_value_separator', 'text', array('label' => $this->__('Value Separator'), 'name' => 'first_value_separator', 'required' => true));
     $this->addField($fieldset, 'multiple_value_separator', 'text', array('label' => $this->__('Multiple Value Separator'), 'name' => 'multiple_value_separator', 'required' => true));
     $this->addField($fieldset, 'price_separator', 'text', array('label' => $this->__('Price Separator'), 'name' => 'price_separator', 'required' => true));
     $this->addField($fieldset, 'category_separator', 'text', array('label' => $this->__('Category Separator'), 'note' => $this->__('Used when filtering by category (Redirect to Subcategory Page = No) to separate 2 or more subcategories'), 'name' => 'category_separator', 'required' => true));
     $fieldset = $this->addFieldset($form, 'mfs_redirect', array('title' => $this->__('Redirects'), 'legend' => $this->__('Redirects')));
     $this->addField($fieldset, 'redirect_parameter_order', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Redirect To Same Page With Correct Parameter Order'), 'name' => 'redirect_parameter_order', 'required' => true));
     $this->addField($fieldset, 'redirect_to_subcategory', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Redirect Applied Category Filters To Subcategory Page'), 'name' => 'redirect_to_subcategory', 'required' => true));
     $fieldset = $this->addFieldset($form, 'mfs_other', array('title' => $this->__('Other'), 'legend' => $this->__('Other')));
     $this->addField($fieldset, 'include_filter_name', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Include Filter Names Before Values'), 'note' => $this->__('Only applicable to attribute-based filters'), 'name' => 'include_filter_name', 'required' => true));
     $this->addField($fieldset, 'use_filter_labels', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Use Attribute Labels Instead Of Attribute Codes'), 'name' => 'use_filter_labels', 'required' => true));
     $this->addField($fieldset, 'use_range_bounds', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Use Range Bounds in Price Filters'), 'name' => 'use_range_bounds', 'required' => true));
     $this->addField($fieldset, 'accent_insensitive', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Accent Insensitive (Deprecated)'), 'name' => 'accent_insensitive', 'required' => true));
     $this->setForm($form);
     return parent::_prepareForm();
 }
 /**
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'mf_canonical', 'html_id_prefix' => 'mf_canonical_', 'use_container' => true, 'method' => 'post', 'action' => $this->getUrl('*/*/save', array('_current' => true)), 'field_name_suffix' => 'fields', 'flat_model' => $this->getFlatModel(), 'edit_model' => $this->getEditModel()));
     $fieldset = $this->addFieldset($form, 'mfs_canonical', array('title' => $this->__('Canonical URL'), 'legend' => $this->__('Canonical URL')));
     if ($this->coreHelper()->isManadevSeoLayeredNavigationInstalled()) {
         $this->addField($fieldset, 'canonical_category', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical Link Meta Tag on Category Pages'), 'note' => $this->__("If 'No', canonical URL would be rendered as specified in %s", implode('->', array($this->__('System'), $this->__('Configuration'), $this->__('Catalog'), $this->__('Search Engine Optimizations'), $this->__('Use Canonical Link Meta Tag For Categories')))), 'name' => 'canonical_category', 'required' => true));
         $this->addField($fieldset, 'canonical_search', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical Link Meta Tag on Quick Search Page'), 'name' => 'canonical_search', 'required' => true));
         $this->addField($fieldset, 'canonical_cms', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical Link Meta Tag on CMS Pages'), 'name' => 'canonical_cms', 'required' => true));
     }
     if ($this->coreHelper()->isManadevAttributePageInstalled()) {
         $this->addField($fieldset, 'canonical_option_page', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical Link Meta Tag on Option Pages'), 'name' => 'canonical_option_page', 'required' => true));
     }
     if ($this->coreHelper()->isManadevCMSProInstalled()) {
         $this->addField($fieldset, 'canonical_book_page', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical Link Meta Tag on CMS Book Page'), 'name' => 'canonical_book_page', 'required' => true));
     }
     if ($this->coreHelper()->isManadevSeoLayeredNavigationInstalled()) {
         $this->addField($fieldset, 'canonical_filters', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical URL Contains All Applied Filters'), 'name' => 'canonical_filters', 'required' => true));
         $this->addField($fieldset, 'canonical_limit_all', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical URL Points to the Page with All Items'), 'name' => 'canonical_limit_all', 'required' => true));
         $this->addField($fieldset, 'canonical_paging', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical URL Contains Page Parameter'), 'name' => 'canonical_paging', 'required' => true));
     }
     if ($this->coreHelper()->isManadevSeoLayeredNavigationInstalled()) {
         $fieldset = $this->addFieldset($form, 'mfs_prev_next', array('title' => $this->__('rel=prev and rel=next Paging Hints'), 'legend' => $this->__('rel=prev and rel=next Paging Hints')));
         $this->addField($fieldset, 'prev_next_product_list', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('rel=prev and rel=next URLs on Paginated Product List Pages'), 'name' => 'prev_next_product_list', 'required' => true));
         $this->addField($fieldset, 'canonical_remove_when_pager_is_used', 'select', array('options' => $this->getCanonicalHideWhenPagerIsUsedSourceModel()->getOptionArray(), 'label' => $this->__('Remove Canonical URL on Second and Further Pages'), 'note' => $this->__("This setting defines canonical URL behavior on page/2, page/3, ... pages. It only has effect if '%s' setting is used.", 'rel=prev and rel=next URLs on Paginated Product List Pages'), 'name' => 'canonical_remove_when_pager_is_used', 'required' => true));
     }
     $this->setForm($form);
     return parent::_prepareForm();
 }
Ejemplo n.º 4
0
 /**
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form(array('id' => 'mf_canonical', 'html_id_prefix' => 'mf_canonical_', 'use_container' => true, 'method' => 'post', 'action' => $this->getUrl('*/*/save', array('_current' => true)), 'field_name_suffix' => 'fields', 'flat_model' => $this->getFlatModel(), 'edit_model' => $this->getEditModel()));
     $fieldset = $this->addFieldset($form, 'mfs_canonical', array('title' => $this->__('Canonical URL'), 'legend' => $this->__('Canonical URL')));
     $this->addField($fieldset, 'canonical_category', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical Link Meta Tag on Category Pages'), 'note' => $this->__("If 'No', canonical URL would be rendered as specified in %s", implode('->', array($this->__('System'), $this->__('Configuration'), $this->__('Catalog'), $this->__('Search Engine Optimizations'), $this->__('Use Canonical Link Meta Tag For Categories')))), 'name' => 'canonical_category', 'required' => true));
     $this->addField($fieldset, 'canonical_search', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical Link Meta Tag on Quick Search Page'), 'name' => 'canonical_search', 'required' => true));
     $this->addField($fieldset, 'canonical_cms', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical Link Meta Tag on CMS Pages'), 'name' => 'canonical_cms', 'required' => true));
     $this->addField($fieldset, 'canonical_filters', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical URL Contains All Applied Filters'), 'name' => 'canonical_filters', 'required' => true));
     $this->addField($fieldset, 'canonical_limit_all', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('Canonical URL Points to the Page with All Items'), 'name' => 'canonical_limit_all', 'required' => true));
     $fieldset = $this->addFieldset($form, 'mfs_prev_next', array('title' => $this->__('rel=prev and rel=next Paging Hints'), 'legend' => $this->__('rel=prev and rel=next Paging Hints')));
     $this->addField($fieldset, 'prev_next_product_list', 'select', array('options' => $this->getYesNoSourceModel()->getOptionArray(), 'label' => $this->__('rel=prev and rel=next URLs on Paginated Product List Pages'), 'name' => 'prev_next_product_list', 'required' => true));
     //        $this->addField($fieldset, 'prev_next_other_lists', 'select', array(
     //            'options' => $this->getYesNoSourceModel()->getOptionArray(),
     //            'label' => $this->__('rel=prev and rel=next URLs on All Pages Containing Product List Toolbar'),
     //            'name' => 'prev_next_other_lists',
     //            'required' => true,
     //        ));
     $this->setForm($form);
     return parent::_prepareForm();
 }