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

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

    $this->addElement('Text', 'title', array(
      'label' => 'Enter title of this widget.',
    ));
    $this->addElement('Text', 'description', array(
      'label' => 'Enter description of this widget.',
    ));
    $this->addElement('Text', 'btntext', array(
      'label' => 'Enter CTA button text',
    ));
     $this->addElement('Text', 'btntextlink', array(
      'label' => 'Enter CTA button link',
    ));   
    for($i=1;$i<=4;$i++) {
      $this->addElement('Dummy', "dummy".$i, array(
          'label' => "<span style='font-weight:bold;'>Counter ". $i ."</span>",
      ));
      $this->getElement('dummy'.$i)->getDecorator('Label')->setOptions(array('placement' => 'PREPEND', 'escape' => false));
      $this->addElement('Text', "count".$i, array(
        'label' => 'Enter count for this counter.',
      )); 
      $this->addElement('Text', "text".$i, array(
        'label' => 'Enter caption for this counter.',
      )); 
    }
    $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,
    ));
  } 
}
