source: extensions/AMenuManager/admin/amm_personalisedlist_edit.tpl @ 25433

Last change on this file since 25433 was 15366, checked in by grum, 12 years ago

feature:2642 - Compatibility with Piwigo 2.4

  • Property svn:executable set to *
File size: 4.1 KB
Line 
1{include file='include/autosize.inc.tpl'}
2
3{literal}
4<script type="text/javascript">
5
6  //global var ; need to not have to initialize them every time a value is changed
7  var objlang;
8  var objnames = new Array('iamm_personalised_title', 'iamm_personalised_content');
9  var objinput = new Array();   //input text from form => objinput[name]
10  var objhidden = new Array();  //input hidden from form => objhidden[name][lang]
11
12  function init()
13  {
14    objlang = document.getElementById('islang');
15    for(i=0;i<objnames.length;i++)
16    {
17      objinput[i] = document.getElementById(objnames[i]);
18      objhidden[i] = new Array();
19      for(j=0;j<objlang.options.length;j++)
20      {
21        objhidden[i][j] = document.getElementById(objnames[i]+'_'+objlang.options[j].value);
22      }
23    }
24  }
25
26  function change_lang()
27  {
28    for(i=0;i<objnames.length;i++)
29    {
30      objinput[i].value = objhidden[i][objlang.options.selectedIndex].value;
31    }
32  }
33
34  function apply_changes(input_id)
35  {
36    var obj=document.getElementById(input_id);
37    objhidden[objnames.indexOf(input_id)][objlang.options.selectedIndex].value = obj.value;
38  }
39
40</script>
41{/literal}
42
43
44{if isset($datas.modeedit)}
45
46  <h3>
47  {if $datas.modeedit=='create'}
48    {'g002_createofpersonalised'|@translate}
49  {else}
50    {'g002_editofpersonalised'|@translate}
51  {/if}
52  / <span style="font-weight:normal"><a href="{$datas.personalised_list}">{'g002_personalisedlist'|@translate}</a></span></h3>
53  </h3>
54
55
56<form method="post" action="" class="general">
57  <fieldset>
58    <legend>{'g002_setting_personalised_properties'|@translate}</legend>
59
60    <table class="formtable">
61      <tr>
62        <td>{'g002_setting_block_active'|@translate}</td>
63        <td>
64          <select name="famm_personalised_visible" id="iamm_personalised_visible">
65            {html_options values=$datas.yesno_values output=$datas.yesno_labels selected=$datas.visible_selected}
66          </select>
67        </td>
68      </tr>
69
70      <tr>
71        <td>{'g002_setting_personalised_nfo'|@translate}</td>
72        <td>
73          <input type="text" name="famm_personalised_nfo" id="iamm_personalised_nfo" value="{$datas.nfo}" maxlength="255"/>
74        </td>
75      </tr>
76
77    </table>
78
79  </fieldset>
80
81  <fieldset>
82    <legend>{'g002_setting_block_menu'|@translate}</legend>
83
84    {if isset($datas.language_list) and count($datas.language_list)}
85      {foreach from=$datas.language_list key=name item=language_row}
86        <input type="hidden" name="famm_personalised_title_{$language_row.LANG}"
87                id="iamm_personalised_title_{$language_row.LANG}" value="{$language_row.MENUBARTIT}">
88        <input type="hidden" name="famm_personalised_content_{$language_row.LANG}"
89                id="iamm_personalised_content_{$language_row.LANG}" value="{$language_row.MENUBARCONTENT}">
90      {/foreach}
91    {/if}
92
93    <table class="formtable">
94
95      <tr>
96        <td>{'g002_setting_block_langchoice'|@translate}</td>
97        <td>
98          <select onchange="change_lang();" id="islang">
99            {html_options values=$datas.language_list_values output=$datas.language_list_labels selected=$datas.lang_selected}
100          </select><br>
101        </td>
102      </tr>
103
104      <tr>
105        <td colspan=2><hr/></td>
106      </tr>
107
108      <tr>
109        <td>{'g002_setting_block_title'|@translate}</td>
110        <td>
111          <input type="text" id="iamm_personalised_title" value="" maxlength="255" onkeyup="apply_changes('iamm_personalised_title');" onblur="apply_changes('iamm_personalised_title');"/>
112        </td>
113      </tr>
114
115      <tr>
116        <td>{'g002_setting_personalised_content'|@translate}</td>
117        <td>
118          <textarea id="iamm_personalised_content" cols=80 rows=25 onkeyup="apply_changes('iamm_personalised_content');" /></textarea>
119        </td>
120      </tr>
121
122
123    </table>
124
125  </fieldset>
126
127
128  <p>
129    <input type="submit" name="famm_submit_apply" id="iamm_submit_apply" value="{'g002_apply'|@translate}" >
130  </p>
131
132  <input type="hidden" name="famm_modeedit" value="{$datas.modeedit}">
133  <input type="hidden" name="famm_id" value="{$datas.id}">
134
135</form>
136
137
138<script type="text/javascript">
139  init();
140  change_lang();
141</script>
142
143{/if}
Note: See TracBrowser for help on using the repository browser.