aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template/photos_add_settings.tpl
blob: c8cc19b842312643fe52c60b64dac989f3966324 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{footer_script}{literal}
jQuery(document).ready(function(){
  function toggleResizeFields(prefix) {
    var checkbox = jQuery("#"+prefix+"_resize");
    var needToggle = jQuery("input[name^="+prefix+"_]").not(checkbox).not(jQuery("#hd_keep")).parents('tr');


    if (jQuery(checkbox).is(':checked')) {
      needToggle.show();

      if (prefix == "websize") {
        jQuery("#hd_keep").parents("fieldset").show();
      }
    }
    else {
      needToggle.hide();

      if (prefix == "websize") {
        jQuery("#hd_keep").parents("fieldset").hide();
      }
    }
  }

  toggleResizeFields("websize");
  jQuery("#websize_resize").click(function () {toggleResizeFields("websize")});

  toggleResizeFields("hd");
  jQuery("#hd_resize").click(function () {toggleResizeFields("hd")});

  function toggleHdFields() {
    var checkbox = jQuery("#hd_keep");
    var needToggle = jQuery("input[name^=hd_]").not(checkbox).parents('tr');

    if (jQuery(checkbox).is(':checked')) {
      needToggle.show();
      toggleResizeFields("hd");
    }
    else {
      needToggle.hide();
    }
  }

  toggleHdFields();
  jQuery("#hd_keep").click(function () {toggleHdFields()});
});
{/literal}{/footer_script}

<div class="titrePage">
  <h2>{'Upload Photos'|@translate}</h2>
</div>

<div id="photosAddContent">

<form id="uploadFormSettings" enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties">

  <fieldset>
    <legend>{'Web size photo'|@translate}</legend>

    <table>
      <tr>
        <th><label for="websize_resize">{'Resize'|@translate}</label></th>
        <td><input type="checkbox" name="websize_resize" id="websize_resize" {$values.websize_resize}></td>
      </tr>
      <tr>
        <th>{'Maximum Width'|@translate}</th>
        <td><input type="text" name="websize_maxwidth" value="{$values.websize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
      </tr>
      <tr>
        <th>{'Maximum Height'|@translate}</th>
        <td><input type="text" name="websize_maxheight" value="{$values.websize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
      </tr>
      <tr>
        <th>{'Image Quality'|@translate}</th>
        <td><input type="text" name="websize_quality" value="{$values.websize_quality}" size="3" maxlength="3"> %</td>
      </tr>
    </table>
  </fieldset>

  <fieldset>
    <legend>{'Thumbnail'|@translate}</legend>

    <table>
      <tr>
        <th>{'Maximum Width'|@translate}</th>
        <td><input type="text" name="thumb_maxwidth" value="{$values.thumb_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
      </tr>
      <tr>
        <th>{'Maximum Height'|@translate}</th>
        <td><input type="text" name="thumb_maxheight" value="{$values.thumb_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
      </tr>
      <tr>
        <th>{'Image Quality'|@translate}</th>
        <td><input type="text" name="thumb_quality" value="{$values.thumb_quality}" size="3" maxlength="3"> %</td>
      </tr>
    </table>
  </fieldset>

{if $MANAGE_HD}
  <fieldset>
    <legend>{'High definition'|@translate}</legend>

    <table>
      <tr>
        <th><label for="hd_keep">{'Keep high definition'|@translate}</label></th>
        <td><input type="checkbox" name="hd_keep" id="hd_keep" {$values.hd_keep}></td>
      </tr>
      <tr>
        <th><label for="hd_resize">{'Resize'|@translate}</label></th>
        <td><input type="checkbox" name="hd_resize" id="hd_resize" {$values.hd_resize}></td>
      </tr>
      <tr>
        <th>{'Maximum Width'|@translate}</th>
        <td><input type="text" name="hd_maxwidth" value="{$values.hd_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
      </tr>
      <tr>
        <th>{'Maximum Height'|@translate}</th>
        <td><input type="text" name="hd_maxheight" value="{$values.hd_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
      </tr>
      <tr>
        <th>{'Image Quality'|@translate}</th>
        <td><input type="text" name="hd_quality" value="{$values.hd_quality}" size="3" maxlength="3"> %</td>
      </tr>
    </table>
  </fieldset>
{/if}

  <p>
    <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}"/>
  </p>

</form>

</div> <!-- photosAddContent -->