<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Payment_Form_Gateway_Cash extends Engine_Form
{
  protected  $_settings = array();
  public function setSettings($settings) {
    $this->_settings = $settings;
    return $this;
  }
  public function getSettings() {
    return $this->_settings;
  }
  public function init()
  {
    parent::init();
    $this->setTitle('Payment Gateway: Cash');
    $this->setDescription('PAYMENT_FORM_GATEWAY_CASH_DESCRIPTION');
    // Decorators
    $this->loadDefaultDecorators();
    $this->getDecorator('Description')->setOption('escape', false);
    
    $this->addElement('File', 'file', array(
      'label' => 'Upload the receipt of Transaction.',
      'description' => '',
      'required' => $this->_settings['receipt'] ? true : false,
      'priority' => 99998,
      'accept' => 'image/*',
    ));
    $this->file->addValidator('Extension', false, 'jpg,png,gif,jpeg,webp');
    
    $this->addElement('Button', 'submit', array(
      'label' => 'Proceed',
      'order'=>1001,
      'type' => 'submit',
    ));
  }
}
