Ignore:
Timestamp:
Apr 19, 2012, 4:43:30 PM (12 years ago)
Author:
plg
Message:

feature 2606: second step on multiple size configuration screen redesign.

Configuration settings are saved on form submission.

The old screen is still available for tests.

Default resize quality set to 95 instead of 85.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/configuration.tpl

    r13883 r14221  
    320320{/literal}{/footer_script}
    321321
    322 {literal}
    323 <style>
     322{html_head}{literal}
     323<style type="text/css">
     324input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;}
     325.dErrorDesc {background-color:red; color:white; padding:0 5px;border-radius:10px; font-weight:bold;cursor:help;}
    324326.sizeEnable {width:50px;}
    325327.sizeEditForm {margin:0 0 10px 20px;}
     
    330332.sizeEditOpen {margin-left:10px;}
    331333</style>
    332 {/literal}
     334{/literal}{/html_head}
    333335
    334336<fieldset id="sizesConf">
     
    345347    <tr>
    346348      <th>{'Maximum Width'|@translate}</th>
    347       <td><input type="text" name="original_resize_maxwidth" value="{$sizes.original_resize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
     349      <td>
     350        <input type="text" name="original_resize_maxwidth" value="{$sizes.original_resize_maxwidth}" size="4" maxlength="4"{if isset($ferrors.original_resize_maxwidth)} class="dError"{/if}> {'pixels'|@translate}
     351        {if isset($ferrors.original_resize_maxwidth)}<span class="dErrorDesc" title="{$ferrors.original_resize_maxwidth}">!</span>{/if}
     352      </td>
    348353    </tr>
    349354    <tr>
    350355      <th>{'Maximum Height'|@translate}</th>
    351       <td><input type="text" name="original_resize_maxheight" value="{$sizes.original_resize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
     356      <td>
     357        <input type="text" name="original_resize_maxheight" value="{$sizes.original_resize_maxheight}" size="4" maxlength="4"{if isset($ferrors.original_resize_maxheight)} class="dError"{/if}> {'pixels'|@translate}
     358        {if isset($ferrors.original_resize_maxheight)}<span class="dErrorDesc" title="{$ferrors.original_resize_maxheight}">!</span>{/if}
     359      </td>
    352360    </tr>
    353361    <tr>
    354362      <th>{'Image Quality'|@translate}</th>
    355       <td><input type="text" name="original_resize_quality" value="{$sizes.original_resize_quality}" size="3" maxlength="3"> %</td>
     363      <td>
     364        <input type="text" name="original_resize_quality" value="{$sizes.original_resize_quality}" size="3" maxlength="3"{if isset($ferrors.original_resize_quality)} class="dError"{/if}> %
     365        {if isset($ferrors.original_resize_quality)}<span class="dErrorDesc" title="{$ferrors.original_resize_quality}">!</span>{/if}
     366      </td>
    356367    </tr>
    357368  </table>
     
    359370</fieldset>
    360371
    361 <div class="warnings">Warning: the following fields are for test "user interface" test only. Any change won't be saved.<br>See screen [Administration > Configuration > Multiple Size] to configure sizes.</div>
    362 
    363372<fieldset id="multiSizesConf">
    364373  <legend>{'Multiple Size'|@translate}</legend>
    365374
    366375<div class="showDetails">
    367   <a href="#" id="showDetails"{if $show_details} style="display:none"{/if}>{'show details'|@translate}</a>
     376  <a href="#" id="showDetails"{if $show_details or isset($ferrors)} style="display:none"{/if}>{'show details'|@translate}</a>
    368377</div>
    369378
     
    385394
    386395    <td>
    387       <span class="sizeDetails">{$d.w} x {$d.h} {'pixels'|@translate}{if $d.crop}, {'Crop'|@translate|lower}{/if}</span>
     396      <span class="sizeDetails"{if isset($ferrors)} style="display:inline"{/if}>{$d.w} x {$d.h} {'pixels'|@translate}{if $d.crop}, {'Crop'|@translate|lower}{/if}</span>
    388397    </td>
    389398
    390399    <td>
    391       <span class="sizeDetails">
     400      <span class="sizeDetails"{if isset($ferrors) and !isset($ferrors.$type)} style="display:inline"{/if}>
    392401        <a href="#" id="sizeEditOpen-{$type}" class="sizeEditOpen">{'edit'|@translate}</a>
    393402      </span>
     
    395404  </tr>
    396405
    397   <tr id="sizeEdit-{$type}" class="sizeEdit">
     406  <tr id="sizeEdit-{$type}" class="sizeEdit" {if isset($ferrors.$type)} style="display:block"{/if}>
    398407    <td colspan="3">
    399408      <table class="sizeEditForm">
     
    412421          <td class="sizeEditWidth">{if $d.must_square or $d.crop}{'Width'|@translate}{else}{'Maximum Width'|@translate}{/if}</td>
    413422          <td>
    414             <input type="text" name="d[{$type}][w]" maxlength="4" size="4" value="{$d.w}"{if isset($ferrors.$type.w)}class="dError"{/if}>
     423            <input type="text" name="d[{$type}][w]" maxlength="4" size="4" value="{$d.w}"{if isset($ferrors.$type.w)} class="dError"{/if}>
    415424            {'pixels'|@translate}
    416425            {if isset($ferrors.$type.w)}<span class="dErrorDesc" title="{$ferrors.$type.w}">!</span>{/if}
     
    422431          <td class="sizeEditHeight">{if $d.crop}{'Height'|@translate}{else}{'Maximum Height'|@translate}{/if}</td>
    423432          <td>
    424             <input type="text" name="d[{$type}][h]" maxlength="4" size="4"  value="{$d.h}"{if isset($ferrors.$type.h)}class="dError"{/if}>
     433            <input type="text" name="d[{$type}][h]" maxlength="4" size="4"  value="{$d.h}"{if isset($ferrors.$type.h)} class="dError"{/if}>
    425434            {'pixels'|@translate}
    426435            {if isset($ferrors.$type.h)}<span class="dErrorDesc" title="{$ferrors.$type.h}">!</span>{/if}
     
    434443</table>
    435444
    436 <p style="margin:20px 0 0 0" class="sizeDetails">
     445<p style="margin:20px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
    437446  {'Image Quality'|@translate}
    438   <input type="text" name="original_resize_quality" value="{$sizes.original_resize_quality}" size="3" maxlength="3"> %
     447  <input type="text" name="resize_quality" value="{$resize_quality}" size="3" maxlength="3"{if isset($ferrors.resize_quality)} class="dError"{/if}> %
     448  {if isset($ferrors.resize_quality)}<span class="dErrorDesc" title="{$ferrors.resize_quality}">!</span>{/if}
    439449</p>
    440450</fieldset>
Note: See TracChangeset for help on using the changeset viewer.