From d3c6983b359f08254cf090f97f0807038043db0f Mon Sep 17 00:00:00 2001 From: plegall Date: Sat, 21 Apr 2012 10:56:51 +0000 Subject: feature 2606: (multiple size config screen redesign) turn the "restore" button in a "reset to default values" link in the "Multiple size" fieldset. git-svn-id: http://piwigo.org/svn/trunk@14251 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/configuration.php | 9 ++++++++- admin/themes/default/template/configuration.tpl | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/admin/configuration.php b/admin/configuration.php index c89203d4f..0de99e40f 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -248,11 +248,18 @@ WHERE param = \''.$row['param'].'\' //------------------------------------------------------ $conf reinitialization load_conf_from_db(); } -elseif (isset($_POST['restore_settings'])) + +// restore default derivatives settings +if ('sizes' == $page['section'] and isset($_GET['action']) and 'restore_settings' == $_GET['action']) { ImageStdParams::set_and_save( ImageStdParams::get_default_sizes() ); pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param = \'disabled_derivatives\''); clear_derivative_cache(); + + array_push( + $page['infos'], + l10n('Your configuration settings are saved') + ); } //----------------------------------------------------- template initialization diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index 94f9b4529..631423d3a 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -439,11 +439,14 @@ input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;} {/foreach} -

+

{'Image Quality'|@translate} % {if isset($ferrors.resize_quality)}!{/if}

+

+ {'Reset to default values'|@translate} +

{/if} @@ -642,9 +645,6 @@ input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;} {if !isset($default)}

-{if isset($sizes)} - -{/if}

{/if} -- cgit v1.2.3