| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Blank form template |
| 5 |
*/ |
| 6 |
class WeForms_Template_Job_Listing extends WeForms_Form_Template { |
| 7 |
|
| 8 |
public function __construct() { |
| 9 |
parent::__construct(); |
| 10 |
|
| 11 |
$this->enabled = true; |
| 12 |
$this->title = __( 'Job Listing Form', 'weforms' ); |
| 13 |
$this->description = __( 'This simple template is the easy and fastest way to apply online. Gather information and upload resume using the form.', 'weforms' ); |
| 14 |
$this->image = WEFORMS_ASSET_URI . '/images/form-template/job_listing.png'; |
| 15 |
$this->category = 'employment'; |
| 16 |
} |
| 17 |
|
| 18 |
/** |
| 19 |
* Get the form fields |
| 20 |
* |
| 21 |
* @return array |
| 22 |
*/ |
| 23 |
public function get_form_fields() { |
| 24 |
$all_fields = $this->get_available_fields(); |
| 25 |
|
| 26 |
$form_fields = [ |
| 27 |
array_merge( $all_fields['section_break']->get_field_props(), [ |
| 28 |
'label' => __( 'Contact Person', 'weforms' ), |
| 29 |
'description' => ' ', |
| 30 |
'name' => 'contact_person', |
| 31 |
] ), |
| 32 |
|
| 33 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 34 |
'label' => __( 'Company Name', 'weforms' ), |
| 35 |
'name' => 'company_name', |
| 36 |
] ), |
| 37 |
|
| 38 |
array_merge( $all_fields['dropdown_field']->get_field_props(), [ |
| 39 |
'label' => __( 'Salutation', 'weforms' ), |
| 40 |
'name' => 'salutation', |
| 41 |
'options' => [ |
| 42 |
'mr' => __( 'Mr', 'weforms' ), |
| 43 |
'mrs' => __( 'Mrs', 'weforms' ), |
| 44 |
'miss' => __( 'Miss', 'weforms' ), |
| 45 |
'ms.' => __( 'Ms.', 'weforms' ), |
| 46 |
'dr.' => __( 'Dr.', 'weforms' ), |
| 47 |
'prof' => __( 'Prof.', 'weforms' ), |
| 48 |
], |
| 49 |
] ), |
| 50 |
|
| 51 |
array_merge( $all_fields['name_field']->get_field_props(), [ |
| 52 |
'required' => 'yes', |
| 53 |
'format' => 'first-middle-last', |
| 54 |
|
| 55 |
'first_name' => [ |
| 56 |
'placeholder' => '', |
| 57 |
'default' => '', |
| 58 |
'sub' => __( 'First Name', 'weforms' ), |
| 59 |
], |
| 60 |
|
| 61 |
'middle_name' => [ |
| 62 |
'placeholder' => '', |
| 63 |
'default' => '', |
| 64 |
'sub' => __( 'Middle Name', 'weforms' ), |
| 65 |
], |
| 66 |
|
| 67 |
'last_name' => [ |
| 68 |
'placeholder' => '', |
| 69 |
'default' => '', |
| 70 |
'sub' => __( 'Last Name', 'weforms' ), |
| 71 |
], |
| 72 |
'hide_subs' => false, |
| 73 |
'name' => 'format', |
| 74 |
] ), |
| 75 |
|
| 76 |
array_merge( $all_fields['numeric_text_field']->get_field_props(), [ |
| 77 |
'required' => 'yes', |
| 78 |
'label' => __( 'Phone Number', 'weforms' ), |
| 79 |
'name' => 'phone_number', |
| 80 |
] ), |
| 81 |
|
| 82 |
array_merge( $all_fields['numeric_text_field']->get_field_props(), [ |
| 83 |
'label' => __( 'Fax Number', 'weforms' ), |
| 84 |
'name' => 'fax_number', |
| 85 |
] ), |
| 86 |
|
| 87 |
array_merge( $all_fields['address_field']->get_field_props(), [ |
| 88 |
'required' => 'yes', |
| 89 |
'label' => __( 'Address', 'weforms' ), |
| 90 |
'name' => 'address', |
| 91 |
] ), |
| 92 |
|
| 93 |
array_merge( $all_fields['numeric_text_field']->get_field_props(), [ |
| 94 |
'required' => 'yes', |
| 95 |
'label' => __( 'Postal Code', 'weforms' ), |
| 96 |
'name' => 'postal_code', |
| 97 |
] ), |
| 98 |
|
| 99 |
array_merge( $all_fields['country_list_field']->get_field_props(), [ |
| 100 |
'required' => 'yes', |
| 101 |
'label' => __( 'Province', 'weforms' ), |
| 102 |
'name' => 'province', |
| 103 |
] ), |
| 104 |
|
| 105 |
array_merge( $all_fields['country_list_field']->get_field_props(), [ |
| 106 |
'required' => 'yes', |
| 107 |
'label' => __( 'Country', 'weforms' ), |
| 108 |
'name' => 'country', |
| 109 |
] ), |
| 110 |
|
| 111 |
array_merge( $all_fields['checkbox_field']->get_field_props(), [ |
| 112 |
'label' => ' ', |
| 113 |
'name' => 'contact_information', |
| 114 |
'options' => [ |
| 115 |
'show_information' => __( 'Show contact information in public posting', 'weforms' ), |
| 116 |
], |
| 117 |
] ), |
| 118 |
|
| 119 |
array_merge( $all_fields['section_break']->get_field_props(), [ |
| 120 |
'label' => __( 'Position Information', 'weforms' ), |
| 121 |
'description' => ' ', |
| 122 |
'name' => 'position_information', |
| 123 |
] ), |
| 124 |
|
| 125 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 126 |
'required' => 'yes', |
| 127 |
'label' => __( 'Company Name', 'weforms' ), |
| 128 |
'name' => 'position_company_name', |
| 129 |
] ), |
| 130 |
|
| 131 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 132 |
'label' => __( 'Department / Division', 'weforms' ), |
| 133 |
'name' => 'department', |
| 134 |
] ), |
| 135 |
|
| 136 |
array_merge( $all_fields['address_field']->get_field_props(), [ |
| 137 |
'required' => 'yes', |
| 138 |
'label' => __( 'Department / Division', 'weforms' ), |
| 139 |
'name' => 'department', |
| 140 |
] ), |
| 141 |
|
| 142 |
array_merge( $all_fields['numeric_text_field']->get_field_props(), [ |
| 143 |
'label' => __( 'Postal Code', 'weforms' ), |
| 144 |
'name' => 'position_postal_code', |
| 145 |
] ), |
| 146 |
|
| 147 |
array_merge( $all_fields['country_list_field']->get_field_props(), [ |
| 148 |
'label' => __( 'Province', 'weforms' ), |
| 149 |
'name' => 'position_province', |
| 150 |
] ), |
| 151 |
|
| 152 |
array_merge( $all_fields['country_list_field']->get_field_props(), [ |
| 153 |
'label' => __( 'Country', 'weforms' ), |
| 154 |
'name' => 'position_country', |
| 155 |
] ), |
| 156 |
|
| 157 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 158 |
'label' => __( 'Position Title', 'weforms' ), |
| 159 |
'name' => 'position_title', |
| 160 |
] ), |
| 161 |
|
| 162 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 163 |
'label' => __( 'Reference Number', 'weforms' ), |
| 164 |
'name' => 'reference_number', |
| 165 |
] ), |
| 166 |
|
| 167 |
array_merge( $all_fields['website_url']->get_field_props(), [ |
| 168 |
'label' => __( 'Job Posting Url', 'weforms' ), |
| 169 |
'name' => 'job_posting_url', |
| 170 |
] ), |
| 171 |
|
| 172 |
array_merge( $all_fields['numeric_text_field']->get_field_props(), [ |
| 173 |
'label' => __( 'Min Salary', 'weforms' ), |
| 174 |
'name' => 'min_salary', |
| 175 |
] ), |
| 176 |
|
| 177 |
array_merge( $all_fields['numeric_text_field']->get_field_props(), [ |
| 178 |
'label' => __( 'Max Salary', 'weforms' ), |
| 179 |
'name' => 'max_salary', |
| 180 |
] ), |
| 181 |
|
| 182 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 183 |
'label' => __( 'Salary Details', 'weforms' ), |
| 184 |
'name' => 'salary_details', |
| 185 |
] ), |
| 186 |
|
| 187 |
array_merge( $all_fields['checkbox_field']->get_field_props(), [ |
| 188 |
'label' => ' ', |
| 189 |
'name' => 'salary_negotiable', |
| 190 |
'options' => [ |
| 191 |
'salary_negotiable_check' => __( 'Salary Negotiable', 'weforms' ), |
| 192 |
], |
| 193 |
] ), |
| 194 |
|
| 195 |
array_merge( $all_fields['dropdown_field']->get_field_props(), [ |
| 196 |
'label' => 'Type of Employment', |
| 197 |
'name' => 'type_of_employment', |
| 198 |
'options' => [ |
| 199 |
'full_time' => __( 'Full Time', 'weforms' ), |
| 200 |
'part_time' => __( 'Part Time', 'weforms' ), |
| 201 |
], |
| 202 |
|
| 203 |
'first' => ' ', |
| 204 |
] ), |
| 205 |
|
| 206 |
array_merge( $all_fields['dropdown_field']->get_field_props(), [ |
| 207 |
'label' => 'Type of Contract', |
| 208 |
'name' => 'type_of_Contract', |
| 209 |
'options' => [ |
| 210 |
'permanent' => __( 'Permanent', 'weforms' ), |
| 211 |
'term' => __( 'Term/Contract', 'weforms' ), |
| 212 |
'locum' => __( 'Locum', 'weforms' ), |
| 213 |
], |
| 214 |
|
| 215 |
'first' => ' ', |
| 216 |
] ), |
| 217 |
|
| 218 |
array_merge( $all_fields['dropdown_field']->get_field_props(), [ |
| 219 |
'label' => 'Type Of Position', |
| 220 |
'name' => 'type_of_position', |
| 221 |
'options' => [ |
| 222 |
'academic' => __( 'Academic', 'weforms' ), |
| 223 |
'administrative' => __( 'Administrative', 'weforms' ), |
| 224 |
'obstetrics' => __( 'Obstetrics', 'weforms' ), |
| 225 |
'gynaecology' => __( 'Gynaecology', 'weforms' ), |
| 226 |
'obstetrics_gynaecology' => __( 'Obstetrics/Gynaecology', 'weforms' ), |
| 227 |
'other' => __( 'Other', 'weforms' ), |
| 228 |
], |
| 229 |
|
| 230 |
'first' => ' ', |
| 231 |
] ), |
| 232 |
|
| 233 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 234 |
'label' => 'Job Summary', |
| 235 |
'name' => 'job_summary', |
| 236 |
] ), |
| 237 |
|
| 238 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 239 |
'label' => 'Roles and Responsibilities', |
| 240 |
'name' => 'roles_and_responsibilities', |
| 241 |
] ), |
| 242 |
|
| 243 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 244 |
'label' => 'Skills and Competencies', |
| 245 |
'name' => 'skills_and_competencies', |
| 246 |
] ), |
| 247 |
|
| 248 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 249 |
'label' => 'Education and Experience', |
| 250 |
'name' => 'education_and_experience', |
| 251 |
] ), |
| 252 |
|
| 253 |
array_merge( $all_fields['textarea_field']->get_field_props(), [ |
| 254 |
'label' => 'Other', |
| 255 |
'name' => 'other', |
| 256 |
] ), |
| 257 |
|
| 258 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 259 |
'required' => 'yes', |
| 260 |
'label' => 'Start Date of Employment', |
| 261 |
'name' => 'start_date_of_employment', |
| 262 |
] ), |
| 263 |
|
| 264 |
array_merge( $all_fields['text_field']->get_field_props(), [ |
| 265 |
'required' => 'yes', |
| 266 |
'label' => 'Application Deadline', |
| 267 |
'name' => 'application_deadline', |
| 268 |
] ), |
| 269 |
|
| 270 |
array_merge( $all_fields['section_break']->get_field_props(), [ |
| 271 |
'label' => __( 'Payment Information', 'weforms' ), |
| 272 |
'name' => 'payment_information', |
| 273 |
'description' => ' ', |
| 274 |
] ), |
| 275 |
|
| 276 |
array_merge( $all_fields['radio_field']->get_field_props(), [ |
| 277 |
'title' => __( 'Posting Duration (in Months)', 'weforms' ), |
| 278 |
'name' => 'posting_duration', |
| 279 |
'options' => [ |
| 280 |
'one' => __( '$ 350.00 - 1 Month Posting Duration', 'weforms' ), |
| 281 |
'two' => __( '$ 600.00 - 2 Month Posting Duration', 'weforms' ), |
| 282 |
'three' => __( '$ 850.00 - 3 Month Posting Duration', 'weforms' ), |
| 283 |
], |
| 284 |
] ), |
| 285 |
]; |
| 286 |
|
| 287 |
return $form_fields; |
| 288 |
} |
| 289 |
} |
| 290 |
|