예제 #1
0
파일: Edit.php 프로젝트: AleksNesh/pandora
 public function getHeaderText()
 {
     if (Mage::registry('slideshow_slide_data') && Mage::registry('slideshow_slide_data')->getId()) {
         return $this->_helper->__("Edit Slide '%s'", $this->htmlEscape(Mage::registry('slideshow_slide_data')->getData('slideshow_name')));
     } else {
         return $this->_helper->__('Add New Slideshow');
     }
 }
예제 #2
0
파일: Edit.php 프로젝트: AleksNesh/pandora
 public function getHeaderText()
 {
     if (Mage::registry('slideshow_asset_data') && Mage::registry('slideshow_asset_data')->getId()) {
         return $this->_helper->__("Edit Asset '%s'", $this->htmlEscape(Mage::registry('slideshow_asset_data')->getData('title')));
     } else {
         return $this->_helper->__('Add New Asset');
     }
 }
예제 #3
0
파일: Asset.php 프로젝트: AleksNesh/pandora
 public function __construct()
 {
     $this->_helper = Mage::helper('ash_slideshow');
     $this->_controller = 'adminhtml_asset';
     $this->_blockGroup = 'ash_slideshow';
     $this->_headerText = $this->_helper->__('Assets Manager');
     $this->_addButtonLabel = $this->_helper->__('Add New Asset');
     parent::__construct();
 }
예제 #4
0
 protected function _prepareColumns()
 {
     $this->addColumn('asset_id', array('header' => $this->_helper->__('ID'), 'align' => 'left', 'index' => 'id', 'column_css_class' => 'handle', 'width' => '0px', 'type' => 'checkbox', 'field_name' => 'assets[]', 'values' => 'slide_custom_check', 'escape' => true, 'sortable' => false, 'renderer' => new Ash_Slideshow_Block_Adminhtml_Widget_Grid_Column_Renderer_Checkbox()));
     $this->addColumn('asset_image', array('header' => $this->_helper->__('Image'), 'align' => 'left', 'width' => '100px', 'index' => 'image', 'type' => 'image', 'escape' => true, 'sortable' => false, 'filter' => false, 'renderer' => new Ash_Slideshow_Block_Adminhtml_Grid_Renderer_Image()));
     $this->addColumn('asset_title', array('header' => $this->_helper->__('Title'), 'align' => 'left', 'index' => 'title', 'sortable' => false));
     $this->addColumn('asset_link_url', array('header' => $this->_helper->__('URL'), 'align' => 'left', 'index' => 'link_url', 'sortable' => false));
     $this->addColumn('updated_at', array('header' => $this->_helper->__('Updated At'), 'align' => 'left', 'index' => 'updated_at', 'width' => '120px', 'type' => 'datetime', 'sortable' => false));
     $this->addColumn('asset_status', array('header' => $this->_helper->__('Status'), 'index' => 'status', 'width' => '100px', 'type' => 'options', 'options' => array('1' => $this->_helper->__('Enabled'), '0' => $this->_helper->__('Disabled'))));
     return parent::_prepareColumns();
 }
예제 #5
0
파일: Tabs.php 프로젝트: AleksNesh/pandora
 protected function _beforeToHtml()
 {
     $this->addTab('form_section_info', array('label' => $this->_helper->__('Information'), 'title' => $this->_helper->__('Information'), 'content' => $this->getLayout()->createBlock('ash_slideshow/adminhtml_slideshow_new_tab_form')->toHtml()));
     $this->addTab('form_section_settings', array('label' => $this->_helper->__('Settings'), 'title' => $this->_helper->__('Settings'), 'content' => $this->getLayout()->createBlock('ash_slideshow/adminhtml_slideshow_new_tab_settings')->toHtml()));
     $this->addTab('form_section_assets', array('label' => $this->_helper->__('Assets'), 'title' => $this->_helper->__('Assets'), 'content' => $this->getLayout()->createBlock('ash_slideshow/adminhtml_slideshow_new_tab_assets')->toHtml()));
     return parent::_beforeToHtml();
 }
