<?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_LandingPageService extends Engine_Form {

  public function init() {
    $files = Engine_Api::_()->getDbTable('files', 'core')->getFilesAssoc();
    // Get available files
    $this->addElement('Text', 'title', array(
      'label' => 'Enter title of this widget.',
    ));
    $this->addElement('Text', "description".$i, array(
      'label' => 'Enter description of this widget.',
    ));
    for($i=1;$i<=6;$i++) {
      $this->addElement('Dummy', "dummy".$i, array(
          'label' => "<span style='font-weight:bold;'>Service ". $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', "servicesheading".$i, array(
        'label' => 'Enter caption of this service.',
      )); 
      $this->addElement('Text', "servicesdescription".$i, array(
        'label' => 'Enter description of this service.',
      ));
      $this->addElement('Text', "link" . $i, array(
        'label' => 'Enter link of this service.',
      ));
    }
  } 
}
