Example #1
0
File: News.php Project: arbi/MyCode
 public function __construct($name = null, $data)
 {
     parent::__construct($name);
     $name = $this->getName();
     if (null === $name) {
         $this->setName('news');
     }
     $this->add(array('name' => 'title', 'options' => array('label' => ''), 'attributes' => array('type' => 'text', 'class' => 'form-control col-md-12', 'id' => 'title', 'maxlength' => 150)));
     $this->add(array('name' => 'body', 'options' => array('label' => ''), 'attributes' => array('type' => 'textarea', 'class' => 'tinymce', 'rows' => '4', 'id' => 'body')));
     $this->add(array('name' => 'edit_id', 'attributes' => array('type' => 'hidden', 'id' => 'edit_id')));
     $this->add(['name' => 'date', 'options' => ['label' => ''], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'date', 'maxlength' => 50]]);
     $buttons_save = 'Create News Post';
     if (is_object($data)) {
         $buttons_save = 'Save Changes';
     }
     $this->add(array('name' => 'save_button', 'options' => array('label' => $buttons_save), 'attributes' => array('type' => 'button', 'class' => 'btn btn-primary col-sm-2 col-xs-12 margin-left-10 pull-right', 'data-loading-text' => 'Saving...', 'id' => 'save_button', 'value' => 'Save')));
     if (is_object($data)) {
         $objectData = new \ArrayObject();
         $objectData['title'] = $data->getEn_title();
         $objectData['body'] = $data->getEn();
         $objectData['edit_id'] = $data->getId();
         $objectData['date'] = date(Constants::GLOBAL_DATE_FORMAT, strtotime($data->getDate()));
         $this->bind($objectData);
     }
 }
Example #2
0
 public function __construct($activeUsers, $id = false, $allActiveCategoriesArray = false, $valuableAssetsStatuses = false, $data = false)
 {
     parent::__construct('assets-consumable-form');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'name', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'name', 'required' => true)));
     $this->add(array('name' => 'location', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'form-control', 'id' => 'location', 'required' => true)));
     $this->add(array('name' => 'serial_number', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'serial-number', 'required' => true)));
     $this->add(array('name' => 'assignee', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $activeUsers), 'attributes' => array('class' => 'form-control selectize', 'id' => 'assignee')));
     $this->add(['name' => 'description', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => ['class' => 'form-control', 'rows' => 3, 'id' => 'description', 'maxlength' => 250]]);
     if (FALSE !== $allActiveCategoriesArray) {
         $this->add(array('name' => 'category_id', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $allActiveCategoriesArray), 'attributes' => array('class' => 'form-control selectize', 'id' => 'category-id')));
     }
     if (FALSE !== $valuableAssetsStatuses) {
         unset($valuableAssetsStatuses[0]);
         $this->add(array('name' => 'status', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $valuableAssetsStatuses), 'attributes' => array('class' => 'form-control selectize', 'id' => 'status')));
     }
     if (FALSE !== $id) {
         $this->add(['name' => 'id', 'attributes' => ['type' => 'hidden', 'id' => 'asset-id']]);
     }
     if (FALSE !== $data) {
         $this->add(array('name' => 'last_updated_by', 'attributes' => array('type' => 'text', 'class' => 'form-control disabled', 'disabled' => true, 'id' => 'last-updated-by')));
         $this->add(['name' => 'comment_status', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => ['class' => 'form-control', 'rows' => 3, 'id' => 'comment-status', 'maxlength' => 250]]);
         $this->populateValues(['id' => $id, 'category_id' => $data->getCategoryId(), 'name' => $data->getName(), 'serial_number' => $data->getSerialNumber(), 'assignee' => $data->getAssigneeId(), 'status' => $data->getStatus(), 'description' => $data->getDescription(), 'last_updated_by' => $data->getFirstnameLastUpdated() . ' ' . $data->getLastnameLastUpdated()]);
     }
 }