예제 #6
0
파일: Grid.php 프로젝트: AleksNesh/pandora
 protected function _prepareColumns()
 {
     $this->addColumn('id', array('header' => $this->_helper->__('ID'), 'align' => 'left', 'index' => 'id', 'column_css_class' => 'js_slide_handle', 'width' => '0px', 'sortable' => false, 'type' => 'number'));
     $this->addColumn('slideshow_name', array('header' => $this->_helper->__('Name'), 'align' => 'left', 'index' => 'slideshow_name', 'column_css_class' => 'handle', 'escape' => true, 'sortable' => false));
     $this->addColumn('layout', array('header' => $this->_helper->__('Layout'), 'align' => 'left', 'index' => 'layout', 'column_css_class' => 'handle', 'escape' => true, 'sortable' => false));
     $this->addColumn('status', array('header' => $this->_helper->__('Status'), 'align' => 'left', 'index' => 'status', 'column_css_class' => 'handle', 'escape' => true, 'sortable' => false, 'type' => 'options', 'options' => array(1 => $this->_helper->__('Enabled'), 0 => $this->_helper->__('Disabled'))));
     return parent::_prepareColumns();
 }
예제 #7
0
파일: New.php 프로젝트: AleksNesh/pandora
 public function getHeaderText()
 {
     return $this->_helper->__('Add New Asset');
 }
예제 #8
0
파일: Form.php 프로젝트: AleksNesh/pandora
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $this->setForm($form);
     $fieldset = $form->addFieldset('slideshow_asset_form', array('legend' => $this->_helper->__('Asset information')));
     $fieldset->addField('title', 'text', array('name' => 'title', 'label' => $this->_helper->__('Title'), 'class' => 'required-entry', 'required' => true));
     $fieldset->addField('subtitle', 'text', array('name' => 'subtitle', 'label' => $this->_helper->__('Subtitle')));
     $fieldset->addField('link_text', 'text', array('name' => 'link_text', 'label' => $this->_helper->__('Link Text')));
     $fieldset->addField('link_url', 'text', array('name' => 'link_url', 'label' => $this->_helper->__('URL Target')));
     $fieldset->addField('use_modal', 'select', array('name' => 'use_modal', 'label' => $this->_helper->__('Display Content in Modal?'), 'values' => array(array('value' => '', 'label' => $this->_helper->__('Please Select...')), array('value' => '1', 'label' => $this->_helper->__('Yes')), array('value' => '0', 'label' => $this->_helper->__('No')))));
     $fieldset->addField('description', 'textarea', array('name' => 'description', 'label' => $this->_helper->__('Description'), 'note' => 'The asset description. Used as caption for slideshow.'));
     $fieldset->addField('image', 'file', array('name' => 'image', 'label' => $this->_helper->__('Image'), 'required' => false));
     $fieldset->addField('status', 'select', array('name' => 'status', 'label' => $this->_helper->__('Enabled'), 'required' => false, 'values' => array(array('value' => '1', 'label' => $this->_helper->__('Enabled')), array('value' => '0', 'label' => $this->_helper->__('Disabled')))));
     if (Mage::getSingleton('adminhtml/session')->getSlideshowAssetData()) {
         $form->setValues(Mage::getSingleton('adminhtml/session')->getSlideshowAssetData());
         Mage::getSingleton('adminhtml/session')->setSlideshowAssetData(null);
     } elseif (Mage::registry('slideshow_asset_data')) {
         $form->setValues(Mage::registry('slideshow_asset_data')->getData());
     }
     return parent::_prepareForm();
 }
