/**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->query = $options['query'];
     unset($options['query']);
     $this->organizationType = $options['organizationType'];
     unset($options['organizationType']);
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $types = array();
     $atcTypes = array(Role::PROCTOR_ROLE, Role::TEST_CENTER_ADMIN_ROLE);
     $atpTypes = array(Role::TRAINING_MANAGER_ROLE);
     if ($this->organizationType === Organization::TYPE_ATC) {
         $types = $atcTypes;
     } elseif ($this->organizationType === Organization::TYPE_ATP) {
         $types = $atpTypes;
     } else {
         $types = array_merge($atpTypes, $atcTypes);
     }
     $this->add(array('name' => 'user', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('class' => 'form-control chosen-select', 'required' => 'required'), 'options' => array('label' => 'User', 'object_manager' => $this->query->entityManager, 'target_class' => 'Users\\Entity\\User', 'property' => 'fullName', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array())), 'display_empty_item' => true, 'empty_item_label' => self::EMPTY_SELECT_VALUE)));
     $criteria = Criteria::create();
     $expr = Criteria::expr();
     if (count($types) > 0) {
         $criteria->andWhere($expr->in("name", $types));
     }
     $this->add(array('name' => 'role', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Role', 'object_manager' => $this->query->entityManager, 'target_class' => 'Users\\Entity\\Role', 'property' => 'name', 'is_method' => false, 'find_method' => array('name' => 'matching', 'params' => array('criteria' => $criteria)), 'display_empty_item' => true, 'empty_item_label' => self::EMPTY_SELECT_VALUE)));
     $this->add(array('name' => 'organization', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'id', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'Create', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Add')));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }
Пример #2
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->needAdminApproval = true;
     $this->query = $options['query'];
     unset($options['query']);
     $this->courseId = $options['courseId'];
     unset($options['courseId']);
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $criteria = array();
     $readOnly = false;
     $displayEmptyItem = true;
     if (!empty($this->courseId)) {
         $criteria["id"] = $this->courseId;
         $readOnly = true;
         $displayEmptyItem = false;
     }
     $this->add(array('name' => 'course', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('class' => 'form-control', 'required' => 'required', 'disabled' => $readOnly), 'options' => array('label' => 'Course', 'object_manager' => $this->query->entityManager, 'target_class' => 'Courses\\Entity\\Course', 'property' => 'name', 'is_method' => false, 'find_method' => array('name' => 'findBy', 'params' => array("criteria" => $criteria)), 'empty_item_label' => self::EMPTY_SELECT_VALUE, 'display_empty_item' => $displayEmptyItem)));
     $types = array(Resource::TYPE_PRESENTATIONS, Resource::TYPE_ACTIVITIES, Resource::TYPE_EXAMS);
     $typeValueOptions = array_combine($types, $types);
     $this->add(array('name' => 'type', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Type', 'value_options' => $typeValueOptions, 'empty_option' => self::EMPTY_SELECT_VALUE)));
     $this->add(array('name' => 'name', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Name')));
     $this->add(array('name' => 'file', 'type' => 'Zend\\Form\\Element\\File', 'attributes' => array('accept' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow,application/vnd.openxmlformats-officedocument.presentationml.template,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-powerpoint,application/zip,application/octet-stream,application/pdf,pptx,potx,ppsx,thmx'), 'options' => array('label' => '<p class="required">File</p> <p>Supported Extensions: zip,pdf,ppt,pptx</p>', 'label_options' => array('disable_html_escape' => true))));
     $this->add(array('name' => 'addMore', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-primary', 'value' => 'Add More', 'type' => 'button', 'onclick' => "addMoreResource('#resource_form_addMore', '#resource_form_name', '#resource_form_file', '', '', '', '', '')")));
     if ($this->isAdminUser === true) {
         $this->add(array('name' => 'status', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Status', 'checked_value' => Status::STATUS_ACTIVE, 'unchecked_value' => Status::STATUS_INACTIVE)));
     }
     $this->add(array('name' => 'id', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'Create', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Create')));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }
Пример #3
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->query = $options['query'];
     unset($options['query']);
     parent::__construct($name, $options);
     $hiddenMenuItemsIds = array();
     if (isset($options['hiddenMenuItemsIds'])) {
         $hiddenMenuItemsIds = $options['hiddenMenuItemsIds'];
     }
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'title', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Title')));
     $this->add(array('type' => 'Zend\\Form\\Element\\Radio', 'name' => 'type', 'options' => array('label' => '<div class="required">Menu Item Type</div>', 'label_options' => array('disable_html_escape' => true), 'value_options' => array(array('value' => MenuItem::TYPE_PAGE, 'label' => 'Page', 'checked' => false, 'attributes' => array('class' => 'menu_item_type', 'id' => 'type-page')), array('value' => MenuItem::TYPE_DIRECT_URL, 'label' => 'Direct Url', 'checked' => false, 'attributes' => array('class' => 'menu_item_type', 'id' => 'type-directUrl'))))));
     $this->add(array('name' => 'directUrl', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Direct Url')));
     $this->add(array('name' => 'page', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Page', 'object_manager' => $this->query->entityManager, 'target_class' => 'CMS\\Entity\\Page', 'property' => 'name', 'empty_item_label' => self::EMPTY_SELECT_VALUE, 'display_empty_item' => true, 'label_generator' => function ($targetEntity) {
         return $targetEntity->getTitle();
     })));
     $this->add(array('name' => 'parent', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Parent', 'object_manager' => $this->query->entityManager, 'target_class' => 'CMS\\Entity\\MenuItem', 'label_generator' => function ($targetEntity) {
         return $targetEntity->getNestedTitle();
     }, 'find_method' => array('name' => 'getMenuItemsSorted', 'params' => array('hiddenMenuItemsIds' => $hiddenMenuItemsIds)), 'display_empty_item' => true, 'empty_item_label' => "- - ")));
     $this->add(array('name' => 'weight', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('placeholder' => 'Lower value will be displayed at the Top', 'required' => 'required', 'class' => 'form-control', 'min' => '1'), 'options' => array('label' => 'Sort Order')));
     $this->add(array('name' => 'status', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Status', 'checked_value' => Status::STATUS_ACTIVE, 'unchecked_value' => Status::STATUS_INACTIVE)));
     $this->add(array('name' => 'menu', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'id', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'Create', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Create')));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }
Пример #4
0
 /**
  * setup form and add validation constraints
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'username', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Username')));
     $this->add(array('name' => 'password', 'type' => 'Zend\\Form\\Element\\Password', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Password')));
     $this->add(array('name' => 'login', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-lg btn-success btn-block', 'value' => 'Log in')));
     $this->setInputFilter($this->getInputFilter());
 }
Пример #5
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'name', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Name')));
     $this->add(array('name' => 'id', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'Create', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Create')));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }
Пример #6
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'title', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Title')));
     $this->add(array('name' => 'status', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Status', 'checked_value' => Status::STATUS_ACTIVE, 'unchecked_value' => Status::STATUS_INACTIVE)));
     $this->add(array('name' => 'id', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'Create', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Create')));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }
Пример #7
0
 /**
  * setup form and add validation constraints
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'name', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'placeholder' => 'Enter text here', 'class' => 'form-control'), 'options' => array('label' => 'Name')));
     $this->add(array('name' => 'email', 'type' => 'Zend\\Form\\Element\\Email', 'attributes' => array('required' => 'required', 'placeholder' => 'Enter email address', 'class' => 'form-control'), 'options' => array('label' => 'Email')));
     $this->add(array('name' => 'subject', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'placeholder' => 'Enter text here', 'class' => 'form-control'), 'options' => array('label' => 'Subject')));
     $this->add(array('name' => 'message', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => array('required' => 'required', 'placeholder' => 'Enter your comment here', 'class' => 'form-control', 'rows' => 5), 'options' => array('label' => 'Message')));
     $this->add(array('name' => 'submit', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-lg btn-success btn-block', 'value' => 'Submit')));
     $this->setInputFilter($this->getInputFilter());
 }
Пример #8
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->query = $options['query'];
     //        $excludedRoles = $options['excludedRoles'];
     unset($options['query']);
     //        unset($options['countries']);
     //        unset($options['languages']);
     //        unset($options['excludedRoles']);
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'type', 'required' => true, 'type' => 'Zend\\Form\\Element\\Hidden', 'options' => array('messages' => array(\Zend\Validator\NotEmpty::IS_EMPTY => "you have to choose organization type"))));
     $this->add(array('type' => 'Zend\\Form\\Element\\MultiCheckbox', 'name' => 'orgType', 'required' => true, 'options' => array('label' => 'Organization Type', 'value_options' => array(array('value' => '1', 'label' => '    ATC Organization', 'checked' => false, 'attributes' => array('class' => 'orgType', 'id' => 'type-1')), array('value' => '2', 'label' => '    ATP Organization', 'checked' => false, 'attributes' => array('id' => 'type-2', 'class' => 'orgType'))))));
     $this->add(array('name' => 'submit', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Start!')));
 }
Пример #9
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->query = $options['query'];
     $countries = $options['countries'];
     $languages = $options['languages'];
     $excludedRoles = $options['excludedRoles'];
     unset($options['query']);
     unset($options['countries']);
     unset($options['languages']);
     unset($options['excludedRoles']);
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'firstName', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter First Name', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'First Name')));
     $this->add(array('name' => 'middleName', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Middle Name', 'class' => 'form-control'), 'options' => array('label' => 'Middle Name')));
     $this->add(array('name' => 'lastName', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Last Name', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Last Name')));
     $this->add(array('name' => 'username', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter User Name', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'User Name')));
     $this->add(array('name' => 'mobile', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Mobile Number ( 444-555-1234 / 246.555.8888 / 1235554567)', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Mobile')));
     $this->add(array('name' => 'phone', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Phone Number ( 444-555-1234 / 246.555.8888 / 1235554567)', 'class' => 'form-control'), 'options' => array('label' => 'Phone')));
     $this->add(array('name' => 'email', 'type' => 'Zend\\Form\\Element\\Email', 'attributes' => array('placeholder' => 'Enter Email', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Email')));
     $this->add(array('name' => 'confirmEmail', 'type' => 'Zend\\Form\\Element\\Email', 'attributes' => array('placeholder' => 'Confirm User Email', 'class' => 'form-control'), 'options' => array('label' => 'Confirm Email')));
     $this->add(array('name' => 'password', 'type' => 'Zend\\Form\\Element\\Password', 'attributes' => array('placeholder' => 'Enter Password', 'class' => 'form-control'), 'options' => array('label' => 'Password')));
     $this->add(array('name' => 'confirmPassword', 'type' => 'Zend\\Form\\Element\\Password', 'attributes' => array('placeholder' => 'Confirm User Password', 'class' => 'form-control'), 'options' => array('label' => 'Confirm Password')));
     $this->add(array('name' => 'securityQuestion', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Security Question', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => '<p class="required">Security Question</p> <p><ul><li>Security Question should be <strong>Memorable</strong>, You should be able to remember the answer.</li><li>Security Question should be <strong>Consistent</strong>, Answer should not change with time.</li><li>Security Question should be <strong>Safe</strong>, Answer should be hard to guess or research.</li></ul></p>', 'label_options' => array('disable_html_escape' => true))));
     $this->add(array('name' => 'securityAnswer', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Security Answer', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Security Answer')));
     $this->add(array('name' => 'identificationType', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Identification Type (National ID, or Passport, etc)', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Identification Type')));
     $this->add(array('name' => 'identificationNumber', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Identification Number', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Identification Number')));
     $this->add(array('name' => 'identificationExpiryDate', 'type' => 'Zend\\Form\\Element\\Date', 'attributes' => array('required' => 'required', 'class' => 'form-control date', 'type' => 'text'), 'options' => array('label' => 'Identification Expiry Date', 'format' => Time::DATE_FORMAT)));
     $this->add(array('name' => 'dateOfBirth', 'type' => 'Zend\\Form\\Element\\Date', 'attributes' => array('required' => 'required', 'class' => 'form-control date', 'type' => 'text'), 'options' => array('label' => 'Date Of Birth', 'format' => Time::DATE_FORMAT)));
     $this->add(array('name' => 'nationality', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Nationality', 'value_options' => $countries, 'empty_option' => self::EMPTY_SELECT_VALUE)));
     $this->add(array('name' => 'language', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Language', 'value_options' => $languages, 'empty_option' => self::EMPTY_SELECT_VALUE)));
     $this->add(array('name' => 'addressOne', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Address Line 1', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Address Line 1')));
     $this->add(array('name' => 'addressTwo', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Address Line 2', 'class' => 'form-control'), 'options' => array('label' => 'Address Line 2')));
     $this->add(array('name' => 'city', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter City', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'City')));
     $this->add(array('name' => 'zipCode', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Zip Code', 'class' => 'form-control'), 'options' => array('label' => 'Zip Code')));
     $this->add(array('name' => 'country', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Country', 'value_options' => $countries, 'empty_option' => self::EMPTY_SELECT_VALUE)));
     $this->add(array('name' => 'photo', 'type' => 'Zend\\Form\\Element\\File', 'options' => array('label' => 'Picture')));
     $this->add(array('name' => 'roles', 'type' => 'DoctrineModule\\Form\\Element\\ObjectMultiCheckbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => '<label class="legendLabel">Roles</label>', 'object_manager' => $this->query->entityManager, 'target_class' => 'Users\\Entity\\Role', 'property' => 'name', 'find_method' => array('name' => 'getRoles', 'params' => array('excludedRoles' => $excludedRoles)), 'label_options' => array('disable_html_escape' => true))));
     $this->add(array('name' => 'privacyStatement', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Privacy Statement', 'checked_value' => Statement::STATEMENT_AGREE, 'unchecked_value' => Statement::STATEMENT_DISAGREE)));
     $this->add(array('name' => 'studentStatement', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Student Statement', 'checked_value' => Statement::STATEMENT_AGREE, 'unchecked_value' => Statement::STATEMENT_DISAGREE)));
     $this->add(array('name' => 'proctorStatement', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Proctor Statement', 'checked_value' => Statement::STATEMENT_AGREE, 'unchecked_value' => Statement::STATEMENT_DISAGREE)));
     $this->add(array('name' => 'instructorStatement', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Instructor Statement', 'checked_value' => Statement::STATEMENT_AGREE, 'unchecked_value' => Statement::STATEMENT_DISAGREE)));
     $this->add(array('name' => 'testCenterAdministratorStatement', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Test Center Administrator Statement', 'checked_value' => Statement::STATEMENT_AGREE, 'unchecked_value' => Statement::STATEMENT_DISAGREE)));
     $this->add(array('name' => 'trainingManagerStatement', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Training Manager Statement', 'checked_value' => Statement::STATEMENT_AGREE, 'unchecked_value' => Statement::STATEMENT_DISAGREE)));
     if (!$this->isAdminUser) {
         $this->add(array('type' => 'Zend\\Form\\Element\\Captcha', 'name' => 'captcha', 'attributes' => array('class' => 'form-control classCaptcha', 'required' => 'required'), 'options' => array('label' => 'Please verify you are human.', 'label_attributes' => array('class' => 'classCaptcha'), 'captcha' => array('class' => 'Image', 'options' => array('font' => APPLICATION_PATH . '/fonts/Arctik.ttf', 'width' => 200, 'height' => 100, 'dotNoiseLevel' => 90, 'lineNoiseLevel' => 3)))));
     }
     $this->add(array('name' => 'id', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'submit', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Create')));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->query = $options['query'];
     unset($options['query']);
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-inline');
     $this->setAttribute('method', 'GET');
     $this->add(array('name' => 'title', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Title')));
     $this->add(array('name' => 'directUrl', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Url')));
     $this->add(array('name' => 'type', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Type', "value_options" => array(MenuItem::TYPE_PAGE => "Page", MenuItem::TYPE_DIRECT_URL => "Direct Url"), 'empty_option' => "All")));
     $this->add(array('name' => 'menu', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Menu', 'object_manager' => $this->query->setEntity('CMS\\Entity\\Menu')->entityManager, 'target_class' => 'CMS\\Entity\\Menu', 'property' => "title", 'find_method' => array('name' => 'findAll', 'params' => array()), 'display_empty_item' => true, 'empty_item_label' => "All")));
     $this->add(array('name' => 'status', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Status', "value_options" => array(Status::STATUS_ACTIVE => Status::STATUS_ACTIVE_TEXT, Status::STATUS_INACTIVE => Status::STATUS_INACTIVE_TEXT), 'empty_option' => "All")));
     $this->add(array('name' => 'filter', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Filter')));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }
Пример #11
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->query = $options['query'];
     unset($options['query']);
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'date', 'type' => 'Zend\\Form\\Element\\Date', 'attributes' => array('required' => 'required ', 'class' => 'form-control date', 'type' => 'text'), 'options' => array('label' => 'Exam Date', 'format' => Time::DATE_FORMAT), 'validators' => array('Courses\\Form\\TenDaysAfterValidator' => true)));
     $this->add(array('name' => 'studentsNo', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('required' => 'required', 'class' => 'form-control '), 'options' => array('label' => 'Students Number')));
     $this->add(array('name' => 'atcId', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('required' => 'required', 'class' => 'form-control', 'multiple' => false), 'options' => array('label' => 'Authenticated Test Center', 'label_attributes' => array('class' => ' '), 'object_manager' => $this->query->entityManager, 'target_class' => 'Organizations\\Entity\\Organization', 'property' => 'type', 'empty_item_label' => self::EMPTY_SELECT_VALUE, 'display_empty_item' => true, 'label_generator' => function ($targetEntity) {
         return $targetEntity->getCommercialName();
     }, 'find_method' => array('name' => 'listOrganizations', 'params' => array('query' => $this->query, 'type' => \Organizations\Entity\Organization::TYPE_ATC)))));
     $this->add(array('name' => 'courseId', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('required' => 'required', 'class' => 'form-control', 'multiple' => false), 'options' => array('label' => 'Course', 'label_attributes' => array('class' => ' '), 'object_manager' => $this->query->entityManager, 'target_class' => 'Courses\\Entity\\Course', 'property' => 'name', 'empty_item_label' => self::EMPTY_SELECT_VALUE, 'display_empty_item' => true, 'label_generator' => function ($targetEntity) {
         return $targetEntity->getName();
     })));
     $this->add(array('name' => 'Create', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Book now!')));
 }
Пример #12
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->query = $options['query'];
     unset($options['query']);
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'title', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Title')));
     $this->add(array('name' => 'path', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Path')));
     $this->add(array('name' => 'type', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Type', "value_options" => array(PageTypes::PAGE_TYPE => PageTypes::PAGE_TYPE, PageTypes::PRESS_RELEASE_TYPE => PageTypes::PRESS_RELEASE_TYPE), 'empty_option' => self::EMPTY_SELECT_VALUE)));
     $this->add(array('name' => 'category', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('class' => 'form-control', 'required' => 'required'), 'options' => array('label' => 'Category', "value_options" => array(PageCategories::DEFAULT_CATEGORY => PageCategories::DEFAULT_CATEGORY), 'empty_option' => self::EMPTY_SELECT_VALUE)));
     $this->add(array('name' => 'author', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Author')));
     $this->add(array('name' => 'picture', 'type' => 'Zend\\Form\\Element\\File', 'attributes' => array('accept' => 'image/*'), 'options' => array('label' => '<p class="required">Picture</p> <p>Supported Extensions: gif,png,jpg,jpeg</p>', 'label_options' => array('disable_html_escape' => true))));
     $this->add(array('name' => 'summary', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => array('required' => 'required', 'class' => 'form-control', 'rows' => 3, 'cols' => 80), 'options' => array('label' => 'Summary')));
     $this->add(array('name' => 'body', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => array('required' => 'required', 'class' => 'form-control', 'rows' => 10, 'cols' => 80), 'options' => array('label' => 'Body')));
     $this->add(array('name' => 'id', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => FormButtons::SAVE_BUTTON, 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'pull-left btn-inline btn btn-primary', 'value' => FormButtons::SAVE_BUTTON_TEXT)));
     $this->add(array('name' => FormButtons::SAVE_AND_PUBLISH_BUTTON, 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'pull-left btn-inline btn btn-success', 'value' => FormButtons::SAVE_AND_PUBLISH_BUTTON_TEXT)));
     $this->add(array('name' => FormButtons::UNPUBLISH_BUTTON, 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'pull-left btn-inline btn btn-warning', 'value' => FormButtons::UNPUBLISH_BUTTON_TEXT)));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'pull-left btn-inline btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }
Пример #13
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->needAdminApproval = true;
     $this->query = $options['query'];
     unset($options['query']);
     $this->userId = $options['userId'];
     unset($options['userId']);
     parent::__construct($name, $options);
     // The form will hydrate an object of type "BlogPost"
     $this->setHydrator(new DoctrineHydrator($this->query->entityManager));
     $this->setAttribute('class', 'form form-horizontal');
     $this->add(array('name' => 'name', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Name')));
     // Add the outline fieldset
     $outlineFieldset = new OutlineFieldset($this->query, $this->isAdminUser);
     $this->add(array('type' => 'Zend\\Form\\Element\\Collection', 'name' => 'outlines', 'options' => array('count' => 1, 'label' => "Outline", 'should_create_template' => true, 'allow_add' => true, 'allow_remove' => true, 'template_placeholder' => '__outlineNumber__', 'target_element' => $outlineFieldset)));
     $this->add(array('name' => 'addMore', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-primary addMoreButton', 'value' => 'Add More', 'type' => 'button', 'onclick' => "addMoreOutline('#course_form_addMore')")));
     $this->add(array('name' => 'startDate', 'type' => 'Zend\\Form\\Element\\Date', 'attributes' => array('required' => 'required', 'class' => 'form-control date', 'type' => 'text'), 'options' => array('label' => 'Start Date', 'format' => Time::DATE_FORMAT)));
     $this->add(array('name' => 'endDate', 'type' => 'Zend\\Form\\Element\\Date', 'attributes' => array('required' => 'required', 'class' => 'form-control date', 'type' => 'text'), 'options' => array('label' => 'End Date', 'format' => Time::DATE_FORMAT)));
     $this->add(array('name' => 'capacity', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('required' => 'required', 'class' => 'form-control', 'min' => '1'), 'options' => array('label' => 'Capacity')));
     $this->add(array('name' => 'studentsNo', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('required' => 'required', 'class' => 'form-control', 'min' => '0'), 'options' => array('label' => 'Students Number')));
     $types = array(Organization::TYPE_ATP, Organization::TYPE_BOTH);
     $status = Status::STATUS_ACTIVE;
     $userIds = array();
     if ($this->isAdminUser === false) {
         $userIds[] = $this->userId;
     }
     $this->add(array('name' => 'atp', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Authorized Training Partner', 'object_manager' => $this->query->entityManager, 'target_class' => 'Organizations\\Entity\\Organization', 'property' => 'commercialName', 'is_method' => false, 'find_method' => array('name' => 'getOrganizationsBy', 'params' => array('userIds' => $userIds, 'types' => $types, 'status' => $status)), 'empty_item_label' => self::EMPTY_SELECT_VALUE, 'display_empty_item' => true)));
     $this->add(array('name' => 'ai', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Authorized Instructor', 'object_manager' => $this->query->entityManager, 'target_class' => 'Users\\Entity\\User', 'property' => 'fullName', 'is_method' => true, 'find_method' => array('name' => 'getUsers', 'params' => array("roles" => array(Role::INSTRUCTOR_ROLE))), 'empty_item_label' => self::EMPTY_SELECT_VALUE, 'display_empty_item' => true)));
     $this->add(array('name' => 'brief', 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => array('required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Brief')));
     $this->add(array('name' => 'time', 'type' => 'Zend\\Form\\Element\\Time', 'attributes' => array('placeholder' => 'Example: 10:10', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Time', 'format' => 'H:i')));
     $this->add(array('name' => 'duration', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('placeholder' => 'Duration is in days', 'required' => 'required', 'class' => 'form-control', 'min' => '1'), 'options' => array('label' => 'Duration')));
     if ($this->isAdminUser === true) {
         $this->add(array('name' => 'isForInstructor', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Train the Trainer course', 'checked_value' => Status::STATUS_ACTIVE, 'unchecked_value' => Status::STATUS_INACTIVE)));
         $this->add(array('name' => 'status', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Status', 'checked_value' => Status::STATUS_ACTIVE, 'unchecked_value' => Status::STATUS_INACTIVE)));
     }
     $this->add(array('name' => 'id', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'Create', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Create')));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }
Пример #14
0
 /**
  * setup form
  * 
  * 
  * @access public
  * @param string $name ,default is null
  * @param array $options ,default is null
  */
 public function __construct($name = null, $options = null)
 {
     $this->needAdminApproval = true;
     $this->query = $options['query'];
     unset($options['query']);
     parent::__construct($name, $options);
     $this->setAttribute('class', 'form form-horizontal gllpLatlonPicker');
     $this->add(array('name' => 'type', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'commercialName', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Commercial Name', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Commercial Name')));
     $this->add(array('name' => 'ownerName', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Owner Name', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Owner Name')));
     $this->add(array('name' => 'mapSearch', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Search In Map', 'class' => 'form-control gllpSearchField'), 'options' => array('label' => '<div>Location</div><div class="gllpMap">Google Maps</div>', 'label_options' => array('disable_html_escape' => true))));
     $this->add(array('name' => 'mapSearchButton', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'gllpSearchButton btn btn-primary', 'value' => 'Search', 'type' => 'button')));
     $this->add(array('name' => 'longtitude', 'continue_if_empty' => true, 'type' => 'Zend\\Form\\Element\\Hidden', 'attributes' => array('placeholder' => 'Enter Longtitude', 'class' => 'form-control gllpLongitude', 'allow_empty' => true, 'continue_if_empty' => false), 'options' => array('label' => 'Longtitude')));
     $this->add(array('name' => 'latitude', 'type' => 'Zend\\Form\\Element\\Hidden', 'attributes' => array('placeholder' => 'Enter Latitude', 'class' => 'form-control gllpLatitude'), 'options' => array('label' => 'Latitude'), 'validators' => array('Empty' => true)));
     $this->add(array('name' => 'mapZoom', 'type' => 'Zend\\Form\\Element\\Hidden', 'attributes' => array('class' => 'form-control gllpZoom', 'value' => 3), 'options' => array('label' => 'Latitude'), 'validators' => array('Empty' => true)));
     $this->add(array('name' => 'ownerNationalId', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('placeholder' => 'Enter Owner National Id', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Owner National Id')));
     $this->add(array('name' => 'CRNo', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter CR', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'CR')));
     $this->add(array('name' => 'CRExpiration', 'type' => 'Zend\\Form\\Element\\Date', 'attributes' => array('placeholder' => 'Enter CR Expiration Date', 'required' => 'required', 'class' => 'form-control date', 'type' => 'text'), 'options' => array('label' => 'CR Expiration Date', 'format' => Time::DATE_FORMAT)));
     $this->add(array('name' => 'CRAttachment', 'type' => 'Zend\\Form\\Element\\File', 'options' => array('label' => 'CR Attachment', 'required' => 'required'), 'attributes' => array('required' => true)));
     $this->add(array('name' => 'wireTransferAttachment', 'type' => 'Zend\\Form\\Element\\File', 'options' => array('label' => 'Wire Transfer Attachment', 'required' => 'required'), 'attributes' => array('required' => true)));
     $this->add(array('name' => 'phone1', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Phone Number', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Phone 1')));
     $this->add(array('name' => 'phone2', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Phone Number', 'class' => 'form-control'), 'options' => array('label' => 'Phone 2')));
     $this->add(array('name' => 'phone3', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Phone Number', 'class' => 'form-control'), 'options' => array('label' => 'Phone 3')));
     $this->add(array('name' => 'fax', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter fax number', 'class' => 'form-control'), 'options' => array('label' => 'Fax')));
     $this->add(array('name' => 'addressLine1', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Address', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Address 1')));
     $this->add(array('name' => 'addressLine2', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Address', 'class' => 'form-control'), 'options' => array('label' => 'Address 2')));
     $this->add(array('name' => 'city', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter City', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'City')));
     $this->add(array('name' => 'zipCode', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Zip Code', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Zip Code')));
     $this->add(array('name' => 'website', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Website', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Website')));
     $this->add(array('name' => 'email', 'type' => 'Zend\\Form\\Element\\Email', 'attributes' => array('placeholder' => 'Enter Email', 'required' => 'required', 'class' => 'form-control'), 'options' => array('label' => 'Email')));
     //////////////////////////////////////////////////////////////////////
     /////////// ATP Data ///////////////
     $this->add(array('name' => 'atcLicenseNo', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter License', 'required' => 'required', 'class' => 'form-control atcSet'), 'options' => array('label' => 'ATC License', 'label_attributes' => array('class' => 'atcSet'))));
     $this->add(array('name' => 'atcLicenseExpiration', 'type' => 'Zend\\Form\\Element\\Date', 'attributes' => array('placeholder' => 'Enter License Expiration Date', 'required' => 'required', 'class' => 'form-control date atcSet', 'type' => 'text'), 'options' => array('label' => 'ATC License Expiration Date', 'label_attributes' => array('class' => 'atcSet'), 'format' => Time::DATE_FORMAT)));
     $this->add(array('name' => 'atcLicenseAttachment', 'type' => 'Zend\\Form\\Element\\File', 'attributes' => array('class' => 'atcSet', 'required' => 'required'), 'options' => array('label' => 'ATC License Attachment', 'label_attributes' => array('class' => 'atcSet'))));
     $this->add(array('name' => 'labsNo', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('placeholder' => 'Enter Labs Number', 'required' => 'required', 'class' => 'form-control atcSet'), 'options' => array('label' => 'Labs Number', 'label_attributes' => array('class' => 'atcSet'))));
     $this->add(array('name' => 'pcsNo_lab', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('placeholder' => 'Enter PCs Number Per Lab', 'required' => 'required', 'class' => 'form-control atcSet'), 'options' => array('label' => 'PCs Number / Lab', 'label_attributes' => array('class' => 'atcSet'))));
     $this->add(array('name' => 'internetSpeed_lab', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter Internet Speed Per Lab', 'required' => 'required', 'class' => 'form-control atcSet'), 'options' => array('label' => 'Internet Speed / Lab', 'label_attributes' => array('class' => 'atcSet'))));
     $this->add(array('name' => 'operatingSystem', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('placeholder' => 'Enter Operating System', 'required' => 'required', 'class' => 'form-control atcSet'), 'options' => array('label' => 'Operating System', 'label_attributes' => array('class' => 'atcSet'), 'empty_option' => self::EMPTY_SELECT_VALUE, 'value_options' => $options['staticOss'])));
     $this->add(array('name' => 'operatingSystemLang', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('placeholder' => 'Enter Operating System Language', 'required' => 'required', 'class' => 'form-control atcSet'), 'options' => array('label' => 'Operating System Language', 'label_attributes' => array('class' => 'atcSet'), 'empty_option' => self::EMPTY_SELECT_VALUE, 'value_options' => $options['staticLangs'])));
     $this->add(array('name' => 'officeVersion', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('placeholder' => 'Enter Microseft Office Version', 'required' => 'required', 'class' => 'form-control atcSet'), 'options' => array('label' => 'Microseft Office Version', 'empty_option' => self::EMPTY_SELECT_VALUE, 'value_options' => $options['staticOfficeVersions'], 'label_attributes' => array('class' => 'atpLicenseNo atcSet'))));
     $this->add(array('name' => 'officeLang', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('required' => 'required', 'class' => 'form-control atcSet'), 'options' => array('label' => 'Microsoft office Language', 'label_attributes' => array('class' => 'atcSet'), 'empty_option' => self::EMPTY_SELECT_VALUE, 'value_options' => $options['staticLangs'])));
     //            END OF ATP
     ///////////////////////////////////////////////////////////////
     //////////// ATC DATA /////////////
     $this->add(array('name' => 'atpLicenseNo', 'type' => 'Zend\\Form\\Element\\Text', 'attributes' => array('placeholder' => 'Enter License', 'required' => 'required', 'class' => 'form-control atpSet'), 'options' => array('label' => 'ATP License', 'label_attributes' => array('class' => 'atpSet'))));
     $this->add(array('name' => 'atpLicenseExpiration', 'type' => 'Zend\\Form\\Element\\Date', 'attributes' => array('placeholder' => 'Enter License Expiration Date', 'required' => 'required', 'class' => 'form-control date atpSet ', 'type' => 'text'), 'options' => array('label' => 'ATP License Expiration Date', 'label_attributes' => array('class' => 'atpSet'), 'format' => Time::DATE_FORMAT)));
     $this->add(array('name' => 'atpLicenseAttachment', 'type' => 'Zend\\Form\\Element\\File', 'attributes' => array('class' => 'atpSet', 'required' => 'required'), 'options' => array('label' => 'ATP License Attachment', 'label_attributes' => array('class' => 'atpSet'))));
     $this->add(array('name' => 'classesNo', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('placeholder' => 'Enter Classes Number', 'required' => 'required', 'class' => 'form-control atpSet'), 'options' => array('label' => 'Classes Number', 'label_attributes' => array('class' => 'atpSet'))));
     $this->add(array('name' => 'pcsNo_class', 'type' => 'Zend\\Form\\Element\\Number', 'attributes' => array('placeholder' => 'Enter PCs Number Per Class', 'required' => 'required', 'class' => 'form-control atpSet'), 'options' => array('label' => 'PCs Number / Class', 'label_attributes' => array('class' => ' atpSet'))));
     //        END OF ATC
     //////////////////////////////////////////////////////////////////////
     $this->add(array('name' => 'trainingManager_id', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('class' => 'form-control atpSet notReqOnEdit', 'multiple' => false), 'options' => array('label' => 'Training Manager', 'label_attributes' => array('class' => ' atpSet notReqOnEdit'), 'object_manager' => $this->query->entityManager, 'target_class' => 'Users\\Entity\\User', 'property' => 'firstName', 'empty_item_label' => self::EMPTY_SELECT_VALUE, 'display_empty_item' => true, 'label_generator' => function ($targetEntity) {
         return $targetEntity->getFirstName() . ' ' . $targetEntity->getMiddleName() . ' ' . $targetEntity->getLastName();
     })));
     $this->add(array('name' => 'testCenterAdmin_id', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('class' => 'form-control atcSet notReqOnEdit', 'multiple' => false), 'options' => array('label' => 'Test Center Admin', 'label_attributes' => array('class' => ' atcSet notReqOnEdit'), 'object_manager' => $this->query->entityManager, 'target_class' => 'Users\\Entity\\User', 'property' => 'firstName', 'display_empty_item' => true, 'empty_item_label' => self::EMPTY_SELECT_VALUE, 'label_generator' => function ($targetEntity) {
         return $targetEntity->getFirstName() . ' ' . $targetEntity->getMiddleName() . ' ' . $targetEntity->getLastName();
     })));
     $this->add(array('name' => 'focalContactPerson_id', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'attributes' => array('required' => 'required', 'class' => 'form-control', 'multiple' => false), 'options' => array('label' => 'Focal Contact Person', 'object_manager' => $this->query->entityManager, 'target_class' => 'Users\\Entity\\User', 'property' => 'firstName', 'display_empty_item' => true, 'empty_item_label' => self::EMPTY_SELECT_VALUE, 'label_generator' => function ($targetEntity) {
         return $targetEntity->getFirstName() . ' ' . $targetEntity->getMiddleName() . ' ' . $targetEntity->getLastName();
     })));
     $this->add(array('name' => 'id', 'type' => 'Zend\\Form\\Element\\Hidden'));
     $this->add(array('name' => 'atpPrivacyStatement', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control atpSet checkboxAgreement', 'required' => true), 'options' => array('label' => 'ATP Privacy Statement', 'label_attributes' => array('class' => ' atpSet'))));
     $this->add(array('name' => 'atcPrivacyStatement', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control atcSet checkboxAgreement', 'required' => true), 'options' => array('label' => 'ATC Privacy Statement', 'label_attributes' => array('class' => ' atcSet'))));
     if ($this->isAdminUser === true) {
         $this->add(array('name' => 'status', 'type' => 'Zend\\Form\\Element\\Checkbox', 'attributes' => array('class' => 'form-control'), 'options' => array('label' => 'Status', 'checked_value' => Status::STATUS_ACTIVE, 'unchecked_value' => Status::STATUS_INACTIVE)));
     }
     $this->add(array('name' => 'submit', 'type' => 'Zend\\Form\\Element\\Submit', 'attributes' => array('class' => 'btn btn-success', 'value' => 'Create')));
     $this->add(array('name' => 'saveState', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-info', 'value' => 'Save State', 'type' => 'button')));
     $this->add(array('name' => 'reset', 'type' => 'Zend\\Form\\Element', 'attributes' => array('class' => 'btn btn-danger resetButton', 'value' => 'Reset', 'type' => 'button')));
 }