Example #3
0
 public function __construct($partnerList, $partnerListFiltered, $pspList)
 {
     parent::__construct('add-transfer');
     $this->setInputFilter(new TransferFilter());
     $this->setAttribute('class', 'form-horizontal add-transfer-form');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'account_type', 'attributes' => array('type' => 'hidden', 'class' => 'account-type form-control')));
     $this->add(array('name' => 'dist_total_amount', 'attributes' => array('type' => 'hidden', 'class' => 'dist-total-amount form-control')));
     $this->add(array('name' => 'description', 'type' => 'Textarea', 'attributes' => array('type' => 'text', 'class' => 'form-control description', 'placeholder' => 'Write something clever...', 'rows' => 4)));
     $this->add(array('name' => 'amount_from', 'attributes' => array('type' => 'text', 'class' => 'form-control amount-from amount')));
     $this->add(array('name' => 'amount_to', 'attributes' => array('type' => 'text', 'class' => 'form-control amount-to amount')));
     $this->add(array('name' => 'supplier_from', 'type' => 'select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'supplier supplier-from', 'data-placeholder' => '-- Select Supplier --')));
     $this->add(array('name' => 'supplier_to', 'type' => 'select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'supplier supplier-to', 'data-placeholder' => '-- Please Select --')));
     $this->add(array('name' => 'money_account_from', 'type' => 'select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'money-account money-account-from', 'data-placeholder' => '-- Please Select --')));
     $this->add(array('name' => 'money_account_to', 'type' => 'select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'money-account money-account-to', 'data-placeholder' => '-- Please Select --')));
     $this->add(array('name' => 'partners_from', 'type' => 'select', 'options' => array('value_options' => ['' => ''] + $partnerListFiltered), 'attributes' => array('class' => 'partners-from', 'data-placeholder' => '-- Select Partner --')));
     $this->add(array('name' => 'partners_to', 'type' => 'select', 'options' => array('value_options' => ['' => ''] + $partnerList), 'attributes' => array('class' => 'partners-to', 'data-placeholder' => '-- Please Select --')));
     $this->add(array('name' => 'res_numbers', 'type' => 'select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'res-numbers', 'data-placeholder' => '-- Please Select --', 'multiple' => true)));
     $this->add(array('name' => 'dist_res_numbers', 'type' => 'select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'dist-res-numbers', 'data-placeholder' => '-- Please Select --', 'multiple' => true)));
     $this->add(array('name' => 'apartments_and_apartels', 'type' => 'select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'apartments-and-apartels', 'data-placeholder' => '-- Select an Apartment, Apartel or Fiscal --', 'multiple' => true)));
     $this->add(array('name' => 'date_from', 'attributes' => array('type' => 'text', 'class' => 'date date-from form-control')));
     $this->add(array('name' => 'date_to', 'attributes' => array('type' => 'text', 'class' => 'date date-to form-control')));
     $this->add(array('name' => 'date_to_from', 'attributes' => array('type' => 'text', 'class' => 'date date-to-from form-control', 'placeholder' => 'Date From')));
     $this->add(array('name' => 'date_to_to', 'attributes' => array('type' => 'text', 'class' => 'date date-to-to form-control', 'placeholder' => 'Date To')));
     $this->add(array('name' => 'expense_id_list[]', 'attributes' => array('type' => 'text', 'class' => 'dynamic-expense-id form-control')));
     $this->add(array('name' => 'expense_amount_list[]', 'attributes' => array('type' => 'text', 'class' => 'dynamic-expense-amount form-control')));
     $this->add(array('name' => 'psp', 'type' => 'select', 'options' => array('value_options' => $pspList), 'attributes' => array('class' => 'psp', 'data-placeholder' => '-- Select PSP --')));
     $this->add(array('name' => 'collection_period', 'attributes' => array('type' => 'text', 'class' => 'collection-period form-control')));
     $this->add(array('name' => 'add', 'attributes' => array('type' => 'submit', 'class' => 'btn btn-primary pull-right add-transfer', 'value' => 'Add Transfer')));
 }
Example #4
0
File: Blog.php Project: arbi/MyCode
 public function __construct($name = null, $data)
 {
     parent::__construct($name);
     $name = $this->getName();
     if (null === $name) {
         $this->setName('blog');
     }
     $this->add(['name' => 'title', 'options' => ['label' => ''], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'title']]);
     $this->add(['name' => 'body', 'options' => ['label' => ''], 'attributes' => ['type' => 'textarea', 'class' => 'tinymce', 'rows' => '4', 'id' => 'body']]);
     $this->add(['name' => 'img', 'options' => ['label' => ''], 'attributes' => ['type' => 'file', 'class' => 'hidden-file-input', 'id' => 'img', 'accept' => 'image/*']]);
     $this->add(['name' => 'edit_id', 'attributes' => ['type' => 'hidden', 'id' => 'edit_id']]);
     $this->add(['name' => 'edit_title', 'attributes' => ['type' => 'hidden', 'id' => 'edit_title']]);
     $this->add(['name' => 'img_post', 'attributes' => ['type' => 'hidden', 'id' => 'img_post']]);
     $this->add(['name' => 'date', 'options' => ['label' => ''], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'date', 'maxlength' => 50]]);
     $buttons_save = 'Create Travel Blog Post';
     if (is_object($data)) {
         $buttons_save = 'Save Changes';
     }
     $this->add(['name' => 'save_button', 'options' => ['label' => $buttons_save], 'attributes' => ['type' => 'button', 'data-loading-text' => 'Saving...', 'id' => 'save_button', 'value' => 'Save', 'class' => 'btn btn-primary pull-right col-xs-12 col-sm-2 margin-left-10']]);
     if (is_object($data)) {
         $objectData = new \ArrayObject();
         $objectData['title'] = $data->getTitle();
         $objectData['body'] = $data->getContent();
         $objectData['edit_id'] = $data->getId();
         $objectData['edit_title'] = $data->getTitle();
         $objectData['img_post'] = $data->getImg();
         $objectData['date'] = date(Constants::GLOBAL_DATE_FORMAT, strtotime($data->getDate()));
         $this->bind($objectData);
     }
 }
Example #5
0
 /**
  * @param int|null|string $name
  * @param object $data
  */
 public function __construct($name, $data, $options)
 {
     parent::__construct($name);
     $pspList = $options->get('pspList');
     $pspArray = ['' => '-- Choose PSP --'];
     if ($pspList && $pspList->count()) {
         foreach ($pspList as $psp) {
             $pspArray[$psp->getId()] = $psp->getShortName();
         }
     }
     $this->setName($name);
     $name_attr = array('type' => 'text', 'class' => 'form-control', 'id' => 'name', 'maxlength' => 150, 'value' => $data->getName());
     $conciergeEmailAttr = ['type' => 'text', 'class' => 'form-control', 'id' => 'concierge_email', 'maxlength' => 255];
     $this->add(['name' => 'concierge_email', 'attributes' => $conciergeEmailAttr]);
     $this->add(array('name' => 'name', 'attributes' => $name_attr));
     $buttons_save = 'Save Changes';
     $this->add(array('name' => 'save_button', 'options' => array('label' => $buttons_save), 'attributes' => array('type' => 'button', 'class' => 'btn btn-primary state col-sm-2 col-xs-12 margin-left-10 pull-right', 'data-loading-text' => 'Saving...', 'id' => 'save_button', 'value' => 'Save')));
     $this->add(['name' => 'psp_id', 'type' => 'Zend\\Form\\Element\\Select', 'options' => ['label' => 'PSP', 'value_options' => $pspArray], 'attributes' => ['class' => 'form-control', 'id' => 'psp-id']]);
     if (is_object($data)) {
         $objectData = new \ArrayObject();
         $objectData['concierge_email'] = $data->getEmail();
         $objectData['psp_id'] = $data->getPspId();
         $this->bind($objectData);
     }
 }
Example #6
0
 public function __construct($options)
 {
     parent::__construct('search-form');
     $this->setAttributes(['action' => '', 'method' => 'post', 'role' => 'form', 'id' => 'booking-form']);
     $this->setName('booking-form');
     $this->add(array('name' => 'first-name', 'attributes' => array('type' => 'hidden', 'maxlength' => 250)));
     $this->add(array('name' => 'last-name', 'attributes' => array('type' => 'hidden', 'maxlength' => 250)));
     $this->add(array('name' => 'email', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'phone', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'remarks', 'attributes' => array('type' => 'hidden', 'maxlength' => 1000)));
     $this->add(array('name' => 'aff-id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'aff-ref', 'attributes' => array('type' => 'hidden', 'maxlength' => 200)));
     $this->add(['name' => 'apartel', 'attributes' => ['id' => 'apartel']]);
     $this->add(array('name' => 'not_send_mail', 'attributes' => array('type' => 'hidden', 'id' => 'not_send_mail')));
     $this->add(array('name' => 'credit_card_type', 'attributes' => array('type' => 'hidden', 'id' => 'credit_card_type')));
     $this->add(array('name' => 'address', 'attributes' => array('type' => 'text', 'class' => 'input-lg form-control', 'tabindex' => '8', 'id' => 'address', 'maxlength' => 400, 'minlength' => 2)));
     $this->add(array('name' => 'country', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('type' => 'text', 'class' => 'input-lg form-control', 'value' => $this->getUserCountry(), 'tabindex' => '9'), 'options' => array('value_options' => $this->getCountris($options['countris']))));
     $this->add(array('name' => 'city', 'attributes' => array('type' => 'text', 'class' => 'input-lg form-control', 'tabindex' => '10', 'maxlength' => 100)));
     $this->add(array('name' => 'zip', 'attributes' => array('type' => 'text', 'class' => 'input-lg form-control', 'tabindex' => '11', 'maxlength' => 50, 'minlength' => 3)));
     $this->add(array('name' => 'number', 'attributes' => array('type' => 'number', 'class' => 'input-lg form-control', 'id' => 'cc-number', 'maxlength' => 16, 'tabindex' => '12')));
     $this->add(array('name' => 'holder', 'attributes' => array('type' => 'text', 'class' => 'input-lg form-control', 'id' => 'form-cc-holder-name', 'maxlength' => 300, 'tabindex' => '13')));
     $this->add(array('name' => 'month', 'options' => array('value_options' => $this->getMonth()), 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('id' => 'form-cc-exp-month', 'class' => 'input-lg form-control expdate', 'tabindex' => '14', 'data-today' => date('Ym'))));
     $this->add(array('name' => 'year', 'options' => array('value_options' => $this->getYear()), 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('id' => 'form-cc-exp-year', 'class' => 'input-lg form-control expdate', 'tabindex' => '15', 'data-today' => date('Ym'))));
     $this->add(array('name' => 'cvc', 'attributes' => array('type' => 'number', 'class' => 'input-lg form-control', 'id' => 'form-cc-cvc', 'maxlength' => 4, 'minlength' => 3, 'tabindex' => '16')));
     $this->add(array('name' => 'noCreditCard', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('id' => 'noCreditCard'), 'options' => array('use_hidden_element' => true, 'checked_value' => 1, 'unchecked_value' => 0)));
     $this->add(array('name' => 'search_button', 'type' => 'Zend\\Form\\Element\\Button', 'options' => array('label' => 'Search'), 'attributes' => array('class' => 'btn btn-primary btn-medium', 'data-loading-text' => 'Saving...', 'value' => 'Search', 'id' => 'search_button')));
 }
Example #7
0
 public function __construct($name = 'apartment_details', $options = [])
 {
     parent::__construct($name);
     $this->setName($name);
     $this->setAttribute('method', 'POST');
     $this->setAttribute('action', 'details/save');
     $this->setAttribute('class', 'form-horizontal');
     /********************** FINANCIAL DETAILS ***************************/
     // Monthly Budget
     $this->add(['name' => 'monthly_cost', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'monthly_cost', 'class' => 'form-control text-right'], 'options' => ['label' => 'Monthly Budget']]);
     // Monthly Budget
     $this->add(['name' => 'notify_negative_profit', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => ['id' => 'notify_negative_profit'], 'options' => ['label' => 'Monitor Performance']]);
     // Startup Budget
     $this->add(['name' => 'startup_cost', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'startup_cost', 'class' => 'form-control text-right'], 'options' => ['label' => 'Startup Budget']]);
     $this->add(['name' => 'cleaning_fee', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'cleaning_fee', 'class' => 'form-control text-right'], 'options' => ['label' => 'Cleaning Fee']]);
     $this->add(['name' => 'extra_person_fee', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'extra_person_fee', 'class' => 'form-control text-right'], 'options' => ['label' => 'Extra Person Fee']]);
     /********************** INTERNET ***************************/
     $this->add(['name' => 'primary_wifi_network', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'primary_wifi_network', 'class' => 'form-control'], 'options' => ['label' => 'Primary WiFi Network']]);
     $this->add(['name' => 'primary_wifi_pass', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'primary_wifi_pass', 'class' => 'form-control'], 'options' => ['label' => 'Primary WiFi Password']]);
     $this->add(['name' => 'secondary_wifi_network', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'secondary_wifi_network', 'class' => 'form-control'], 'options' => ['label' => 'Secondary WiFi Network']]);
     $this->add(['name' => 'secondary_wifi_pass', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'secondary_wifi_pass', 'class' => 'form-control'], 'options' => ['label' => 'Secondary WiFi Password']]);
     // lock
     $this->add(['name' => 'lock_id', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'lock_id', 'value' => '0', 'class' => 'form-control'], 'options' => ['label' => 'Lock', 'value_options' => isset($options['freeLocks']) ? $options['freeLocks'] : [], 'disable_inarray_validator' => true]]);
     // Parking Spot
     $this->add(['name' => 'parking_spot_ids', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'parking_spot_ids', 'value' => '0', 'class' => 'form-control', 'multiple' => 'multiple'], 'options' => ['label' => 'Preferable Spots', 'value_options' => isset($options['parkingSpots']) ? $options['parkingSpots'] : [], 'disable_inarray_validator' => true]]);
     // Show Entry Code
     $this->add(['name' => 'show_apartment_entry_code', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => ['id' => 'show_apartment_entry_code', 'value' => '0'], 'options' => ['label' => 'Show Entry Code']]);
     // Save button
     $this->add(['name' => 'save_button', 'options' => ['label' => false], 'attributes' => ['type' => 'submit', 'data-loading-text' => 'Saving...', 'id' => 'save_button', 'value' => 'Save Changes', 'class' => 'btn btn-primary col-sm-2 col-xs-12 margin-left-10 pull-right']]);
 }
Example #8
0
 public function __construct()
 {
     parent::__construct('assets-consumable-search-form');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'location', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'form-control', 'id' => 'location')));
     $this->add(array('name' => 'running_out', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $this->getRunningOutOptions()), 'attributes' => array('class' => 'form-control', 'id' => 'running-out')));
 }