예제 #9
0
파일: Grid.php 프로젝트: AleksNesh/pandora
 protected function _prepareColumns()
 {
     $this->addColumn('id', array('header' => $this->_helper->__('ID'), 'align' => 'left', 'index' => 'id', 'column_css_class' => 'handle', 'sortable' => false, 'type' => 'number'));
     $this->addColumn('image', array('header' => $this->_helper->__('Image'), 'align' => 'left', 'width' => '100px', 'index' => 'image', 'type' => 'image', 'escape' => true, 'sortable' => false, 'filter' => false, 'renderer' => new Ash_Slideshow_Block_Adminhtml_Grid_Renderer_Image()));
     $this->addColumn('title', array('header' => $this->_helper->__('Title'), 'align' => 'left', 'index' => 'title', 'sortable' => false));
     $this->addColumn('subtitle', array('header' => $this->_helper->__('Subtitle'), 'align' => 'left', 'index' => 'subtitle', 'sortable' => false));
     $this->addColumn('link_text', array('header' => $this->_helper->__('Link Text'), 'align' => 'left', 'index' => 'link_text', 'sortable' => false));
     $this->addColumn('link_url', array('header' => $this->_helper->__('URL'), 'align' => 'left', 'index' => 'link_url', 'sortable' => false));
     $this->addColumn('use_modal', array('header' => $this->_helper->__('Use Modal'), 'align' => 'left', 'index' => 'use_modal', 'sortable' => false));
     $this->addColumn('updated_at', array('header' => $this->_helper->__('Updated At'), 'align' => 'left', 'index' => 'updated_at', 'width' => '120px', 'type' => 'datetime', 'sortable' => false));
     $this->addColumn('status', array('header' => $this->_helper->__('Status'), 'index' => 'status', 'width' => '100px', 'type' => 'options', 'options' => array('1' => $this->_helper->__('Enabled'), '0' => $this->_helper->__('Disabled'))));
     return parent::_prepareColumns();
 }
