source: trunk/admin/themes/default/template/photos_add_settings.tpl @ 10100

Last change on this file since 10100 was 9586, checked in by patdenice, 14 years ago

feature:2114
Simplify all admin templates.

File size: 4.2 KB
Line 
1{footer_script}{literal}
2jQuery(document).ready(function(){
3  function toggleResizeFields(prefix) {
4    var checkbox = jQuery("#"+prefix+"_resize");
5    var needToggle = jQuery("input[name^="+prefix+"_]").not(checkbox).not(jQuery("#hd_keep")).parents('tr');
6
7
8    if (jQuery(checkbox).is(':checked')) {
9      needToggle.show();
10
11      if (prefix == "websize") {
12        jQuery("#hd_keep").parents("fieldset").show();
13      }
14    }
15    else {
16      needToggle.hide();
17
18      if (prefix == "websize") {
19        jQuery("#hd_keep").parents("fieldset").hide();
20      }
21    }
22  }
23
24  toggleResizeFields("websize");
25  jQuery("#websize_resize").click(function () {toggleResizeFields("websize")});
26
27  toggleResizeFields("hd");
28  jQuery("#hd_resize").click(function () {toggleResizeFields("hd")});
29
30  function toggleHdFields() {
31    var checkbox = jQuery("#hd_keep");
32    var needToggle = jQuery("input[name^=hd_]").not(checkbox).parents('tr');
33
34    if (jQuery(checkbox).is(':checked')) {
35      needToggle.show();
36      toggleResizeFields("hd");
37    }
38    else {
39      needToggle.hide();
40    }
41  }
42
43  toggleHdFields();
44  jQuery("#hd_keep").click(function () {toggleHdFields()});
45});
46{/literal}{/footer_script}
47
48<div class="titrePage">
49  <h2>{'Upload Photos'|@translate}</h2>
50</div>
51
52<div id="photosAddContent">
53
54<form id="uploadFormSettings" enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties">
55
56  <fieldset>
57    <legend>{'Web size photo'|@translate}</legend>
58
59    <table>
60      <tr>
61        <th><label for="websize_resize">{'Resize'|@translate}</label></th>
62        <td><input type="checkbox" name="websize_resize" id="websize_resize" {$values.websize_resize}></td>
63      </tr>
64      <tr>
65        <th>{'Maximum Width'|@translate}</th>
66        <td><input type="text" name="websize_maxwidth" value="{$values.websize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
67      </tr>
68      <tr>
69        <th>{'Maximum Height'|@translate}</th>
70        <td><input type="text" name="websize_maxheight" value="{$values.websize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
71      </tr>
72      <tr>
73        <th>{'Image Quality'|@translate}</th>
74        <td><input type="text" name="websize_quality" value="{$values.websize_quality}" size="3" maxlength="3"> %</td>
75      </tr>
76    </table>
77  </fieldset>
78
79  <fieldset>
80    <legend>{'Thumbnail'|@translate}</legend>
81
82    <table>
83      <tr>
84        <th>{'Maximum Width'|@translate}</th>
85        <td><input type="text" name="thumb_maxwidth" value="{$values.thumb_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
86      </tr>
87      <tr>
88        <th>{'Maximum Height'|@translate}</th>
89        <td><input type="text" name="thumb_maxheight" value="{$values.thumb_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
90      </tr>
91      <tr>
92        <th>{'Image Quality'|@translate}</th>
93        <td><input type="text" name="thumb_quality" value="{$values.thumb_quality}" size="3" maxlength="3"> %</td>
94      </tr>
95    </table>
96  </fieldset>
97
98{if $MANAGE_HD}
99  <fieldset>
100    <legend>{'High definition'|@translate}</legend>
101
102    <table>
103      <tr>
104        <th><label for="hd_keep">{'Keep high definition'|@translate}</label></th>
105        <td><input type="checkbox" name="hd_keep" id="hd_keep" {$values.hd_keep}></td>
106      </tr>
107      <tr>
108        <th><label for="hd_resize">{'Resize'|@translate}</label></th>
109        <td><input type="checkbox" name="hd_resize" id="hd_resize" {$values.hd_resize}></td>
110      </tr>
111      <tr>
112        <th>{'Maximum Width'|@translate}</th>
113        <td><input type="text" name="hd_maxwidth" value="{$values.hd_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
114      </tr>
115      <tr>
116        <th>{'Maximum Height'|@translate}</th>
117        <td><input type="text" name="hd_maxheight" value="{$values.hd_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
118      </tr>
119      <tr>
120        <th>{'Image Quality'|@translate}</th>
121        <td><input type="text" name="hd_quality" value="{$values.hd_quality}" size="3" maxlength="3"> %</td>
122      </tr>
123    </table>
124  </fieldset>
125{/if}
126
127  <p>
128    <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}"/>
129  </p>
130
131</form>
132
133</div> <!-- photosAddContent -->
Note: See TracBrowser for help on using the repository browser.