Example #9
0
 public function __construct($activeUsers, $assetValuableStatuses)
 {
     parent::__construct('assets-consumable-form');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'location', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => []), 'attributes' => array('class' => 'form-control', 'id' => 'location')));
     $this->add(array('name' => 'status', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $assetValuableStatuses), 'attributes' => array('class' => 'form-control', 'id' => 'status')));
     $this->add(array('name' => 'assignee', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $activeUsers), 'attributes' => array('class' => 'form-control selectize', 'id' => 'assignee')));
 }
Example #10
0
 public function __construct($name = '')
 {
     parent::__construct($name);
     $this->setAttributes(['action' => '/user/ajax-plan-evaluation', 'method' => 'post', 'class' => 'form-horizontal', 'id' => 'plan-evaluation-form']);
     $this->add(['name' => 'plan_date', 'type' => 'Text', 'attributes' => ['id' => 'plan_date', 'class' => 'form-control datepicker']]);
     $this->add(['name' => 'plan_creator_id', 'type' => 'Hidden', 'attributes' => ['id' => 'plan_creator_id']]);
     $this->add(['name' => 'plan_user_id', 'type' => 'Hidden', 'attributes' => ['id' => 'plan_user_id']]);
     $this->add(['name' => 'plan_evaluation_description', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => ['id' => 'plan_evaluation_description', 'class' => 'form-control evaluation-description tinymce', 'rows' => 10]]);
 }
Example #11
0
 /**
  * @param ServiceLocatorInterface $sm
  */
 public function __construct($categoryId)
 {
     parent::__construct('apartment-review-category-form');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'name', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'name')));
     $this->add(array('name' => 'type', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => Objects::getApartmentReviewCategoryStatus()), 'attributes' => array('class' => 'form-control', 'id' => 'type')));
     $this->add(array('name' => 'save', 'attributes' => array('type' => 'submit', 'class' => 'btn btn-primary state save-bank-account col-sm-2 col-xs-12 margin-left-10 pull-right', 'value' => $categoryId > 0 ? 'Save Changes' : 'Add New Code')));
 }
Example #12
0
 public function __construct()
 {
     parent::__construct('venue-items-form');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(['name' => 'titles[]', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['class' => 'form-control venue-item-title', 'id' => 'add-item-title', 'placeholder' => 'Name']]);
     $this->add(['name' => 'descriptions[]', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['class' => 'form-control venue-item-description', 'id' => 'add-item-description', 'placeholder' => 'Description']]);
     $this->add(['name' => 'prices[]', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => ['class' => 'form-control venue-item-price', 'step' => '0.01', 'id' => 'add-item-price', 'placeholder' => 'Price']]);
     $this->add(['name' => 'availabilities[]', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['class' => 'form-control venue-item-availability', 'id' => 'add-item-availability'], 'options' => ['label' => 'Charged User', 'disable_inarray_validator' => true, 'value_options' => ItemsService::getStatuses()]]);
 }
Example #13
0
 /**
  * @param int|null|string $categoryId
  * @param array $cities
  */
 public function __construct($categoryId, $cities)
 {
     parent::__construct('storage-form');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'name', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'name')));
     $this->add(array('name' => 'city', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $this->cityList($cities)), 'attributes' => array('class' => 'form-control', 'id' => 'city')));
     $this->add(array('name' => 'address', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'address')));
     $this->add(array('name' => 'save', 'attributes' => array('type' => 'submit', 'class' => 'btn btn-primary state save-bank-account col-sm-2 col-xs-12 margin-left-10 pull-right', 'value' => $categoryId > 0 ? 'Save Changes' : 'Add New Storage')));
 }
