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

class Pulse_Form_Admin_Widget_LandingPageFeatures extends Engine_Form {

  public function init() {

    $files = Engine_Api::_()->getDbTable('files', 'core')->getFilesAssoc();

    $this->addElement('Text', 'title', array(
      'label' => 'Enter title of this widget.',
    ));

    for($i=1;$i<=3;$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('Select', "photo".$i, array(
          'label' => 'Choose image for this feature. Note: You can add a new image from the "File & Media Manager" section.',
          'multiOptions' => $files,
      ));
      $this->addElement('Text', "featuresheading".$i, array(
        'label' => 'Enter caption for this feature.',
      )); 
      $this->addElement('Text', "description".$i, array(
        'label' => 'Enter description for this feature.',
      ));
      $this->addElement('Text', "link" . $i, array(
        'label' => 'Enter link for this feature.',
      ));
    }
  } 
}
