diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-04-19 20:49:43 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-04-19 20:49:43 +0000 |
commit | dd1f034df2bb54a7e40c78d666c607acc1820c0b (patch) | |
tree | f8b5203ed6c5677416f35621852fff7d0e85e32a /admin | |
parent | b4e0a9a0a94993025390e588f6735b1b385d5491 (diff) |
added a button to restore multiple size default sizes ...
git-svn-id: http://piwigo.org/svn/trunk@14228 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/configuration.php | 6 | ||||
-rw-r--r-- | admin/themes/default/template/configuration.tpl | 20 |
2 files changed, 16 insertions, 10 deletions
diff --git a/admin/configuration.php b/admin/configuration.php index 4258c3437..c89203d4f 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -248,6 +248,12 @@ WHERE param = \''.$row['param'].'\' //------------------------------------------------------ $conf reinitialization load_conf_from_db(); } +elseif (isset($_POST['restore_settings'])) +{ + ImageStdParams::set_and_save( ImageStdParams::get_default_sizes() ); + pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param = \'disabled_derivatives\''); + clear_derivative_cache(); +} //----------------------------------------------------- template initialization $template->set_filename('config', 'configuration.tpl'); diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index d6f0b0064..94f9b4529 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -30,9 +30,7 @@ jQuery(document).ready(function(){ }); {/literal}{/footer_script} -<div class="titrePage"> - <h2>{'Piwigo configuration'|@translate} {$TABSHEET_TITLE}</h2> -</div> +<h2>{'Piwigo configuration'|@translate} {$TABSHEET_TITLE}</h2> {if !isset($default)} <form method="post" action="{$F_ACTION}" class="properties"> @@ -314,13 +312,13 @@ jQuery(document).ready(function(){ jQuery("#showDetails").click(function() { jQuery(".sizeDetails").show(); jQuery(this).css("visibility", "hidden"); + return false; }); }); {/literal}{/footer_script} -{html_head}{literal} -<style type="text/css"> +{html_style}{literal} input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;} .dErrorDesc {background-color:red; color:white; padding:0 5px;border-radius:10px; font-weight:bold;cursor:help;} .sizeEnable {width:50px;} @@ -330,8 +328,7 @@ input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;} .showDetails {padding:0;} .sizeDetails {display:none;margin-left:10px;} .sizeEditOpen {margin-left:10px;} -</style> -{/literal}{/html_head} +{/literal}{/html_style} <fieldset id="sizesConf"> <legend>{'Original Size'|@translate}</legend> @@ -643,9 +640,12 @@ input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;} {/if} {if !isset($default)} - <p class="formButtons"> - <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}"> - </p> + <p class="formButtons"> + <input type="submit" name="submit" value="{'Save Settings'|@translate}"> +{if isset($sizes)} + <input type="submit" name="restore_settings" value="{'Restore'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"> +{/if} + </p> </form> {/if} |