Example #14
0
 public function __construct($apartmentId, $name = 'apartment_general', $preparedData = [])
 {
     parent::__construct($name);
     if (count($preparedData)) {
         $this->setBuildingOptions($preparedData['buildingOptions']);
     }
     $this->setName($name);
     $this->setAttribute('method', 'POST');
     $this->setAttribute('action', 'general/save');
     $this->setAttribute('class', 'form-horizontal');
     // add filter for form
     $generalFilter = new GeneralFilter();
     $this->setInputFilter($generalFilter->getInputFilter());
     // ID
     $this->add(['name' => 'id', 'attributes' => ['type' => 'hidden', 'value' => 0, 'id' => 'aId']]);
     // Name
     $this->add(['name' => 'apartment_name', 'options' => ['label' => 'Promotional Name', 'required' => true], 'attributes' => ['type' => 'text', 'id' => 'apartment_name', 'class' => 'form-control', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'title' => 'Apartment name can only contain letters and a space, and the length should not exceed 40 characters']]);
     // Building
     $this->add(['name' => 'building_id', 'options' => ['label' => 'Building', 'value_options' => $this->buildingOptions, 'disable_inarray_validator' => true, 'required' => true], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'building_id', 'class' => 'form-control']]);
     $this->add(['type' => 'Zend\\Form\\Element\\Select', 'name' => 'building_section', 'options' => ['label' => 'Building Section', 'value_options' => [], 'disable_inarray_validator' => true, 'required' => true], 'attributes' => ['id' => 'building_section', 'class' => 'form-control']]);
     // Status
     if ($apartmentId > 0) {
         $statuses = Objects::getProductStatuses();
     } else {
         $statuses = [Objects::PRODUCT_STATUS_SANDBOX => 'Sandbox'];
     }
     $this->add(['name' => 'status', 'options' => ['label' => 'Status', 'value_options' => $statuses, 'required' => true], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('id' => 'status', 'class' => 'form-control')]);
     /************************************* METRICS *************************************/
     // Room count
     $this->add(['name' => 'room_count', 'options' => ['label' => 'Room Count'], 'attributes' => ['type' => 'number', 'id' => 'room_count', 'class' => 'form-control']]);
     // Square meters
     $this->add(['name' => 'square_meters', 'options' => array('label' => 'Square Meters'), 'attributes' => ['type' => 'text', 'id' => 'square_meters', 'class' => 'form-control']]);
     // Max. capacity
     $this->add(['name' => 'max_capacity', 'options' => ['label' => 'Max. Capacity', 'required' => true], 'attributes' => ['type' => 'number', 'id' => 'max_capacity', 'class' => 'form-control']]);
     // Bedrooms
     $this->add(['name' => 'bedrooms', 'options' => ['label' => 'Bedrooms'], 'attributes' => ['type' => 'number', 'id' => 'bedrooms', 'class' => 'form-control']]);
     // Bathrooms
     $this->add(['name' => 'bathrooms', 'options' => array('label' => 'Bathrooms'), 'attributes' => ['type' => 'number', 'id' => 'bathrooms', 'class' => 'form-control']]);
     /************************************* POLICY *************************************/
     // Check in time
     $this->add(['name' => 'chekin_time', 'options' => ['label' => 'Check-in'], 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'chekin_time', 'class' => 'form-control datetimepicker']]);
     // Check out time
     $this->add(['name' => 'chekout_time', 'options' => ['label' => 'Check-out'], 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['id' => 'chekout_time', 'class' => 'form-control datetimepicker']]);
     /************************************* DESCRIPTIONS *************************************/
     // General description Textline ID
     $this->add(['name' => 'general_description_textline', 'attributes' => ['type' => 'hidden', 'value' => 0, 'class' => 'form-control']]);
     // General description
     $this->add(['name' => 'general_description', 'options' => ['label' => 'General Description', 'required' => true], 'attributes' => ['type' => 'textarea', 'id' => 'general_description', 'class' => 'form-control tinymce']]);
     $btnName = 'Save Changes';
     if (!$apartmentId) {
         $btnName = 'Add Apartment';
     }
     // Save button
     $this->add(['name' => 'save_button', 'type' => 'Zend\\Form\\Element\\Button', 'options' => ['label' => $btnName], 'attributes' => ['data-loading-text' => 'Saving...', 'id' => 'save_button', 'value' => $btnName, 'class' => 'btn btn-primary col-sm-2 col-xs-12 pull-right']]);
 }
Example #15
0
 public function __construct()
 {
     parent::__construct('connection');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->setAttribute('action', 'apartel/connection/save');
     $this->add(array('name' => 'cubilis_id', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'cubilis_id'), 'options' => ['label' => 'Cubilis ID']));
     $this->add(array('name' => 'cubilis_username', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'cubilis_username'), 'options' => ['label' => 'Cubilis Username']));
     $this->add(array('name' => 'cubilis_password', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'cubilis_password'), 'options' => ['label' => 'Cubilis Password']));
     $this->add(['name' => 'save_button', 'options' => ['label' => false], 'attributes' => ['type' => 'submit', 'data-loading-text' => 'Saving...', 'class' => 'btn btn-primary col-sm-2 col-xs-12 margin-left-10 pull-right', 'id' => 'save_button', 'value' => 'Save']]);
 }
Example #16
0
 public function __construct($name = '')
 {
     parent::__construct($name);
     $this->setAttributes(['action' => '/user/ajax-add-evaluation', 'method' => 'post', 'class' => 'form-horizontal', 'id' => 'add-evaluation-form']);
     $this->add(['name' => 'evaluation_id', 'type' => 'Hidden', 'attributes' => ['id' => 'evaluation_id']]);
     $this->add(['name' => 'evaluation_user_id', 'type' => 'Hidden', 'attributes' => ['id' => 'evaluation_user_id']]);
     $this->add(['name' => 'evaluation_creator_id', 'type' => 'Hidden', 'attributes' => ['id' => 'evaluation_creator_id']]);
     $this->add(['name' => 'evaluation_type_id', 'type' => 'Zend\\Form\\Element\\Select', 'options' => ['value_options' => Evaluations::getEvaluationTypeOptions()], 'attributes' => ['id' => 'evaluation_type_id', 'class' => 'form-control']]);
     $this->add(['name' => 'evaluation_date_created', 'type' => 'Hidden', 'attributes' => ['id' => 'evaluation_date_created']]);
     $this->add(['name' => 'evaluation_description', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => ['id' => 'evaluation_description', 'class' => 'form-control evaluation-description tinymce', 'rows' => 10]]);
 }
Example #17
0
 public function __construct($options)
 {
     parent::__construct('booking-form');
     $this->setAttributes(['action' => '', 'method' => 'post', 'class' => 'form-horizontal', 'id' => 'document-form', 'enctype' => 'multipart/form-data']);
     $this->setName('booking-form');
     $this->add(['name' => 'doc_description', 'options' => ['label' => ''], 'attributes' => ['type' => 'textarea', 'class' => 'form-control tinymce', 'rows' => '12', 'id' => 'doc_description']]);
     $this->add(['name' => 'uploaded_files', 'options' => ['label' => ''], 'attributes' => ['type' => 'file', 'class' => 'hidden-file-input uploaded_files', 'data-max-size' => '52428800', 'multiple' => true]]);
     $buttonname = 'Add Document';
     $this->add(['name' => 'save_button', 'type' => 'Zend\\Form\\Element\\Button', 'options' => ['label' => $buttonname], 'attributes' => ['class' => 'btn btn-primary pull-right margin-left-5', 'data-loading-text' => 'Saving...', 'id' => 'save_button']]);
     $this->add(['name' => 'delete_data', 'attributes' => ['type' => 'hidden', 'id' => 'delete_data']]);
 }
