1 | {footer_script}{literal} |
---|
2 | $('.switch-button.type span').click(function() { |
---|
3 | $(this).siblings('span').removeClass('active'); |
---|
4 | $(this).addClass('active'); |
---|
5 | |
---|
6 | if ($(this).hasClass('common')) { |
---|
7 | $(this).nextAll('input').val('false'); |
---|
8 | } |
---|
9 | else { |
---|
10 | $(this).nextAll('input').val('true'); |
---|
11 | } |
---|
12 | }); |
---|
13 | |
---|
14 | $('.switch-button.other span').click(function() { |
---|
15 | if ($(this).hasClass('active')) { |
---|
16 | $(this).removeClass('active'); |
---|
17 | $(this).next('input').val('false'); |
---|
18 | } |
---|
19 | else { |
---|
20 | $(this).addClass('active'); |
---|
21 | $(this).next('input').val('true'); |
---|
22 | } |
---|
23 | }); |
---|
24 | |
---|
25 | $('.switch-button.ignore span').click(function() { |
---|
26 | if ($(this).hasClass('active')) { |
---|
27 | $(this).removeClass('active'); |
---|
28 | $(this).next('input').val('false'); |
---|
29 | } |
---|
30 | else { |
---|
31 | $(this).addClass('active'); |
---|
32 | $(this).next('input').val('true'); |
---|
33 | } |
---|
34 | }); |
---|
35 | {/literal}{/footer_script} |
---|
36 | |
---|
37 | <form method="POST" action="{$F_ACTION}" class="properties"> |
---|
38 | <fieldset> |
---|
39 | <legend>{'Select dependencies'|translate}</legend> |
---|
40 | |
---|
41 | <table class="files"> |
---|
42 | <thead> |
---|
43 | <tr> |
---|
44 | <th></th> |
---|
45 | <th>{'Core dependency'|translate}</th> |
---|
46 | <th>{'Local dependencies'|translate}</th> |
---|
47 | <th>{'Ignore'|translate}</th> |
---|
48 | </tr> |
---|
49 | </thead> |
---|
50 | |
---|
51 | <tbody> |
---|
52 | {foreach from=$PLA_FILES item=file} |
---|
53 | <tr> |
---|
54 | <td>{$file.path}</td> |
---|
55 | <td> |
---|
56 | <div class="switch-button type"> |
---|
57 | <span class="item common {if not $file.is_admin}active{/if}">{'Common'|translate}</span> |
---|
58 | <span class="item admin {if $file.is_admin}active{/if}">{'Admin'|translate}</span> |
---|
59 | <input type="hidden" name="files[{$file.path}][is_admin]" value="{if $file.is_admin}true{else}false{/if}"> |
---|
60 | </div> |
---|
61 | </td> |
---|
62 | <td> |
---|
63 | <div class="switch-button other"> |
---|
64 | {foreach from=$PLA_LANG_FILES item=lang_file} |
---|
65 | <span class="item other {if $lang_file|in_array:$file.lang_files}active{/if}">{$lang_file}</span> |
---|
66 | <input type="hidden" name="files[{$file.path}][lang_files][{$lang_file}]" value="{if $lang_file|in_array:$file.lang_files}true{else}false{/if}"> |
---|
67 | {/foreach} |
---|
68 | </div> |
---|
69 | </td> |
---|
70 | <td> |
---|
71 | <div class="switch-button ignore"> |
---|
72 | <span class="item ignore {if $file.ignore}active{/if}">×</span> |
---|
73 | <input type="hidden" name="files[{$file.path}][ignore]" value="{if $file.ignore}true{else}false{/if}"> |
---|
74 | </div> |
---|
75 | </td> |
---|
76 | </tr> |
---|
77 | {/foreach} |
---|
78 | </tbody> |
---|
79 | </table> |
---|
80 | |
---|
81 | <p class="formButtons"><input type="submit" value="{'Continue'|translate}"></p> |
---|
82 | </fieldset> |
---|
83 | </form> |
---|