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

class Fbclone_Form_Admin_Widget_LandingPage extends Engine_Form {

  public function init() {
    
    $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;
    $fileLink = $view->baseUrl() . '/admin/files/';
    
    $files = Engine_Api::_()->getDbTable('files', 'core')->getFilesAssoc();
    
    $description = $this->getTranslator()->translate('Choose the image to be shown in the left side of this widget. [Note: You can add a new image from the "File & Media Manager" section from here: <a href="%1$s" target="_blank">File & Media Manager</a>.]');
    $description = vsprintf($description, array($fileLink));
    
    $this->addElement('Select', "leftsideimage", array(
      'description' => $description,
      'multiOptions' => $files,
    ));
    $this->leftsideimage->addDecorator('Description', array('placement' => Zend_Form_Decorator_Abstract::PREPEND, 'escape' => false));
    
    $this->addElement('Text', 'heading', array(
      'label' => 'Enter the heading text to be show in the left side.',
      'value' => 'Welcome to our community! We\'re glad that you\'re here.',
    ));
    $this->addElement('Text', 'description', array(
      'label' => 'Enter the description to be show below the login form.',
      'value' => 'Connect with your friends on our community.',
    ));
  }
}