Example #18
0
 public function __construct($data, $options)
 {
     parent::__construct('document-form');
     $this->setAttributes(['action' => '', 'method' => 'post', 'class' => 'form-horizontal', 'id' => 'document-form', 'enctype' => 'multipart/form-data']);
     $this->setName('document-form');
     $category = [];
     foreach ($options['list'] as $row) {
         $category[$row->getId()] = $row->getName();
     }
     $this->add(['name' => 'category', 'options' => ['label' => 'Type', 'value_options' => $category], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'category', 'class' => 'form-control custom-selectize']]);
     $securityLevelOptions = [0 => '-- Please Select --'] + $options['security_level'];
     $legalEntityArray = $options['legalEntityArray'];
     $signatoriesArray = $options['signatoriesArray'];
     $this->add(['name' => 'security_level', 'options' => ['label' => 'Security', 'value_options' => $securityLevelOptions], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'security_level', 'class' => 'form-control custom-selectize']]);
     $this->add(['name' => 'legal_entity_id', 'options' => ['label' => 'Legal Entity', 'value_options' => $legalEntityArray], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'legal_entity_id', 'class' => 'form-control custom-selectize']]);
     $this->add(['name' => 'signatory_id', 'options' => ['label' => 'Signatory', 'value_options' => $signatoriesArray], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'signatory_id', 'class' => 'form-control custom-selectize']]);
     $this->add(['name' => 'username', 'options' => ['label' => 'Username'], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'username', 'maxlength' => 50]]);
     $this->add(['name' => 'gaghtnabarr', 'options' => ['label' => 'Password'], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'gaghtnabarr', 'maxlength' => 50]]);
     $this->add(['name' => 'url', 'options' => ['label' => 'URL'], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'url', 'maxlength' => 500, 'placeholder' => 'http://example.com']]);
     $this->add(['name' => 'description', 'options' => ['label' => 'Description'], 'attributes' => ['type' => 'textarea', 'class' => 'form-control tinymce', 'rows' => '12', 'id' => 'description']]);
     $this->add(['name' => 'attachment_doc', 'options' => ['label' => 'Attachment'], 'attributes' => ['type' => 'file', 'id' => 'attachment_doc', 'class' => 'hidden-file-input', 'data-max-size' => '52428800']]);
     $this->add(['name' => 'account_number', 'options' => ['label' => 'Account Number'], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'account_number', 'maxlength' => 255]]);
     $this->add(['name' => 'account_holder', 'options' => ['label' => 'Account Holder'], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'account_holder', 'maxlength' => 255]]);
     $this->add(['name' => 'valid_from', 'options' => ['label' => 'Valid From'], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'valid_from', 'maxlength' => 25]]);
     $this->add(['name' => 'valid_to', 'options' => ['label' => 'Valid To'], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'valid_to', 'maxlength' => 25]]);
     $this->add(['name' => 'is_frontier', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => ['id' => 'is_frontier'], 'options' => ['label' => 'Frontier']]);
     $this->add(['name' => 'supplier_id', 'type' => 'Zend\\Form\\Element\\Select', 'options' => ['label' => 'Supplier', 'value_options' => $this->getSuppliers($options['suppliers'])], 'attributes' => ['class' => 'form-control custom-selectize', 'id' => 'supplier_id']]);
     $this->add(['name' => 'edit_id', 'attributes' => ['type' => 'hidden', 'id' => 'edit_id']]);
     $buttonname = 'Add Document';
     if (is_object($data)) {
         $buttonname = 'Save Changes';
     }
     $this->add(['name' => 'save_button', 'type' => 'Zend\\Form\\Element\\Button', 'options' => ['label' => $buttonname], 'attributes' => ['class' => 'btn btn-primary pull-right margin-left-10 col-sm-2 col-xs-12 state', 'data-loading-text' => 'Saving...', 'id' => 'save_button']]);
     $this->add(['name' => 'delete_button', 'options' => ['label' => 'Delete Document'], 'attributes' => ['type' => 'button', 'data-toggle' => 'modal', 'data-target' => '#delete-modal', 'class' => 'btn btn-danger pull-right margin-left-10 col-sm-2 col-xs-12 state', 'data-loading-text' => 'Saving...', 'id' => 'delete_button']]);
     if (is_object($data)) {
         $objectData = new \ArrayObject();
         $objectData['edit_id'] = $data->getID();
         $objectData['category'] = $data->getTypeID();
         $objectData['username'] = $data->getUsername();
         $objectData['gaghtnabarr'] = $data->getPassword();
         $objectData['url'] = $data->getUrl();
         $objectData['description'] = $data->getDescription();
         $objectData['account_number'] = $data->getAccountNumber();
         $objectData['account_holder'] = $data->getAccountHolder();
         $objectData['security_level'] = $data->getSecurityLevel();
         $objectData['supplier_id'] = $data->getSupplierId();
         $objectData['valid_from'] = $data->getValidFrom() === null ? '' : date(Constants::GLOBAL_DATE_FORMAT, strtotime($data->getValidFromJQueqryDatePickerFormat()));
         $objectData['valid_to'] = $data->getValidTo() === null ? '' : date(Constants::GLOBAL_DATE_FORMAT, strtotime($data->getValidToJQueqryDatePickerFormat()));
         $objectData['signatory_id'] = $data->getSignatoryId();
         $objectData['legal_entity_id'] = $data->getLegalEntityId();
         $objectData['is_frontier'] = $data->getIsFrontier();
         $this->bind($objectData);
     }
 }
Example #19
0
 /**
  * @param int|null|string $categoryId
  */
 public function __construct($categoryId)
 {
     parent::__construct('asset-category-form');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'name', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'name')));
     $this->add(array('name' => 'type', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => [0 => '-- Choose Type --'] + CategoryService::$categoryTypes), 'attributes' => array('class' => 'form-control', 'id' => 'type')));
     $this->add(array('name' => 'sku_names[]', 'attributes' => array('type' => 'text', 'class' => 'form-control sku-name', 'maxlength' => 45)));
     $this->add(array('name' => 'aliases[]', 'attributes' => array('type' => 'text', 'class' => 'form-control alias-name', 'maxlength' => 45)));
     $this->add(array('name' => 'save', 'attributes' => array('type' => 'submit', 'class' => 'btn btn-primary state save-bank-account col-sm-2 col-xs-12 margin-left-10 pull-right', 'value' => $categoryId > 0 ? 'Save Changes' : 'Add New Category')));
 }
Example #20
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $name = $this->getName();
     if (null === $name) {
         $this->setName('changePassword');
     }
     $this->add(array('name' => 'password', 'options' => array('label' => ''), 'attributes' => array('class' => 'form-control', 'type' => 'password', 'id' => 'password', 'maxlength' => 20)));
     $this->add(array('name' => 'currentPassword', 'options' => array('label' => ''), 'attributes' => array('class' => 'form-control', 'type' => 'password', 'id' => 'currentPassword', 'maxlength' => 20)));
     $this->add(array('name' => 'passwordVerify', 'options' => array('label' => ''), 'attributes' => array('class' => 'form-control', 'type' => 'password', 'id' => 'passwordVerify', 'maxlength' => 20)));
     $this->add(array('name' => 'userId', 'attributes' => array('type' => 'hidden', 'id' => 'userId')));
 }