예제 #10
0
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $form->setHtmlIdPrefix('slideshow_');
     $form->setFieldNameSuffix('slideshow');
     $this->setForm($form);
     $yesNoOptions = array(array('value' => '1', 'label' => $this->_helper->__('Yes')), array('value' => '0', 'label' => $this->_helper->__('No')));
     /**
      * Define fieldsets to organize fields into groups similar to BxSlider's options
      */
     $generalFieldset = $form->addFieldset('slideshow_settings_general', array('legend' => $this->_helper->__('Slideshow Basic Settings')));
     $pagerFieldset = $form->addFieldset('slideshow_settings_pager', array('legend' => $this->_helper->__('Slideshow Pager Settings')));
     $controlFieldset = $form->addFieldset('slideshow_settings_controls', array('legend' => $this->_helper->__('Slideshow Control Settings')));
     $autoFieldset = $form->addFieldset('slideshow_settings_auto', array('legend' => $this->_helper->__('Slideshow Auto Settings')));
     $carouselFieldset = $form->addFieldset('slideshow_settings_carousel', array('legend' => $this->_helper->__('Slideshow Carousel Settings')));
     /**
      * GROUP - General Configuration Options
      */
     $generalFieldset->addField('mode', 'select', array('name' => 'mode', 'label' => $this->_helper->__('Mode'), 'note' => 'Type of transition between slides.', 'values' => array(array('value' => 'horizontal', 'label' => $this->_helper->__('Horizontal')), array('value' => 'vertical', 'label' => $this->_helper->__('Vertical')), array('value' => 'fade', 'label' => $this->_helper->__('Fade'))), 'value' => 'horizontal'));
     $generalFieldset->addField('speed', 'text', array('name' => 'speed', 'label' => $this->_helper->__('Speed'), 'note' => 'Slide transition duration (in ms) ex: 1000 (1 second).', 'value' => 500));
     $generalFieldset->addField('slide_margin', 'text', array('name' => 'slide_margin', 'label' => $this->_helper->__('Slide Margin'), 'note' => 'Margin between each slide.', 'value' => 0));
     $generalFieldset->addField('start_slide', 'text', array('name' => 'start_slide', 'label' => $this->_helper->__('Start Slide'), 'note' => 'Starting slide index (zero-based).', 'value' => 0));
     $generalFieldset->addField('random_start', 'select', array('name' => 'random_start', 'label' => $this->_helper->__('Random Start'), 'note' => 'Start slider on a random slide.', 'values' => $yesNoOptions, 'value' => '0'));
     $generalFieldset->addField('infinite_loop', 'select', array('name' => 'infinite_loop', 'label' => $this->_helper->__('Infinite Loop'), 'note' => 'If true, clicking "Next" while on the last slide will transition to the first slide and vice-versa.', 'values' => $yesNoOptions, 'value' => '1'));
     $generalFieldset->addField('hide_control_on_end', 'select', array('name' => 'hide_control_on_end', 'label' => $this->_helper->__('Hide Control On End'), 'note' => 'If enabled, "Next" control will be hidden on last slide and vice-versa. Only used when "Infinite Loop" is disabled.', 'values' => $yesNoOptions, 'value' => '0'));
     $generalFieldset->addField('easing', 'select', array('name' => 'easing', 'label' => $this->_helper->__('Easing With CSS'), 'note' => 'The type of "easing" to use during transitions. IF USING CSS transitions.', 'values' => array(array('value' => '', 'label' => $this->_helper->__('Please Select...')), array('value' => 'linear', 'label' => $this->_helper->__('Linear')), array('value' => 'ease', 'label' => $this->_helper->__('Ease')), array('value' => 'ease-in', 'label' => $this->_helper->__('Ease-In')), array('value' => 'ease-out', 'label' => $this->_helper->__('Ease-Out')), array('value' => 'ease-in-out', 'label' => $this->_helper->__('Ease-In-Out')), array('value' => 'cubic-bezier', 'label' => $this->_helper->__('Cubic-Bezier'))), 'value' => ''));
     $generalFieldset->addField('captions', 'select', array('name' => 'captions', 'label' => $this->_helper->__('Captions'), 'note' => 'Include image captions. Captions are derived from the image\'s "description" attribute.', 'values' => $yesNoOptions, 'value' => '0'));
     $generalFieldset->addField('ticker', 'select', array('name' => 'ticker', 'label' => $this->_helper->__('Ticker'), 'note' => 'Use slider in ticker mode (similar to a news ticker).', 'values' => $yesNoOptions, 'value' => '0'));
     $generalFieldset->addField('ticker_hover', 'select', array('name' => 'ticker_hover', 'label' => $this->_helper->__('Ticker Hover'), 'note' => 'Ticker will pause when mouse hovers over slider. Note: this functionality does NOT work if using CSS transitions!', 'values' => $yesNoOptions, 'value' => '0'));
     $generalFieldset->addField('adaptive_height', 'select', array('name' => 'adaptive_height', 'label' => $this->_helper->__('Adaptive Height'), 'note' => 'Dynamically adjust slider height based on each slide\'s height.', 'values' => $yesNoOptions, 'value' => '0'));
     $generalFieldset->addField('adaptive_height_speed', 'text', array('name' => 'adaptive_height_speed', 'label' => $this->_helper->__('Adaptive Height Speed'), 'note' => 'Slide height transition duration (in ms). Only used if Adaptive Height is enabled.', 'value' => 500));
     // $generalFieldset->addField('video', 'select', array(
     //     'label'     => $this->_helper->__('Video'),
     //     'note'      => 'NOT IMPLEMENTED ON THIS VERSION - If any slides contain video, set this to true. Also, include plugins/jquery.fitvids.js See http://fitvidsjs.com/ for more info.',
     //     'values'    => $yesNoOptions,
     //     'value'     => '0',
     // ));
     $generalFieldset->addField('responsive', 'select', array('name' => 'responsive', 'label' => $this->_helper->__('Responsive'), 'note' => 'Enable or disable auto resize of the slider. Useful if you need to use fixed width sliders.', 'values' => $yesNoOptions, 'value' => '1'));
     $generalFieldset->addField('use_css', 'select', array('name' => 'use_css', 'label' => $this->_helper->__('Use CSS'), 'note' => 'If enabled, CSS transitions will be used for horizontal and vertical slide animations (this uses native hardware acceleration). If disabled, jQuery animate() will be used.', 'values' => $yesNoOptions, 'value' => '1'));
     $generalFieldset->addField('preload_images', 'select', array('name' => 'preload_images', 'label' => $this->_helper->__('Preload Images'), 'note' => 'If \'all\', preloads all images before starting the slider. If \'visible\', preloads only images in the initially visible slides before starting the slider (tip: use \'visible\' if all slides are identical dimensions).', 'values' => array(array('value' => 'visible', 'label' => $this->_helper->__('Visible')), array('value' => 'all', 'label' => $this->_helper->__('All'))), 'value' => 'visible'));
     $generalFieldset->addField('touch_enabled', 'select', array('name' => 'touch_enabled', 'label' => $this->_helper->__('Touch Enabled'), 'note' => 'If true, slider will allow touch swipe transitions.', 'values' => $yesNoOptions, 'value' => '1'));
     $generalFieldset->addField('swipe_threshold', 'text', array('name' => 'swipe_threshold', 'label' => $this->_helper->__('Swipe Threshold'), 'note' => 'Amount of pixels a touch swipe needs to exceed in order to execute a slide transition. Only used if "Toutch Enabled" is enabled.', 'value' => 50));
     $generalFieldset->addField('one_to_one_touch', 'select', array('name' => 'one_to_one_touch', 'label' => $this->_helper->__('One To One Touch'), 'note' => 'If true, non-fade slides follow the finger as it swipes.', 'values' => $yesNoOptions, 'value' => '1'));
     $generalFieldset->addField('prevent_default_swipe_x', 'select', array('name' => 'prevent_default_swipe_x', 'label' => $this->_helper->__('Prevent Horizontal Swipe'), 'note' => 'If true, touch screen will not move horizontally as the finger swipes.', 'values' => $yesNoOptions, 'value' => '1'));
     $generalFieldset->addField('prevent_default_swipe_y', 'select', array('name' => 'prevent_default_swipe_y', 'label' => $this->_helper->__('Prevent Vertical Swipe'), 'note' => 'If true, touch screen will not move vertically as the finger swipes.', 'values' => $yesNoOptions, 'value' => '0'));
     /**
      * GROUP - Pager configuration fields
      */
     $pagerFieldset->addField('pager', 'select', array('name' => 'pager', 'label' => $this->_helper->__('Pager'), 'note' => 'If true, a pager will be added.', 'values' => $yesNoOptions, 'value' => '1'));
     $pagerFieldset->addField('pager_type', 'select', array('name' => 'pager_type', 'label' => $this->_helper->__('Pager Type'), 'note' => 'If "Full", a pager link will be generated for each slide. If "Short", a x / y pager will be used (ex. 1 / 5).', 'values' => array(array('value' => 'full', 'label' => $this->_helper->__('Full')), array('value' => 'short', 'label' => $this->_helper->__('Short'))), 'value' => 'full'));
     $pagerFieldset->addField('pager_short_separator', 'text', array('name' => 'pager_short_separator', 'label' => $this->_helper->__('Pager Short Separator'), 'note' => 'If Pager Type is set to "Short", pager will use this value as the separating character', 'value' => '/'));
     $pagerFieldset->addField('pager_selector', 'text', array('name' => 'pager_selector', 'label' => $this->_helper->__('Pager Selector'), 'note' => 'Element used to populate the pager. By default, the pager is appended to the bx-viewport (use a jQuery selector)', 'value' => ''));
     /**
      * GROUP - Controls configuration fields
      */
     $controlFieldset->addField('controls', 'select', array('name' => 'controls', 'label' => $this->_helper->__('Controls'), 'note' => 'If true, "Next" / "Prev" controls will be added.', 'values' => $yesNoOptions, 'value' => '1'));
     $controlFieldset->addField('next_text', 'text', array('name' => 'next_text', 'label' => $this->_helper->__('Next Text'), 'note' => 'Text to be used for the "Next" control.', 'value' => 'Next'));
     $controlFieldset->addField('prev_text', 'text', array('name' => 'prev_text', 'label' => $this->_helper->__('Prev Text'), 'note' => 'Text to be used for the "Prev" control.', 'value' => 'Prev'));
     $controlFieldset->addField('next_selector', 'text', array('name' => 'next_selector', 'label' => $this->_helper->__('Next Selector'), 'note' => 'Element used to populate the "next" controls (use a jQuery selector).', 'value' => ''));
     $controlFieldset->addField('prev_selector', 'text', array('name' => 'prev_selector', 'label' => $this->_helper->__('Prev Selector'), 'note' => 'Element used to populate the "prev" controls (use a jQuery selector).', 'value' => ''));
     $controlFieldset->addField('auto_controls', 'select', array('name' => 'auto_controls', 'label' => $this->_helper->__('Auto Controls'), 'note' => 'If true, "Start" / "Stop" controls will be added.', 'values' => $yesNoOptions, 'value' => '0'));
     $controlFieldset->addField('start_text', 'text', array('name' => 'start_text', 'label' => $this->_helper->__('Start Text'), 'note' => 'Text to be used for the "Start" control.', 'value' => 'Start'));
     $controlFieldset->addField('stop_text', 'text', array('name' => 'stop_text', 'label' => $this->_helper->__('Stop Text'), 'note' => 'Text to be used for the "Stop" control.', 'value' => 'Stop'));
     $controlFieldset->addField('auto_controls_combine', 'select', array('name' => 'auto_controls_combine', 'label' => $this->_helper->__('Auto Controls Combine'), 'note' => 'When slideshow is playing only "Stop" control is displayed and vice-versa.', 'values' => $yesNoOptions, 'value' => '0'));
     $controlFieldset->addField('auto_controls_selector', 'text', array('name' => 'auto_controls_selector', 'label' => $this->_helper->__('Auto Controls Selector'), 'note' => 'Element used to populate the auto controls (use a jQuery selector).', 'value' => ''));
     /**
      * GROUP - Auto configuration fields
      */
     $autoFieldset->addField('auto', 'select', array('name' => 'auto', 'label' => $this->_helper->__('Auto'), 'note' => 'Slides will automatically transition.', 'values' => $yesNoOptions, 'value' => '0'));
     $autoFieldset->addField('pause', 'text', array('name' => 'pause', 'label' => $this->_helper->__('Pause'), 'note' => 'The amount of time (in ms) between each auto transition. (1000 ms = 1 second)', 'value' => 4000));
     $autoFieldset->addField('auto_start', 'select', array('name' => 'auto_start', 'label' => $this->_helper->__('Auto Start'), 'note' => 'Slide show starts playing on load. If disabled, slideshow will start when the "Start" control is clicked.', 'values' => $yesNoOptions, 'value' => '1'));
     $autoFieldset->addField('auto_direction', 'select', array('name' => 'auto_direction', 'label' => $this->_helper->__('Auto Direction'), 'note' => 'The direction of auto show slide transitions.', 'values' => array(array('value' => 'next', 'label' => $this->_helper->__('Next')), array('value' => 'prev', 'label' => $this->_helper->__('Prev'))), 'value' => 'next'));
     $autoFieldset->addField('auto_hover', 'select', array('name' => 'auto_hover', 'label' => $this->_helper->__('Auto Hover'), 'note' => 'Slide show will pause when mouse hovers over slider.', 'values' => $yesNoOptions, 'value' => '0'));
     $autoFieldset->addField('auto_delay', 'text', array('name' => 'auto_delay', 'label' => $this->_helper->__('Auto Delay'), 'note' => 'Time (in ms) slide show should wait before starting. (1000 ms = 1 second).', 'value' => 0));
     /**
      * GROUP - Carousel configuration fields
      */
     $carouselFieldset->addField('min_slides', 'text', array('name' => 'min_slides', 'label' => $this->_helper->__('Min Slides'), 'note' => 'The minimum number of slides to be shown. Slides will be sized down if carousel becomes smaller than the original size.', 'value' => 1));
     $carouselFieldset->addField('max_slides', 'text', array('name' => 'max_slides', 'label' => $this->_helper->__('Max Slides'), 'note' => 'The maximum number of slides to be shown. Slides will be sized up if carousel becomes larger than the original size.', 'value' => 1));
     $carouselFieldset->addField('move_slides', 'text', array('name' => 'move_slides', 'label' => $this->_helper->__('Move Slides'), 'note' => 'The number of slides to move on transition. This value must be >= "Min Slides", and <= "Max Slides". If zero (default), the number of fully-visible slides will be used.', 'value' => 0));
     $carouselFieldset->addField('slide_width', 'text', array('name' => 'slide_width', 'label' => $this->_helper->__('Slide Width'), 'note' => 'The width of each slide. This setting is required for all horizontal carousels!', 'value' => 0));
     if (Mage::getSingleton('adminhtml/session')->getSlideshowData()) {
         $form->setValues(Mage::getSingleton('adminhtml/session')->getSlideshowData());
         Mage::getSingleton('adminhtml/session')->setSlideshowData(null);
     } elseif (Mage::registry('slideshow_slide_data')) {
         $form->setValues(Mage::registry('slideshow_slide_data')->getData());
     }
     return parent::_prepareForm();
 }
