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 | {/literal}{/footer_script} |
---|
25 | |
---|
26 | <form method="POST" action="{$F_ACTION}" class="properties"> |
---|
27 | <fieldset> |
---|
28 | <legend>{'Select dependencies'|translate}</legend> |
---|
29 | |
---|
30 | <table class="files"> |
---|
31 | <thead> |
---|
32 | <tr> |
---|
33 | <th></th> |
---|
34 | <th>{'Core dependency'|translate}</th> |
---|
35 | <th>{'Local dependencies'|translate}</th> |
---|
36 | </tr> |
---|
37 | </thead> |
---|
38 | |
---|
39 | <tbody> |
---|
40 | {foreach from=$PLA_FILES item=file} |
---|
41 | <tr> |
---|
42 | <td>{$file.path}</td> |
---|
43 | <td> |
---|
44 | <div class="switch-button type"> |
---|
45 | <span class="item common {if not $file.is_admin}active{/if}">{'Common'|translate}</span> |
---|
46 | <span class="item admin {if $file.is_admin}active{/if}">{'Admin'|translate}</span> |
---|
47 | <input type="hidden" name="files[{$file.path}][is_admin]" value="{if $file.is_admin}true{else}false{/if}"> |
---|
48 | </div> |
---|
49 | </td> |
---|
50 | <td> |
---|
51 | <div class="switch-button other"> |
---|
52 | {foreach from=$PLA_LANG_FILES item=lang_file} |
---|
53 | <span class="item other {if $lang_file|in_array:$file.lang_files}active{/if}">{$lang_file}</span> |
---|
54 | <input type="hidden" name="files[{$file.path}][lang_files][{$lang_file}]" value="{if $lang_file|in_array:$file.lang_files}true{else}false{/if}"> |
---|
55 | {/foreach} |
---|
56 | </div> |
---|
57 | </td> |
---|
58 | </tr> |
---|
59 | {/foreach} |
---|
60 | </tbody> |
---|
61 | </table> |
---|
62 | |
---|
63 | <p class="formButtons"><input type="submit" value="{'Continue'|translate}"></p> |
---|
64 | </fieldset> |
---|
65 | </form> |
---|