Example #21
0
File: Rate.php Project: arbi/MyCode
 public function __construct($data, $name = 'apartel-rate')
 {
     parent::__construct($name);
     $this->setName($name);
     $this->setAttribute('method', 'POST');
     $this->setAttribute('class', 'form-horizontal');
     $isParent = $data['is_parent'];
     $nameValue = $isParent ? 'Standard Rate' : '';
     // Rate Id
     $this->add(['name' => 'rate_id', 'attributes' => ['type' => 'hidden', 'value' => 0]]);
     // Type Id
     $this->add(['name' => 'type_id', 'attributes' => ['type' => 'hidden', 'value' => $data['type_id']]]);
     // Name
     $this->add(['name' => 'rate_name', 'options' => ['label' => 'Name'], 'attributes' => ['type' => 'text', 'id' => 'rate_name', 'value' => $nameValue, 'class' => 'form-control']]);
     // Active
     $this->add(['name' => 'active', 'type' => 'Zend\\Form\\Element\\Select', 'options' => ['label' => 'Active', 'value_options' => $this->getActiveOptions($isParent)], 'attributes' => ['id' => 'active', 'class' => 'form-control']]);
     // type
     $this->add(['name' => 'type', 'type' => 'Zend\\Form\\Element\\Select', 'options' => ['label' => 'Type', 'value_options' => $this->getTypeOptions($isParent)], 'attributes' => ['disabled' => $isParent, 'id' => 'type', 'class' => 'form-control']]);
     // Capacity
     $this->add(['name' => 'capacity', 'type' => 'Zend\\Form\\Element\\Number', 'options' => ['label' => 'Capacity'], 'attributes' => ['type' => 'number', 'id' => 'capacity', 'data-max-capacity' => $data['apartment_max_pax'], 'class' => 'form-control']]);
     // Week Day Price
     $this->add(['name' => 'week_price', 'type' => 'Zend\\Form\\Element\\Text', 'options' => ['label' => 'Week Day Price', 'required' => true], 'attributes' => ['id' => 'week_price', 'class' => 'form-control current-rate-price']]);
     // Weekend Price
     $this->add(['name' => 'weekend_price', 'type' => 'Zend\\Form\\Element\\Text', 'options' => ['label' => 'Weekend Price', 'required' => true], 'attributes' => ['id' => 'weekend_price', 'class' => 'form-control current-rate-price']]);
     // Minimum Stay
     $this->add(['name' => 'min_stay', 'type' => 'Zend\\Form\\Element\\Number', 'options' => ['label' => 'MIN', 'required' => true], 'attributes' => ['type' => 'number', 'id' => 'min_stay', 'class' => 'form-control']]);
     // Maximum Stay
     $this->add(['name' => 'max_stay', 'type' => 'Zend\\Form\\Element\\Number', 'options' => ['label' => 'MAX', 'required' => true], 'attributes' => ['type' => 'number', 'id' => 'max_stay', 'class' => 'form-control']]);
     // Release window start
     $this->add(['name' => 'release_window_start', 'type' => 'Zend\\Form\\Element\\Number', 'options' => ['label' => 'Start', 'required' => true], 'attributes' => ['placeholder' => '', 'type' => 'text', 'id' => 'release_window_start', 'class' => 'form-control']]);
     // Release window end
     $this->add(['name' => 'release_window_end', 'type' => 'Zend\\Form\\Element\\Number', 'options' => ['label' => 'End', 'required' => true], 'attributes' => ['placeholder' => '', 'type' => 'text', 'id' => 'release_window_end', 'class' => 'form-control']]);
     // Refundable or Non Refundable
     $this->add(['name' => 'is_refundable', 'options' => ['label' => 'This rate is', 'value_options' => ['2' => 'Non Refundable ', '1' => 'Refundable']], 'type' => 'Zend\\Form\\Element\\Radio', 'attributes' => ['id' => 'is_refundable', 'value' => 1]]);
     // Refundable before hours
     for ($days = 1; $days <= 7; $days++) {
         $hourOptions[$days * 24] = $days . ' days';
     }
     $hourOptions[14 * 24] = '14 days';
     $hourOptions[30 * 24] = '30 days';
     $this->add(['name' => 'refundable_before_hours', 'options' => ['label' => 'Before', 'value_options' => $hourOptions], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'refundable_before_hours', 'class' => 'form-control']]);
     // Refundable type
     $this->add(['name' => 'penalty_type', 'options' => ['label' => false, 'value_options' => ['1' => 'Percent Penalty', '2' => 'Fixed Penalty', '3' => 'Nights Penalty']], 'type' => 'Zend\\Form\\Element\\Radio', 'attributes' => ['id' => 'penalty_type', 'value' => 1]]);
     // Refund percent
     $this->add(['name' => 'penalty_percent', 'options' => ['label' => false, 'appendText' => '%'], 'attributes' => ['placeholder' => '', 'type' => 'text', 'id' => 'penalty_percent', 'class' => 'form-control']]);
     // Refund amount
     $this->add(['name' => 'penalty_fixed_amount', 'options' => ['label' => false, 'appendText' => $data['currency']], 'attributes' => ['placeholder' => '', 'type' => 'text', 'id' => 'penalty_fixed_amount', 'class' => 'form-control']]);
     // Refund nights
     $nightOptions = [1 => '1 night', 2 => '2 nights', 3 => '3 nights', 4 => '4 nights', 5 => '5 nights', 6 => '6 nights'];
     $this->add(['name' => 'penalty_nights', 'options' => ['label' => false, 'value_options' => $nightOptions], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'penalty_nights', 'class' => 'form-control']]);
     $this->add(['name' => 'save_button', 'options' => ['label' => false], 'attributes' => ['type' => 'submit', 'data-loading-text' => 'Saving...', 'id' => 'save_button', 'value' => 'Save', 'class' => 'btn btn-primary col-sm-2 col-xs-12 margin-left-10 pull-right']]);
     $this->add(['name' => 'delete_button', 'type' => 'Zend\\Form\\Element\\Button', 'options' => ['label' => 'Delete Rate'], 'attributes' => ['data-toggle' => 'modal', 'data-target' => '#delete-modal', 'class' => 'btn btn-danger col-sm-2 col-xs-12 margin-left-10 pull-right']], ['name' => 'delete_button', 'priority' => 9]);
 }
Example #22
0
 public function __construct($name = 'contact-us', $options = array())
 {
     parent::__construct($name);
     $this->setAttributes(['action' => '', 'method' => 'POST', 'id' => 'contact-us-form']);
     // Name
     $this->add(['name' => 'name', 'required' => true, 'attributes' => ['type' => 'text', 'id' => 'name', 'class' => 'form-control', 'placeholder' => 'Name'], 'options' => []]);
     // Email
     $this->add(['name' => 'email', 'required' => true, 'attributes' => ['type' => 'email', 'id' => 'email', 'class' => 'form-control', 'placeholder' => 'Email'], 'options' => []]);
     // Guest Remarks
     $this->add(['name' => 'remarks', 'required' => true, 'attributes' => ['type' => 'textarea', 'id' => 'remarks', 'class' => 'form-control', 'placeholder' => 'Guest Remarks', 'rows' => 5], 'options' => []]);
     // Submit
     $this->add(['name' => 'submit', 'type' => 'button', 'attributes' => ['id' => 'submit', 'class' => 'btn btn-primary form-control', 'disabled' => 'disabled'], 'options' => ['label' => 'Send']]);
 }
