|
24 | 24 | <a href="{plink :Auth:login, 'backlink' => $backlink}">{_web.application_content.login_required_link}</a>{_web.application_content.login_required_end}
|
25 | 25 | </div>
|
26 | 26 | {elseif $nonregisteredRole}
|
27 |
| - <script> |
28 |
| - Nette.validators.AppWebModuleFormsApplicationForm_toggleArrivalDeparture = function (elem, arg, value) { |
29 |
| - var i; |
30 |
| - for (i = 0; i < value.length; i++) { |
31 |
| - if (jQuery.inArray(value[i], arg) != -1) |
32 |
| - return true; |
33 |
| - } |
34 |
| - return false; |
35 |
| - }; |
36 |
| - </script> |
37 |
| - |
38 |
| - {if $explicitSubeventsExists} |
| 27 | + {if $noRegisterableRole} |
| 28 | + <div class="alert alert-info alert-forever"> |
| 29 | + {if $registrationStart && $registrationEnd} |
| 30 | + {_web.application_content.no_registerable_role_start_end, ['start' => $registrationStart->format('j. n. Y H:i'), 'end' => $registrationEnd->format('j. n. Y H:i')]} |
| 31 | + {elseif $registrationStart} |
| 32 | + {_web.application_content.no_registerable_role_start, ['start' => $registrationStart->format('j. n. Y H:i')]} |
| 33 | + {elseif $registrationEnd} |
| 34 | + {_web.application_content.no_registerable_role_end, ['end' => $registrationEnd->format('j. n. Y H:i')]} |
| 35 | + {else} |
| 36 | + {_web.application_content.no_registerable_role} |
| 37 | + {/if} |
| 38 | + </div> |
| 39 | + {else} |
39 | 40 | <script>
|
40 |
| - $(function () { |
41 |
| - $("select[name='roles[]']").on("change", function () { |
| 41 | + Nette.validators.AppWebModuleFormsApplicationForm_toggleArrivalDeparture = function (elem, arg, value) { |
| 42 | + var i; |
| 43 | + for (i = 0; i < value.length; i++) { |
| 44 | + if (jQuery.inArray(value[i], arg) != -1) |
| 45 | + return true; |
| 46 | + } |
| 47 | + return false; |
| 48 | + }; |
| 49 | + </script> |
| 50 | + |
| 51 | + {if $explicitSubeventsExists} |
| 52 | + <script> |
| 53 | + $(function () { |
| 54 | + $("select[name='roles[]']").on("change", function () { |
| 55 | + changeSubeventsRequired(); |
| 56 | + }); |
42 | 57 | changeSubeventsRequired();
|
43 | 58 | });
|
44 |
| - changeSubeventsRequired(); |
45 |
| - }); |
46 | 59 |
|
47 |
| - function changeSubeventsRequired() { |
48 |
| - var value = $("select[name='roles[]']").val(); |
49 |
| - var label = $("label[for='frm-applicationContent-applicationForm-subevents']"); |
50 |
| - var rolesWithSubevents = JSON.parse({$rolesWithSubevents}); |
51 |
| - var i; |
52 |
| - for (i = 0; i < value.length; i++) { |
53 |
| - if (jQuery.inArray(parseInt(value[i]), rolesWithSubevents) != -1) { |
54 |
| - label.addClass('required'); |
55 |
| - return; |
| 60 | + function changeSubeventsRequired() { |
| 61 | + var value = $("select[name='roles[]']").val(); |
| 62 | + var label = $("label[for='frm-applicationContent-applicationForm-subevents']"); |
| 63 | + var rolesWithSubevents = JSON.parse({$rolesWithSubevents}); |
| 64 | + var i; |
| 65 | + for (i = 0; i < value.length; i++) { |
| 66 | + if (jQuery.inArray(parseInt(value[i]), rolesWithSubevents) != -1) { |
| 67 | + label.addClass('required'); |
| 68 | + return; |
| 69 | + } |
56 | 70 | }
|
| 71 | + label.removeClass('required'); |
57 | 72 | }
|
58 |
| - label.removeClass('required'); |
59 |
| - } |
60 |
| - </script> |
61 |
| - {/if} |
| 73 | + </script> |
| 74 | + {/if} |
62 | 75 |
|
63 |
| - <div class="well"> |
64 |
| - {control applicationForm} |
65 |
| - </div> |
| 76 | + <div class="well"> |
| 77 | + {control applicationForm} |
| 78 | + </div> |
| 79 | + {/if} |
66 | 80 | {else}
|
67 | 81 | {if $unapprovedRole}
|
68 | 82 | <div class="alert alert-warning alert-forever">
|
|
0 commit comments