[12829] | 1 | <h2>{'Multiple Size'|@translate}</h2> |
---|
[12820] | 2 | |
---|
| 3 | {html_head}{literal} |
---|
| 4 | <style type="text/css"> |
---|
| 5 | #derviativesForm .dError { |
---|
| 6 | background-color: red; |
---|
| 7 | color: yellow; |
---|
| 8 | } |
---|
| 9 | |
---|
| 10 | #derviativesForm .dErrorDesc { |
---|
| 11 | } |
---|
| 12 | |
---|
| 13 | #derviativesForm TABLE THEAD { |
---|
| 14 | height: 3em; |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | #derviativesForm TABLE INPUT[type="text"] { |
---|
| 18 | border: 0; |
---|
| 19 | width: 5em; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | </style> |
---|
| 23 | {/literal}{/html_head} |
---|
| 24 | |
---|
| 25 | <form method="post" id="derviativesForm"> |
---|
[12851] | 26 | <fieldset> |
---|
| 27 | <legend>{'Watermark'|@translate}</legend> |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | <select name="w[file]" id="wSelect"> |
---|
| 31 | {html_options options=$watermark_files selected=$watermark.file} |
---|
| 32 | </select> |
---|
| 33 | |
---|
| 34 | <p><img id="wImg"></img></p> |
---|
| 35 | |
---|
| 36 | <label>{'Min Width'|@translate} |
---|
| 37 | <input type="text" name="w[minw]" value="{$watermark.minw}"{if isset($ferrors.watermark.minw)}class="dError"{/if}> |
---|
| 38 | </label> |
---|
| 39 | |
---|
| 40 | <label>{'Min Height'|@translate} |
---|
| 41 | <input type="text" name="w[minh]" value="{$watermark.minh}"{if isset($ferrors.watermark.minh)}class="dError"{/if}> |
---|
| 42 | </label> |
---|
| 43 | |
---|
| 44 | <label>{'X Position'|@translate} |
---|
| 45 | <input type="text" name="w[xpos]" value="{$watermark.xpos}"{if isset($ferrors.watermark.xpos)}class="dError"{/if}> |
---|
| 46 | %</label> |
---|
| 47 | |
---|
| 48 | <label>{'Y Position'|@translate} |
---|
| 49 | <input type="text" name="w[ypos]" value="{$watermark.ypos}"{if isset($ferrors.watermark.ypos)}class="dError"{/if}> |
---|
| 50 | %</label> |
---|
| 51 | |
---|
| 52 | <label>{'X Repeat'|@translate} |
---|
| 53 | <input type="text" name="w[xrepeat]" value="{$watermark.xrepeat}"{if isset($ferrors.watermark.xrepeat)}class="dError"{/if}> |
---|
| 54 | </label> |
---|
| 55 | |
---|
| 56 | <label>{'Opacity'|@translate} |
---|
| 57 | <input type="text" name="w[opacity]" value="{$watermark.opacity}"{if isset($ferrors.watermark.opacity)}class="dError"{/if}> |
---|
| 58 | </label> |
---|
| 59 | |
---|
| 60 | </fieldset> |
---|
| 61 | |
---|
[12820] | 62 | <table class="table2"> |
---|
| 63 | <thead> |
---|
| 64 | <tr> |
---|
| 65 | <td></td> |
---|
| 66 | <td>Enabled</td> |
---|
| 67 | <td>{'Width'|@translate}</td> |
---|
| 68 | <td>{'Height'|@translate}</td> |
---|
| 69 | <td>{'Crop'|@translate} (%)</td> |
---|
| 70 | <td>{'Min Width'|@translate}</td> |
---|
| 71 | <td>{'Min Height'|@translate}</td> |
---|
[12851] | 72 | <td>{'Sharpen'|@translate} (%)</td> |
---|
| 73 | <td>{'Quality'|@translate} (%)</td> |
---|
[12820] | 74 | </tr> |
---|
| 75 | </thead> |
---|
| 76 | {foreach from=$derivatives item=d key=type} |
---|
| 77 | <tr> |
---|
| 78 | <td>{$type|@translate}</td> |
---|
| 79 | <td> |
---|
| 80 | {if $d.must_enable} |
---|
| 81 | x |
---|
| 82 | {else} |
---|
| 83 | <input type="checkbox" name="d[{$type}][enabled]" {if $d.enabled}checked="checked"{/if}> |
---|
| 84 | {/if} |
---|
| 85 | </td> |
---|
| 86 | <td> |
---|
| 87 | <input type="text" name="d[{$type}][w]" value="{$d.w}"{if isset($ferrors.$type.w)}class="dError"{/if}> |
---|
| 88 | {if isset($ferrors.$type.w)}<span class="dErrorDesc" title="{$ferrors.$type.w}">!</span>{/if} |
---|
| 89 | </td> |
---|
| 90 | <td>{if !$d.must_square} |
---|
| 91 | <input type="text" name="d[{$type}][h]" value="{$d.h}"{if isset($ferrors.$type.h)}class="dError"{/if}> |
---|
| 92 | {if isset($ferrors.$type.h)}<span class="dErrorDesc" title="{$ferrors.$type.h}">!</span>{/if} |
---|
| 93 | {/if}</td> |
---|
| 94 | <td>{if !$d.must_square} |
---|
| 95 | <input type="text" name="d[{$type}][crop]" value="{$d.crop}"{if isset($ferrors.$type.crop)}class="dError"{/if}> |
---|
| 96 | {if isset($ferrors.$type.crop)}<span class="dErrorDesc" title="{$ferrors.$type.crop}">!</span>{/if} |
---|
| 97 | {/if}</td> |
---|
| 98 | <td>{if !$d.must_square} |
---|
| 99 | <input type="text" name="d[{$type}][minw]" value="{$d.minw}"{if isset($ferrors.$type.minw)}class="dError"{/if}> |
---|
| 100 | {if isset($ferrors.$type.minw)}<span class="dErrorDesc" title="{$ferrors.$type.minw}">!</span>{/if} |
---|
| 101 | {/if}</td> |
---|
| 102 | <td>{if !$d.must_square} |
---|
| 103 | <input type="text" name="d[{$type}][minh]" value="{$d.minh}"{if isset($ferrors.$type.minh)}class="dError"{/if}> |
---|
| 104 | {if isset($ferrors.$type.minh)}<span class="dErrorDesc" title="{$ferrors.$type.minh}">!</span>{/if} |
---|
| 105 | {/if}</td> |
---|
[12851] | 106 | <td> |
---|
| 107 | <input type="text" name="d[{$type}][sharpen]" value="{$d.sharpen}"{if isset($ferrors.$type.sharpen)}class="dError"{/if}> |
---|
| 108 | {if isset($ferrors.$type.sharpen)}<span class="dErrorDesc" title="{$ferrors.$type.sharpen}">!</span>{/if} |
---|
| 109 | </td> |
---|
| 110 | <td> |
---|
| 111 | <input type="text" name="d[{$type}][quality]" value="{$d.quality}"{if isset($ferrors.$type.quality)}class="dError"{/if}> |
---|
| 112 | {if isset($ferrors.$type.quality)}<span class="dErrorDesc" title="{$ferrors.$type.quality}">!</span>{/if} |
---|
| 113 | </td> |
---|
[12820] | 114 | </tr> |
---|
| 115 | {/foreach} |
---|
| 116 | </table> |
---|
| 117 | <p><input type="submit" value="{'Submit'|@translate}"></p> |
---|
| 118 | </form> |
---|
| 119 | |
---|
| 120 | {footer_script}{literal} |
---|
| 121 | jQuery(".dError").bind("focus", function () { |
---|
| 122 | jQuery(this).removeClass("dError"); |
---|
| 123 | } ); |
---|
[12851] | 124 | |
---|
| 125 | function onWatermarkChange() |
---|
| 126 | { |
---|
| 127 | var val = jQuery("#wSelect").val(); |
---|
| 128 | if (val.length) { |
---|
| 129 | jQuery("#wImg").attr('src', {/literal}'{$ROOT_URL}'{literal}+val).show(); |
---|
| 130 | } |
---|
| 131 | else { |
---|
| 132 | jQuery("#wImg").hide(); |
---|
| 133 | } |
---|
| 134 | } |
---|
| 135 | |
---|
| 136 | onWatermarkChange(); |
---|
| 137 | jQuery("#wSelect").bind("change", onWatermarkChange ); |
---|
[12820] | 138 | {/literal}{/footer_script} |
---|