1 | <div class="titrePage"> |
---|
2 | <h2>Additional Pages - {'Configuration'|@translate}</h2> |
---|
3 | </div> |
---|
4 | |
---|
5 | <form name="apform" method="post" action="" class="properties" ENCTYPE="multipart/form-data"> |
---|
6 | <fieldset id="indexDisplayConf"> |
---|
7 | <legend>{'ap_perm'|@translate}</legend> |
---|
8 | <ul> |
---|
9 | <li> |
---|
10 | <label> |
---|
11 | <span class="property">{'ap_user_perm'|@translate}</span> |
---|
12 | <input type="checkbox" name="user_perm" id="user_perm" value="on" {if $ap_conf.user_perm}checked="checked"{/if}/> |
---|
13 | </label> |
---|
14 | </li> |
---|
15 | |
---|
16 | <li> |
---|
17 | <label> |
---|
18 | <span class="property">{'ap_group_perm'|@translate}</span> |
---|
19 | <input type="checkbox" name="group_perm" id="group_perm" value="on" {if $ap_conf.group_perm}checked="checked"{/if}/> |
---|
20 | </label> |
---|
21 | </li> |
---|
22 | </ul> |
---|
23 | </fieldset> |
---|
24 | |
---|
25 | <fieldset id="indexDisplayConf"> |
---|
26 | <legend>{'Display'|@translate}</legend> |
---|
27 | <ul> |
---|
28 | <li> |
---|
29 | <label> |
---|
30 | <span class="property">{'ap_show_home'|@translate}</span> |
---|
31 | <input type="checkbox" name="show_home" id="show_home" value="on" {if $ap_conf.show_home}checked="checked"{/if}/> |
---|
32 | </label> |
---|
33 | </li> |
---|
34 | |
---|
35 | <li> |
---|
36 | <label> |
---|
37 | <span class="property">{'ap_show_menu'|@translate}</span> |
---|
38 | <input type="checkbox" name="show_menu" id="show_menu" value="on" {if isset($SHOW_MENU)}checked="checked"{/if}/> |
---|
39 | </label> |
---|
40 | </li> |
---|
41 | |
---|
42 | <li id="menu_name" style="display:none;"> |
---|
43 | <span class="property">{'ap_menu_name'|@translate} : |
---|
44 | <select name="lang_desc_select" style="margin-left:30px;"> |
---|
45 | {foreach from=$language item=lang} |
---|
46 | <option value="{$lang.LANGUAGE_CODE}" id="opt_{$lang.LANGUAGE_CODE}">{if empty($lang.VALUE)}✘{else}✔{/if} {$lang.LANGUAGE_NAME}</option> |
---|
47 | {/foreach} |
---|
48 | </select> |
---|
49 | {foreach from=$language item=lang} |
---|
50 | <input type="text" size="50" name="menu_lang[{$lang.LANGUAGE_CODE}]" id="menu_lang_{$lang.LANGUAGE_CODE}" value="{$lang.VALUE}" style="display:none; margin-left:10px;"> |
---|
51 | {/foreach} |
---|
52 | </span> |
---|
53 | </li> |
---|
54 | </ul> |
---|
55 | </fieldset> |
---|
56 | <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"/></p> |
---|
57 | </form> |
---|
58 | |
---|
59 | <script type="text/javascript"> |
---|
60 | var languages = new Array(); |
---|
61 | var filled = new Array; |
---|
62 | {foreach from=$language item=lang} |
---|
63 | languages["{$lang.LANGUAGE_CODE}"] = "{$lang.LANGUAGE_NAME}"; |
---|
64 | if ($('input[id=menu_lang_{$lang.LANGUAGE_CODE}]').val() != '') |
---|
65 | filled.push("{$lang.LANGUAGE_CODE}"); |
---|
66 | {/foreach} |
---|
67 | |
---|
68 | jQuery().ready( function () {ldelim} |
---|
69 | jQuery("#show_menu").click( function() {ldelim} |
---|
70 | if (this.checked) {ldelim} |
---|
71 | jQuery('#menu_name').show(); |
---|
72 | } |
---|
73 | else {ldelim} |
---|
74 | jQuery('#menu_name').hide(); |
---|
75 | } |
---|
76 | }); |
---|
77 | $('select[name="lang_desc_select"]').change(function () {ldelim} |
---|
78 | $('[id^="menu_lang"]').hide(); |
---|
79 | $("#menu_lang_"+this.options[this.selectedIndex].value).show(); |
---|
80 | }); |
---|
81 | $('[id^="menu_lang_"]').keyup(function () {ldelim} |
---|
82 | arr = $(this).attr("id").split("menu_lang_"); |
---|
83 | id = arr[1]; |
---|
84 | opt = $('select[name="lang_desc_select"] option[id="opt_'+id+'"]'); |
---|
85 | if (this.value != '') {ldelim} |
---|
86 | opt.html(opt.html().replace("\u2718", "\u2714")); |
---|
87 | add = true; |
---|
88 | for (i in filled) {ldelim} |
---|
89 | if (filled[i] == id) add = false; |
---|
90 | } |
---|
91 | if (add) {ldelim} |
---|
92 | filled.push(id); |
---|
93 | } |
---|
94 | } |
---|
95 | else {ldelim} |
---|
96 | for (i in filled) {ldelim} |
---|
97 | if (filled[i] == id) filled.splice(i, 1); |
---|
98 | } |
---|
99 | opt.html(opt.html().replace("\u2714", "\u2718")); |
---|
100 | } |
---|
101 | }); |
---|
102 | }); |
---|
103 | |
---|
104 | jQuery('#menu_lang_default').show(); |
---|
105 | if (jQuery("input[name='show_menu']").attr('checked')) {ldelim} |
---|
106 | jQuery('#menu_name').show(); |
---|
107 | } |
---|
108 | </script> |
---|