<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/

class Inspira_Form_Admin_Widget_LandingPageFeatures extends Engine_Form {

  public function init() {

    $this->addElement('Textarea', 'description', array(
      'label' => 'Description',
    ));

    for($i=1;$i<=6;$i++) {
      $this->addElement('Dummy', "dummy".$i, array(
          'label' => "<span style='font-weight:bold;'>Feature ".$i."</span>",
      ));
      $this->getElement('dummy'.$i)->getDecorator('Label')->setOptions(array('placement' => 'PREPEND', 'escape' => false));
      $this->addElement('Text', "heading".$i, array(
        'label' => 'Title',
      ));
      $this->addElement('Textarea', "description".$i, array(
        'label' => 'Description',
      ));
      $this->addElement('Text', "icon".$i, array(
        'label' => 'Font Icon',
      ));
    }

    $banner_options = array('' => '');
    $files = Engine_Api::_()->getDbTable('files', 'core')->getFiles(array('fetchAll' => 1, 'extension' => array('gif', 'jpg', 'jpeg', 'png', 'webp', 'svg')));
    foreach( $files as $file ) {
      $banner_options[$file->storage_path] = $file->name;
    }
    
    $this->addElement('Select', "rightsideimage", array(
        'label' => 'Choose Image for Center',
        'multiOptions' => $banner_options,
    ));
    
    $this->addElement('Text', "rightsideurl", array(
        'label' => 'Enter URL',
    ));
  }
}
