source: extensions/upload_form/settings.tpl @ 5673

Last change on this file since 5673 was 4897, checked in by plg, 15 years ago

feature 1409 added: new tab "Settings".

Note: I would have like to use jQuery UI sliders for resize dimensions and
image quality BUT I can't even find the documentation of the very old version
of jQuery UI we use. I'll implement theses widget when integrating UploadForm
into trunk (with jQuery + jQuery UI updated).

File size: 2.4 KB
Line 
1{literal}
2<script>
3$(document).ready(function(){
4  function toggleResizeFields() {
5    var checkbox = $("#websize_resize");
6    var needToggle = $("input[name^=websize_]").not(checkbox).parents('tr');
7
8    if ($(checkbox).is(':checked')) {
9      needToggle.show();
10    }
11    else {
12      needToggle.hide();
13    }
14  }
15
16  toggleResizeFields();
17  $("#websize_resize").click(function () {toggleResizeFields()});
18});
19</script>
20{/literal}
21
22<div class="titrePage" style="height:25px">
23  <h2>{'Upload Form'|@translate}</h2>
24</div>
25
26<form id="uploadFormSettings" enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties">
27
28  <div class="formField">
29    <div class="formFieldTitle">{'Web size photo'|@translate}</div>
30
31    <table>
32      <tr>
33        <th><label for="websize_resize">{'Resize'|@translate}</label></th>
34        <td><input type="checkbox" name="websize_resize" id="websize_resize" {$values.websize_resize}></td>
35      </tr>
36      <tr>
37        <th>{'Maximum Width'|@translate}</th>
38        <td><input type="text" name="websize_maxwidth" value="{$values.websize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
39      </tr>
40      <tr>
41        <th>{'Maximum Height'|@translate}</th>
42        <td><input type="text" name="websize_maxheight" value="{$values.websize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
43      </tr>
44      <tr>
45        <th>{'Image Quality'|@translate}</th>
46        <td><input type="text" name="websize_quality" value="{$values.websize_quality}" size="3" maxlength="3"> %</td>
47      </tr>
48    </table>
49  </div>
50
51  <div class="formField">
52    <div class="formFieldTitle">{'Thumbnail'|@translate}</div>
53
54    <table>
55      <tr>
56        <th>{'Maximum Width'|@translate}</th>
57        <td><input type="text" name="thumb_maxwidth" value="{$values.thumb_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
58      </tr>
59      <tr>
60        <th>{'Maximum Height'|@translate}</th>
61        <td><input type="text" name="thumb_maxheight" value="{$values.thumb_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
62      </tr>
63      <tr>
64        <th>{'Image Quality'|@translate}</th>
65        <td><input type="text" name="thumb_quality" value="{$values.thumb_quality}" size="3" maxlength="3"> %</td>
66      </tr>
67    </table>
68  </div>
69
70  <p>
71    <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}"/>
72  </p>
73
74</form>
Note: See TracBrowser for help on using the repository browser.