1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
|
<?php $GLOBALS["datetimepicker"] = 1;
$page_setting = array( 'languages' => $languages, );
// use $_SESSION because easy for using check_field_permission() $_SESSION['fields_permission'] = $fields_permission;
$is_judge_submitted = count(Score_status_model::get_data_by_field_with_value(['application_id' => $id, 'judge_id' => $_SESSION['judge_id'], 'judge_submitted' => 1])) != 0;
$display_langs = array( 'en' => 'English', 'tc' => 'Chinese', ); // 0 & * == 0 // 1 & 1 == 1 // 1 & 2 == 0 // 1 & 3 == 1 // 2 & 2 == 2 // 2 & 3 == 2 function check_field_permission($field, $check_permission = 1) { $permission = $_SESSION['fields_permission'][$field]; if (($permission & $check_permission) == $check_permission) { if ($check_permission == 1) { return true; } else if ($check_permission == 2) { return ''; } } else { if ($check_permission == 1) { return false; } else if ($check_permission == 2) { return 'readonly'; } } } ?>
<?php include_once('templates/top.php'); ?> <style> input[type=checkbox] { transform: scale(1.5); } </style> <section id="page-title" style="background-image: url('<?php echo assets_url('main/img/lady_gold_2018.jpg'); ?>');" class="background-title"> <div class="container clearfix"> <h1><?php echo __('Score Fom'); ?></h1> <ol class="breadcrumb"> <li><a href="#"><?php echo __('Home'); ?></a></li> <li><a href="#"><?php echo __('Score'); ?></a></li> <li class="active"><?php echo __('Form'); ?></li> </ol> </div> </section>
<!-- Content ============================================= --> <section id="content"> <div class="content-wrap"> <div class="container clearfix"> <div class="form-controls"> <div class="fl"> <a href="<?php echo front_url('application'); ?>""><i class="icon-angle-left"></i> <?php echo __('Back'); ?></a> </div> <div class="pull-right"> <?php echo __('Ref no.: ') . $reference_no; ?> </div> <div class="clear"></div> </div>
<?php echo form_open(front_url('score/submit_form/' . $id), 'id="application_form"'); ?> <?php if (validation_errors()) {?> <div class="col_full alert alert-danger"> <?php echo validation_errors(); ?> </div> <?php }?>
<?php $field = 'category_id'; ?> <?php if(check_field_permission($field)) { ?> <h2><?php echo __('Category Entered'); ?> - </h2> <?php foreach($categories as $key => $row) { ?> <div class="form-check"> <input type="radio" class="form-check-input" name="<?php echo $field; ?>" id="<?php echo $field . $key; ?>" value="<?php echo $row['id']; ?>" <?php echo check_field_permission($field, 2) ?> <?php echo $row['id'] == set_value($field, $$field) ? 'checked' : ''; ?> <?php echo is_required($validate_fields[$field], 3); ?>> <label class="form-check-label" for="<?php echo $field . $key; ?>"> <?php echo $row['name_' . get_lang()]; ?> </label> <?php if (!empty($row['desc_' . get_lang()])) { ?> <br> *<?php echo $row['desc_' . get_lang()]; ?> <?php } ?> </div> <br> <?php } ?> <?php } ?>
<div class="tabpanel panel-form-01 active"> <div class="nomination-form">
<div class="heading">1. <?php echo __('Personal Particulars of Nominee'); ?></div>
<?php $field = 'nominee_title'; ?> <?php if(check_field_permission($field)) { ?> <div class="FormFullRow formrow"> <h4><?php echo $name_fields[$field]; ?></h4> <?php foreach(['ms' => __('Ms'), 'mrs' => __('Mrs'), 'miss' => __('Miss'), 'dr' => __('Dr')] as $key => $name) { ?> <div class="radio-check"> <?php $tmp_value = set_value($field, $$field); ?> <input type="radio" class="checkbox-style" name="<?php echo $field; ?>" id="<?php echo $field . $key; ?>" value="<?php echo $key; ?>" <?php echo check_field_permission($field, 2) ?> <?php echo $key === set_value($field, $$field) ? 'checked' : ''; ?> <?php echo is_required($validate_fields[$field], 3); ?>> <label class="checkbox-style-3-label" for="<?php echo $field . $key; ?>"> <?php echo $name; ?> </label> </div> <?php } ?> </div> <?php } ?>
<?php $temp_field = 'nominee_name_'; ?> <?php if(check_field_permission($temp_field)) { ?> <div class="row formrow"> <?php foreach ($page_setting['languages'] as $lang => $language) { $field = $temp_field . $lang; $lable = 'Assistant ' . $display_langs[$lang] . ' Name'; ?> <div class="col-md-6"> <h4><?php echo $lable; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($temp_field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div> <?php } ?>
<div class="row formrow"> <?php $field = 'nominee_birth_date'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <?php $format = 'Y-m-d'; $max_date = new DateTime(); $min_date = new DateTime(); $min_date->setDate($min_date->format('Y') - 120, 1, 1); ?> <input name="<?php echo $field; ?>" class="sm-form-control datepicker" data-options="yearRange=>c-120:c+120; maxDate=><?php echo $max_date->format($format); ?>; minDate=><?php echo $min_date->format($format); ?>" value="<?php echo set_value($field, $$field) == '0000-00-00' ? '' : set_value($field, $$field) ; ?>" <?php echo check_field_permission($temp_field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'nominee_birth_place'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'nominee_email'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="email" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo Member_model::get_certain($nominee_member_id)['email']; ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'nominee_tel'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'nominee_wechat'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<?php $field = 'nominee_assistant_title'; ?> <?php if(check_field_permission($field)) { ?> <div class="FormFullRow formrow"> <h4><?php echo $name_fields[$field]; ?></h4> <?php foreach(['mr' => __('Mr'), 'ms' => __('Ms'), 'miss' => __('Miss')] as $key => $name) { ?> <div class="radio-check"> <?php $tmp_value = set_value($field, $$field); ?> <input type="radio" class="checkbox-style" name="<?php echo $field; ?>" id="<?php echo $field . $key; ?>" value="<?php echo $key; ?>" <?php echo check_field_permission($field, 2) ?> <?php echo $key === set_value($field, $$field) ? 'checked' : ''; ?> <?php echo is_required($validate_fields[$field], 3); ?>> <label class="checkbox-style-3-label" for="<?php echo $field . $key; ?>"> <?php echo $name; ?> </label> </div> <?php } ?> </div> <?php } ?>
<?php $temp_field = 'nominee_assistant_name_'; ?> <?php if(check_field_permission($temp_field)) { ?> <div class="row formrow"> <?php foreach ($page_setting['languages'] as $lang => $language) { $field = $temp_field . $lang; $lable = 'Assistant ' . $display_langs[$lang] . ' Name'; ?> <div class="col-md-6"> <h4><?php echo $lable; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($temp_field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div> <?php } ?>
<div class="row formrow"> <?php $field = 'nominee_assistant_email'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="email" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'nominee_assistant_tel'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<div class="heading">2. <?php echo __('Company Information'); ?></div>
<div class="row formrow"> <?php $field = 'company_name'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'company_address'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'company_position'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'company_position_years'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="number" min="0" step="0.5" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'company_is_founder'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <?php foreach([1 => __('Yes'), 0 => __('No')] as $key => $name) { ?> <div class="radio-check"> <?php $tmp_value = set_value($field, $$field); ?> <input type="radio" class="checkbox-style" name="<?php echo $field; ?>" id="<?php echo $field . $key; ?>" value="<?php echo $key; ?>" <?php echo check_field_permission($field, 2) ?> <?php echo (string) $key === (string) set_value($field, $$field) ? 'checked' : ''; ?> <?php echo is_required($validate_fields[$field], 3); ?>> <label class="checkbox-style-3-label" for="<?php echo $field . $key; ?>"> <?php echo $name; ?> </label> </div> <?php } ?> </div> <?php } ?>
<?php $field = 'company_is_family_business'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-6"> <h4><?php echo $name_fields[$field]; ?></h4> <?php foreach([1 => __('Yes'), 0 => __('No')] as $key => $name) { ?> <div class="radio-check"> <?php $tmp_value = set_value($field, $$field); ?> <input type="radio" class="checkbox-style" name="<?php echo $field; ?>" id="<?php echo $field . $key; ?>" value="<?php echo $key; ?>" <?php echo check_field_permission($field, 2) ?> <?php echo (string) $key === (string) set_value($field, $$field) ? 'checked' : ''; ?> <?php echo is_required($validate_fields[$field], 3); ?>> <label class="checkbox-style-3-label" for="<?php echo $field . $key; ?>"> <?php echo $name; ?> </label> </div> <?php } ?> <br> * <?php echo __('Family-owned is multi-generational and where the family holds more than 20% equity'); ?> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'company_founded_year'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="number" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'company_industry'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'company_website'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'company_is_listed'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <?php foreach([1 => __('Yes'), 0 => __('No')] as $key => $name) { ?> <div class="radio-check"> <?php $tmp_value = set_value($field, $$field); ?> <input type="radio" class="checkbox-style" name="<?php echo $field; ?>" id="<?php echo $field . $key; ?>" value="<?php echo $key; ?>" <?php echo check_field_permission($field, 2) ?> <?php echo (string) $key === (string) set_value($field, $$field) ? 'checked' : ''; ?> <?php echo is_required($validate_fields[$field], 3); ?>> <label class="checkbox-style-3-label" for="<?php echo $field . $key; ?>"> <?php echo $name; ?> </label> </div> <?php } ?> </div> <?php } ?>
<?php $field = 'company_stock_code'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?> (<?php echo __('for listed company only'); ?>)</h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<!-- service start --> <h3 class="formh3"><?php echo __('Affiliated Community Service Organizations And Community'); ?></h3> <?php $temp_services = array(); $key = 0; if (empty($this->form_validation->error_array())) { $temp_services = $services; } else { $service_fields = array('organization_name', 'participation_year', 'involvement', 'achievement'); foreach ($service_fields as $field){ $$field = set_value($field . '[]');
foreach ($$field as $key => $value) { $temp_services[$key][$field] = $value; } } } $temp_services[] = array(); ?> <?php foreach($temp_services as $key => $row){ ?> <div name="service_flow"> <div class="row formrow" >
<?php $field = 'organization_name'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-3"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>[%key%]" value="<?php echo $row[$field]; ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'participation_year'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-2"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="number" class="sm-form-control" name="<?php echo $field; ?>[%key%]" value="<?php echo $row[$field]; ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'involvement'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-3"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>[%key%]" value="<?php echo $row[$field]; ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'achievement'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>[%key%]" value="<?php echo $row[$field]; ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<div class="clear"></div> <br> </div> <?php } ?> <!-- service end -->
<div class="heading">3. <?php echo __('Narratives'); ?></div>
<p><?php echo __('The following application notes cover five areas, and the jury will select based on all relevant information submitted to enrich the personal and business stories behind the nominees.'); ?></p>
<div class="row formrow"> <?php $field = 'narrative_enterprise'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-12"> <h3 class="formh3">A. <?php echo $name_fields[$field]; ?></h3> <p> • <?php echo __('History of the company , business strategies and evolution'); ?> <br> • <?php echo __('Major development projects and sustainability'); ?> <br> • <?php echo __('Nominee\'s vision or planning for the future growth of the business'); ?> </p> <textarea class="sm-form-control" name="<?php echo $field; ?>" <?php echo is_required($validate_fields[$field], 3); ?> <?php echo check_field_permission($field, 2); ?>><?php echo set_value($field, $$field); ?></textarea> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'narrative_industry'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-12"> <h3 class="formh3">B. <?php echo $name_fields[$field]; ?></h3> <p> • <?php echo __('Positive contribution to the further development of the industry'); ?> <br> • <?php echo __('Achievement in innovating new product/service, or developed new markets'); ?> </p> <textarea class="sm-form-control" name="<?php echo $field; ?>" <?php echo is_required($validate_fields[$field], 3); ?> <?php echo check_field_permission($field, 2); ?>><?php echo set_value($field, $$field); ?></textarea> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'narrative_contribution'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-12"> <h3 class="formh3">C. <?php echo $name_fields[$field]; ?></h3> <p> • <?php echo __('Demonstrate how to align with GBA development to create a mutual benefit business model'); ?> <br> </p> <textarea class="sm-form-control" name="<?php echo $field; ?>" <?php echo is_required($validate_fields[$field], 3); ?> <?php echo check_field_permission($field, 2); ?>><?php echo set_value($field, $$field); ?></textarea> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'narrative_corporate'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-12"> <h3 class="formh3">D. <?php echo $name_fields[$field]; ?></h3> <p> • <?php echo __('How does the nominee give back to the community?'); ?> <br> • <?php echo __('How to be a key driver of corporate social responsibility in the enterprise'); ?> </p> <textarea class="sm-form-control" name="<?php echo $field; ?>" <?php echo is_required($validate_fields[$field], 3); ?> <?php echo check_field_permission($field, 2); ?>><?php echo set_value($field, $$field); ?></textarea> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'narrative_personal'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-12"> <h3 class="formh3">E. <?php echo $name_fields[$field]; ?></h3> <p> • <?php echo __('Details of awards and/or honors received by nominee'); ?> <br> • <?php echo __('Past media coverages related to nominee'); ?> </p> <textarea class="sm-form-control" name="<?php echo $field; ?>" <?php echo is_required($validate_fields[$field], 3); ?> <?php echo check_field_permission($field, 2); ?>><?php echo set_value($field, $$field); ?></textarea> </div> <?php } ?> </div>
<div class="heading">4. <?php echo __('Terms and conditions'); ?></div>
<p><?php echo __('I agree that the Organizers may obtain publicly available information through any means (including but not limited to information) available on social media, and/or the internet) as to confirm or addition to this nomination; and agree the Organizers submit the collected information together with the nomination form and attachments to the Panel of Judges for evaluation purpose.'); ?></p> <p><?php echo __('If I am the winner of this Women Entrepreneur Award, I agree to further provide more detailed information as requested by the Organizers and hereby authorize the Organizers to use, edit publicize, copy and reproduce my name and other relevant information of mine, including but not limited to picture, portrait, photograph, film, videotape, or recordings of my voice for marketing and promotional purposes, such as production, printing materials, media publications, broadcast.'); ?></p>
<p> <?php echo __('If I am the winner of this Women Entrepreneur Award, I *'); ?> <?php $field = 'terms_is_not_attend';?> <input type="checkbox" name="<?php echo $field; ?>" <?php echo set_value($field, $$field) == 1 ? 'checked' : ''; ?> <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> <?php echo (' decline to * accept the award and attend the award and attend the Award Presentation Banquet to be held on 4 December, 2018 (have to contribute HK$30,000 for banquet), and participating in Organizers' relevant promotion activities. *If you want to decline the offer, please put ✔ in the box'); ?> <input type="checkbox" disabled> . </p> <p><?php echo __('The contribution amount will be used for 2 complimentary seats at the Award Presentation Banquet, trophy, exposure on newspaper/magazine and social media promotion arranged by the Organizers, right to use the Official logo by awardees (details will be given by the Organizers via email after the submission of nomination form)'); ?></p>
<h3 class="formh3"><?php echo __('Declaration'); ?></h3> <p> <?php $field = 'terms_is_declaration';?> <input type="checkbox" name="<?php echo $field; ?>" <?php echo set_value($field, $$field) == 1 ? 'checked' : ''; ?> <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> <?php echo __('I hereby certify that all the facts in this nomination form and supporting documents are true and accurate. I declare that I agree to the selection rules of "GBA Outstanding Women Entrepreneur Awards 2018", and accept the decision of the Panel of Judges as the final decision.'); ?> </p>
<div class="heading">5. <?php echo __('Personal Particulars of Nominator'); ?></div>
<?php $field = 'nominator_title'; ?> <?php if(check_field_permission($field)) { ?> <div class="FormFullRow formrow"> <h4><?php echo $name_fields[$field]; ?></h4> <?php foreach(['mr' => __('Mr'), 'mrs' => __('Mrs'), 'ms' => __('Ms'), 'miss' => __('Miss'), 'dr' => __('Dr')] as $key => $name) { ?> <div class="radio-check"> <?php $tmp_value = set_value($field, $$field); ?> <input type="radio" class="checkbox-style" name="<?php echo $field; ?>" id="<?php echo $field . $key; ?>" value="<?php echo $key; ?>" <?php echo check_field_permission($field, 2) ?> <?php echo $key === set_value($field, $$field) ? 'checked' : ''; ?> <?php echo is_required($validate_fields[$field], 3); ?>> <label class="checkbox-style-3-label" for="<?php echo $field . $key; ?>"> <?php echo $name; ?> </label> </div> <?php } ?> </div> <?php } ?>
<?php $temp_field = 'nominator_name_'; ?> <?php if(check_field_permission($temp_field)) { ?> <div class="row formrow"> <?php foreach ($page_setting['languages'] as $lang => $language) { $field = $temp_field . $lang; $lable = 'Assistant ' . $display_langs[$lang] . ' Name'; ?> <div class="col-md-6"> <h4><?php echo $lable; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($temp_field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div> <?php } ?>
<div class="row formrow"> <?php $field = 'nominator_job_title'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'nominator_company'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'nominator_email'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="email" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo Member_model::get_certain($nominator_member_id)['email']; ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'nominator_tel'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?>
<?php $field = 'nominator_address'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-4"> <h4><?php echo $name_fields[$field]; ?></h4> <input type="text" class="sm-form-control" name="<?php echo $field; ?>" value="<?php echo set_value($field, $$field); ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>> </div> <?php } ?> </div>
<div class="row formrow"> <?php $field = 'nominator_reason'; ?> <?php if(check_field_permission($field)) { ?> <div class="col-md-12"> <h4><?php echo $name_fields[$field]; ?></h4> <textarea class="sm-form-control" name="<?php echo $field; ?>" <?php echo check_field_permission($field, 2); ?> <?php echo is_required($validate_fields[$field], 3); ?>><?php echo set_value($field, $$field); ?></textarea> </div> <?php } ?> </div>
<div class="clear"></div>
<div class="heading"><?php echo __('Score'); ?></div>
<?php foreach ($scoring_items as $row) { ?> <?php $score = Score_model::get_data_by_field_with_value(['scroing_item_id' => $row['id'], 'judge_id' => $_SESSION['judge_id'], 'application_id' => $id])[0]; ?> <div class="row formrow"> <div class="col-md-4"> <h4><?php echo $row['name_' . get_lang()]; ?></h4>
<input type="number" max=20 min=0 class="sm-form-control" data-type="score" name="<?php echo $row['code']; ?>" value="<?php echo set_value($row['code'], $score['point']); ?>" data-required="true"> </div> </div> <?php } ?>
<?php if (!$is_judge_submitted) { ?> <div class="form-button" style="display: block;"> <button class="save-btn" onclick="change_action('save_form')"><i class="icon-save"></i> <?php echo __('Save'); ?></button> <button class="submit-btn" onclick="change_action('submit_form')"><i class="icon-ok"></i> <?php echo __('Submit'); ?></button> <div class="clear"></div> </div> <?php } ?> </div> </div> <?php echo form_close(); ?> <?php include_once('templates/bottom.php'); ?> <script> var control_flow_html = {}; $(function(){ var inputs_value = []; $('input<?php echo $is_judge_submitted ? '' : ':not([data-type="score"]'; ?>').each(function(){ $(this).attr('readonly', true); inputs_value[$(this).attr('name')] = $(this).val(); }); $('input[type="radio"]').each(function(){ $(this).attr('disabled', $(this).prop('readonly') && !$(this).prop('checked')); }); $('input[type="checkbox"]').click(function(){ if($(this).attr('readonly')){ return false; } });
$('input[readonly]').change(function(e){ $(this).val(inputs_value[$(this).attr('name')]); });
$('textarea').each(function(){ $(this).attr('readonly', true); });
control_flow_html['service_flow'] = $('[name="service_flow"]:last')[0].outerHTML; if($('[name="service_flow"]').length != 1){ $('[name="service_flow"]:last')[0].outerHTML = ''; } });
function delete_control_field(obj, name){ // if(name == 'control_item'){ // $(obj).parentsUntil('.form-group').parent().prev('.form-group').remove(); // $(obj).parentsUntil('.form-group').parent().remove(); // } else if (name == 'control_category'){ // $(obj).parentsUntil('[name="category_flow"]').parent().remove(); // if($('[name="category_flow"]').length == 0){ // $('#end_flow_hr').hide(); // } // } else if (name == 'doc_flow'){ // $(obj).parentsUntil('[name="doc_flow"]').parent().remove(); // } $(obj).parentsUntil('[name="' + name + '"]').parent().remove(); }
function add_control_field(obj, name){ var temp_html = control_flow_html[name]; $('[name="add_' + name + '"]').before(temp_html); }
function reset_key(name){ console.log(name); $('[name="' + name + '_flow"]').each(function(i) { <?php //if not set value, post will empty; ?> $(this).find('input').each(function(key, input){ $(input).attr('value', $(input).val()); }); $(this).html($(this).html().replace(/%key%/g, i)); }); }
function change_action(action) { if (action == 'save_form') { var href = $('#application_form').attr('action').replace('submit_form', action); $('input, textarea').attr('required', false); } else { var href = $('#application_form').attr('action').replace('save_form', action); $('input[data-required="true"], textarea[data-required="true"]').attr('required', true); } $('#application_form').attr('action', href); }
var application_lock = false; $('#application_form').bind('submit', function(e) { if (application_lock) { e.preventDefault(); } else { reset_key('service'); application_lock = true; } }); </script> <?php unset($_SESSION['fields_permission']); ?>
|