Example #23
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->setName('order_form');
     $this->setAttribute('method', 'post')->setAttribute('class', 'form-horizontal');
     $this->add(['name' => 'title_template', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['class' => 'form-control', 'placeholder' => 'Order Name'], 'options' => ['label' => 'Name']]);
     $this->add(['name' => 'location_target', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'location_target', 'class' => 'form-control', 'data-item' => '', 'data-id' => ''], 'options' => ['label' => 'Location', 'disable_inarray_validator' => true, 'empty_option' => ' -- Select Delivery Location -- ']]);
     $this->add(['name' => 'quantity_template', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['class' => 'form-control', 'placeholder' => 'Qty', 'type' => 'number'], 'options' => ['label' => 'Qty']]);
     $this->add(['name' => 'quantity_type_template', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'quantity_type', 'class' => 'form-control'], 'options' => ['value_options' => [Order::ORDER_QUANTITY_TYPE_PIECE => 'Piece(s)', Order::ORDER_QUANTITY_TYPE_PACK => 'Pack(s)', Order::ORDER_QUANTITY_TYPE_PALETTE => 'Palette(s)']]]);
     $this->add(['name' => 'url_template', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => ['class' => 'form-control', 'placeholder' => 'Url'], 'options' => ['label' => 'Url']]);
     $this->add(['name' => 'description', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => ['id' => 'description', 'class' => 'form-control', 'rows' => 8, 'maxlength' => 5000, 'placeholder' => 'Description'], 'options' => ['label' => 'Description']]);
     $this->add(['name' => 'save_button', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => ['id' => 'save_button', 'value' => 'Create Order', 'data-loading-text' => 'Saving...', 'disabled' => true, 'class' => 'btn btn-primary pull-right col-xs-12 col-sm-2 margin-left-10 disabled'], 'options' => ['label' => 'Create Order']]);
 }
Example #24
0
File: Type.php Project: arbi/MyCode
 public function __construct($apartmentList)
 {
     parent::__construct('apartel-type');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'type_name', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'type_name'), 'options' => ['label' => 'Room Type']));
     $list = [];
     foreach ($apartmentList as $key => $apartment) {
         $list[$key] = $apartment;
     }
     $this->add(array('name' => 'apartment_list', 'options' => array('label' => 'Apartments', 'value_options' => $list), 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('id' => 'apartment_list', 'class' => 'selectize form-control', 'multiple' => 'multiple')));
     $this->add(array('name' => 'form_type_id', 'attributes' => array('type' => 'hidden', 'id' => 'form_type_id')));
     $this->add(['name' => 'save_button', 'options' => ['label' => false], 'attributes' => ['type' => 'submit', 'data-loading-text' => 'Saving...', 'class' => 'btn btn-primary col-sm-2 col-xs-12 margin-left-10 pull-right', 'id' => 'save_button', 'value' => 'Save']]);
 }
Example #25
0
 public function __construct($name = NULL, $data)
 {
     parent::__construct($name);
     $this->setAttributes(array('action' => '/user/ajax-add-document', 'method' => 'post', 'class' => 'form-horizontal', 'id' => 'add-document-form'));
     $this->add(array('name' => 'document_id', 'type' => 'Hidden', 'attributes' => array('id' => 'document_id')));
     $this->add(array('name' => 'document_user_id', 'type' => 'Hidden', 'attributes' => array('id' => 'document_user_id')));
     $this->add(array('name' => 'document_creator_id', 'type' => 'Hidden', 'attributes' => array('id' => 'document_creator_id')));
     $this->add(array('name' => 'document_type_id', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $data['documentTypes']), 'attributes' => array('id' => 'document_type_id', 'class' => 'form-control')));
     $this->add(array('name' => 'document_date_created', 'type' => 'Hidden', 'attributes' => array('id' => 'document_date_created')));
     $this->add(array('name' => 'document_description', 'type' => 'Zend\\Form\\Element\\Textarea', 'options' => array(), 'attributes' => array('id' => 'document_description', 'class' => 'form-control document-description', 'rows' => 10)));
     $this->add(array('name' => 'document_attachment', 'type' => 'Zend\\Form\\Element\\File', 'attributes' => array('id' => 'document_attachment', 'class' => 'form-control definitely-hidden', 'accept' => 'image/*,application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'data-max-size' => '52428800')));
     $this->add(array('name' => 'document_file_name', 'type' => 'Hidden', 'attributes' => array('id' => 'document_file_name')));
     $this->add(array('name' => 'document_url', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('id' => 'document_url', 'class' => 'form-control')));
 }
Example #26
0
File: Psp.php Project: arbi/MyCode
 /**
  * @param ServiceLocatorInterface $sm
  * @param int $pspId
  */
 public function __construct($sm, $pspId)
 {
     parent::__construct('psp');
     $this->sm = $sm;
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'name', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'name')));
     $this->add(array('name' => 'short_name', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'short_name')));
     $this->add(array('name' => 'money_account_id', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $this->getBankList($pspId)), 'attributes' => array('class' => 'form-control', 'id' => 'money_account_id')));
     $this->add(array('name' => 'authorization', 'type' => 'Zend\\Form\\Element\\Radio', 'attributes' => array('id' => 'authorization', 'value' => 0), 'options' => array('label_attributes' => ['class' => 'radio-inline'], 'value_options' => array('0' => 'No', '1' => 'Yes'))));
     $this->add(array('name' => 'rrn', 'type' => 'Zend\\Form\\Element\\Radio', 'attributes' => array('id' => 'rrn', 'value' => 0), 'options' => array('label_attributes' => ['class' => 'radio-inline'], 'value_options' => array('0' => 'No', '1' => 'Yes'))));
     $this->add(array('name' => 'error_code', 'type' => 'Zend\\Form\\Element\\Radio', 'attributes' => array('id' => 'error_code', 'value' => 0), 'options' => array('label_attributes' => ['class' => 'radio-inline'], 'value_options' => array('0' => 'No', '1' => 'Yes'))));
     $this->add(array('name' => 'save', 'attributes' => array('type' => 'submit', 'class' => 'btn btn-primary state save-bank-account col-sm-2 col-xs-12 margin-left-10 pull-right', 'value' => 'Save')));
 }
Example #27
0
 public function __construct($name = 'apartment_media')
 {
     parent::__construct($name);
     $this->setName($name);
     $this->setAttribute('method', 'POST');
     $this->setAttribute('action', 'media/save');
     $this->setAttribute('class', 'form-horizontal');
     // YouTube Link
     $this->add(['name' => 'video', 'type' => 'Zend\\Form\\Element\\Text', 'options' => ['label' => 'YouTube Link'], 'attributes' => ['id' => 'video', 'class' => 'form-control']]);
     // Key Entry Link
     $this->add(['name' => 'key_entry_video', 'type' => 'Zend\\Form\\Element\\Text', 'options' => ['label' => 'Key Entry Link'], 'attributes' => ['id' => 'key_entry_video', 'class' => 'form-control']]);
     // Save button
     $this->add(['name' => 'save_button', 'options' => ['label' => false], 'attributes' => ['type' => 'submit', 'data-loading-text' => 'Saving...', 'id' => 'save_button', 'value' => 'Save Changes', 'class' => 'btn btn-primary col-sm-2 col-xs-12 pull-right margin-left-10']]);
 }