예제 #11
0
파일: New.php 프로젝트: AleksNesh/pandora
 public function getHeaderText()
 {
     return $this->_helper->__('Add New Slideshow');
 }
예제 #12
0
파일: Form.php 프로젝트: AleksNesh/pandora
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $form->setHtmlIdPrefix('slideshow_');
     $form->setFieldNameSuffix('slideshow');
     $this->setForm($form);
     $fieldset = $form->addFieldset('slideshow_form', array('legend' => $this->_helper->__('Slide information')));
     $fieldset->addField('slideshow_name', 'text', array('name' => 'slideshow_name', 'label' => $this->_helper->__('Name'), 'class' => 'required-entry', 'note' => 'The slide show name.', 'required' => true));
     $fieldset->addField('layout', 'select', array('name' => 'layout', 'label' => $this->_helper->__('Layout'), 'class' => 'required-entry', 'note' => 'The layout to be used with this slide show.', 'values' => array(array('value' => 'default', 'label' => $this->_helper->__('Default')), array('value' => 'hero', 'label' => $this->_helper->__('Hero')), array('value' => 'product_slider', 'label' => $this->_helper->__('Product Slider')), array('value' => 'carousel_modal', 'label' => $this->_helper->__('Carousel with Modal Content')))));
     $fieldset->addField('status', 'select', array('name' => 'status', 'label' => $this->_helper->__('Status'), 'note' => 'The slide show status.', 'values' => array(array('value' => 1, 'label' => $this->_helper->__('Enabled')), array('value' => 0, 'label' => $this->_helper->__('Disabled')))));
     if (Mage::getSingleton('adminhtml/session')->getSlideshowData()) {
         $form->setValues(Mage::getSingleton('adminhtml/session')->getSlideshowData());
         Mage::getSingleton('adminhtml/session')->setSlideshowData(null);
     } elseif (Mage::registry('slideshow_slide_data')) {
         $form->setValues(Mage::registry('slideshow_slide_data')->getData());
     }
     return parent::_prepareForm();
 }