Changeset 14251


Ignore:
Timestamp:
Apr 21, 2012, 12:56:51 PM (13 years ago)
Author:
plg
Message:

feature 2606: (multiple size config screen redesign) turn the "restore" button
in a "reset to default values" link in the "Multiple size" fieldset.

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r14228 r14251  
    249249  load_conf_from_db();
    250250}
    251 elseif (isset($_POST['restore_settings']))
     251
     252// restore default derivatives settings
     253if ('sizes' == $page['section'] and isset($_GET['action']) and 'restore_settings' == $_GET['action'])
    252254{
    253255  ImageStdParams::set_and_save( ImageStdParams::get_default_sizes() );
    254256  pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param = \'disabled_derivatives\'');
    255257  clear_derivative_cache();
     258
     259  array_push(
     260    $page['infos'],
     261    l10n('Your configuration settings are saved')
     262    );
    256263}
    257264
  • trunk/admin/themes/default/template/configuration.tpl

    r14228 r14251  
    440440</table>
    441441
    442 <p style="margin:20px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
     442<p style="margin:10px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
    443443  {'Image Quality'|@translate}
    444444  <input type="text" name="resize_quality" value="{$resize_quality}" size="3" maxlength="3"{if isset($ferrors.resize_quality)} class="dError"{/if}> %
    445445  {if isset($ferrors.resize_quality)}<span class="dErrorDesc" title="{$ferrors.resize_quality}">!</span>{/if}
    446446</p>
     447<p style="margin:10px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
     448  <a href="{$F_ACTION}&action=restore_settings" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'Reset to default values'|@translate}</a>
     449</p>
    447450</fieldset>
    448451{/if}
     
    643646        <p class="formButtons">
    644647                <input type="submit" name="submit" value="{'Save Settings'|@translate}">
    645 {if isset($sizes)}
    646                 <input type="submit" name="restore_settings" value="{'Restore'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">
    647 {/if}
    648648        </p>
    649649</form>
Note: See TracChangeset for help on using the changeset viewer.