Example #28
0
 public function __construct($name = 'vacationdays-form')
 {
     parent::__construct($name);
     $this->setAttribute('method', 'post');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('id', 'vacationdays-form');
     $this->add(array('name' => 'interval', 'attributes' => array('type' => 'text', 'class' => 'form-control pull-right', 'id' => 'interval')));
     $this->add(array('name' => 'from', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'from')));
     $this->add(array('name' => 'to', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'to')));
     $this->add(array('name' => 'total_number', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'total_number', 'max' => 365, 'min' => 0, 'maxlength' => 5)));
     $this->add(array('name' => 'vacation_type', 'options' => array('value_options' => Objects::getVacationType()), 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('id' => 'vacation_type', 'class' => 'form-control')));
     $this->add(array('name' => 'comment', 'attributes' => array('type' => 'textarea', 'class' => 'form-control', 'rows' => '4', 'id' => 'comment', 'maxlength' => 255)));
     $this->add(array('name' => 'save_button', 'options' => array('label' => 'Submit Request'), 'attributes' => array('type' => 'button', 'class' => 'btn btn-primary state', 'data-loading-text' => 'Saving...', 'id' => 'save_button', 'value' => 'Save')));
 }
Example #29
0
 public function __construct($name = 'apartment_location', $preparedData = [])
 {
     parent::__construct($name);
     if (count($preparedData)) {
         $this->setCountryOptions($preparedData['countryOptions']);
         $this->setProvinceOptions($preparedData['provinceOptions']);
         $this->setCityOptions($preparedData['cityOptions']);
         $this->setBuildingOptions($preparedData['buildingOptions']);
     }
     $this->setName($name);
     $this->setAttribute('method', 'POST');
     $this->setAttribute('action', 'location/save');
     $this->setAttribute('id', 'apartment_location');
     $this->setAttribute('enctype', 'multipart/form-data');
     $this->setAttribute('class', 'form-horizontal');
     // Description Textline ID
     $this->add(['name' => 'description_textline', 'attributes' => ['id' => 'description_textline', 'type' => 'hidden', 'value' => 0]]);
     // Directions Textline ID
     $this->add(['name' => 'directions_textline', 'attributes' => ['id' => 'directions_textline', 'type' => 'hidden', 'value' => 0]]);
     // Country
     $attrCountry = ['id' => 'country_id', 'class' => 'form-control'];
     if (isset($preparedData['countryId']) && $preparedData['countryId'] > 1) {
         $attrCountry['disabled'] = true;
     }
     $this->add(['name' => 'country_id', 'options' => ['label' => 'Country', 'value_options' => $this->countryOptions, 'disable_inarray_validator' => true, 'required' => true], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => $attrCountry]);
     // Province
     $this->add(['name' => 'province_id', 'options' => ['label' => 'Province', 'value_options' => $this->provinceOptions, 'disable_inarray_validator' => true, 'required' => true], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'province_id', 'class' => 'form-control']]);
     // City
     $this->add(['name' => 'city_id', 'options' => ['label' => 'City', 'value_options' => $this->cityOptions, 'disable_inarray_validator' => true, 'required' => true], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'city_id', 'class' => 'form-control']]);
     // Building
     $this->add(['name' => 'building', 'options' => ['label' => 'Building', 'value_options' => $this->buildingOptions, 'disable_inarray_validator' => true, 'required' => true], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'building', 'class' => 'form-control']]);
     $this->add(['type' => 'Zend\\Form\\Element\\Select', 'name' => 'building_section', 'options' => ['label' => 'Building Section', 'value_options' => isset($preparedData['buildingSectionOptions']) ? $preparedData['buildingSectionOptions'] : [], 'disable_inarray_validator' => true, 'required' => true], 'attributes' => ['id' => 'building_section', 'class' => 'form-control']]);
     // Address
     $this->add(['name' => 'address', 'options' => ['label' => 'Address', 'required' => true], 'attributes' => ['type' => 'text', 'id' => 'address', 'class' => 'form-control']]);
     // Block
     $this->add(['name' => 'block', 'options' => ['label' => 'Block', 'disable_inarray_validator' => true], 'attributes' => ['id' => 'block', 'type' => 'text', 'class' => 'form-control']]);
     // Floor
     $this->add(['name' => 'floor', 'options' => ['label' => 'Floor', 'value_options' => $this->getFloor()], 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => ['id' => 'floor', 'type' => 'text', 'class' => 'form-control']]);
     // Unit Number
     $this->add(['name' => 'unit_number', 'options' => ['label' => 'Unit Number'], 'attributes' => ['type' => 'text', 'id' => 'unit_number', 'class' => 'form-control']]);
     // Postal Code
     $this->add(['name' => 'postal_code', 'options' => ['label' => 'Postal Code', 'required' => true], 'attributes' => ['type' => 'text', 'id' => 'postal_code', 'class' => 'form-control']]);
     // Longitude
     $this->add(['name' => 'longitude', 'options' => ['label' => 'Longitude', 'required' => true], 'attributes' => ['type' => 'text', 'id' => 'longitude', 'class' => 'form-control']]);
     // Latitude
     $this->add(['name' => 'latitude', 'options' => ['label' => 'Latitude', 'required' => true], 'attributes' => ['type' => 'text', 'id' => 'latitude', 'class' => 'form-control']]);
     // Save button
     $this->add(['name' => 'save_button', 'type' => 'submit', 'options' => ['label' => 'Save Changes'], 'attributes' => ['data-loading-text' => 'Saving...', 'id' => 'save_button', 'value' => 'Save Changes', 'class' => 'btn btn-primary pull-right col-sm-2 col-xs-12']]);
 }
Example #30
0
 /**
  * @param int $budgetId
  * @param bool $isGlobalManager
  * @param array $options
  */
 public function __construct($budgetId, $isGlobalManager, $options)
 {
     parent::__construct('budget-form');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'name', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'name', 'maxlength' => 100)));
     $this->add(array('name' => 'status', 'type' => 'Zend\\Form\\Element\\Select', 'options' => array('value_options' => $this->statuses($budgetId, $isGlobalManager)), 'attributes' => array('class' => 'form-control', 'id' => 'status')));
     $this->add(array('name' => 'period', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'period')));
     $this->add(array('name' => 'amount', 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'amount')));
     $this->add(array('name' => 'description', 'attributes' => array('type' => 'textarea', 'class' => 'form-control', 'rows' => '4', 'id' => 'description', 'maxlength' => 1000)));
     $this->add(array('name' => 'department_id', 'options' => array('label' => '', 'value_options' => $options['departments']), 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('id' => 'department_id', 'class' => 'form-control')));
     $this->add(array('name' => 'country_id', 'options' => array('label' => '', 'value_options' => $options['countries']), 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('id' => 'country_id', 'class' => 'form-control')));
     $this->add(array('name' => 'is_global', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('id' => 'is_global', 'use_hidden_element' => true, 'checked_value' => 1, 'unchecked_value' => 0)));
     $this->add(array('name' => 'save', 'attributes' => array('type' => 'submit', 'class' => 'btn btn-primary state save-bank-account col-sm-2 col-xs-12 margin-left-10 pull-right', 'value' => $budgetId ? 'Save Changes' : 'Add New Budget')));
 }