blob: 212d72db7df5148ee169613221e7ee00829c70f8 (
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
|
<h2>{'Derivatives'|@translate}</h2>
{html_head}{literal}
<style type="text/css">
#derviativesForm .dError {
background-color: red;
color: yellow;
}
#derviativesForm .dErrorDesc {
}
#derviativesForm TABLE THEAD {
height: 3em;
}
#derviativesForm TABLE INPUT[type="text"] {
border: 0;
width: 5em;
}
</style>
{/literal}{/html_head}
<form method="post" id="derviativesForm">
<table class="table2">
<thead>
<tr>
<td></td>
<td>Enabled</td>
<td>{'Width'|@translate}</td>
<td>{'Height'|@translate}</td>
<td>{'Crop'|@translate} (%)</td>
<td>{'Min Width'|@translate}</td>
<td>{'Min Height'|@translate}</td>
</tr>
</thead>
{foreach from=$derivatives item=d key=type}
<tr>
<td>{$type|@translate}</td>
<td>
{if $d.must_enable}
x
{else}
<input type="checkbox" name="d[{$type}][enabled]" {if $d.enabled}checked="checked"{/if}>
{/if}
</td>
<td>
<input type="text" name="d[{$type}][w]" value="{$d.w}"{if isset($ferrors.$type.w)}class="dError"{/if}>
{if isset($ferrors.$type.w)}<span class="dErrorDesc" title="{$ferrors.$type.w}">!</span>{/if}
</td>
<td>{if !$d.must_square}
<input type="text" name="d[{$type}][h]" value="{$d.h}"{if isset($ferrors.$type.h)}class="dError"{/if}>
{if isset($ferrors.$type.h)}<span class="dErrorDesc" title="{$ferrors.$type.h}">!</span>{/if}
{/if}</td>
<td>{if !$d.must_square}
<input type="text" name="d[{$type}][crop]" value="{$d.crop}"{if isset($ferrors.$type.crop)}class="dError"{/if}>
{if isset($ferrors.$type.crop)}<span class="dErrorDesc" title="{$ferrors.$type.crop}">!</span>{/if}
{/if}</td>
<td>{if !$d.must_square}
<input type="text" name="d[{$type}][minw]" value="{$d.minw}"{if isset($ferrors.$type.minw)}class="dError"{/if}>
{if isset($ferrors.$type.minw)}<span class="dErrorDesc" title="{$ferrors.$type.minw}">!</span>{/if}
{/if}</td>
<td>{if !$d.must_square}
<input type="text" name="d[{$type}][minh]" value="{$d.minh}"{if isset($ferrors.$type.minh)}class="dError"{/if}>
{if isset($ferrors.$type.minh)}<span class="dErrorDesc" title="{$ferrors.$type.minh}">!</span>{/if}
{/if}</td>
</tr>
{/foreach}
</table>
<p><input type="submit" value="{'Submit'|@translate}"></p>
</form>
{footer_script}{literal}
jQuery(".dError").bind("focus", function () {
jQuery(this).removeClass("dError");
} );
{/literal}{/footer_script}
|