Changeset 14228 for trunk/admin


Ignore:
Timestamp:
Apr 19, 2012, 10:49:43 PM (13 years ago)
Author:
rvelices
Message:

added a button to restore multiple size default sizes ...

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r14221 r14228  
    249249  load_conf_from_db();
    250250}
     251elseif (isset($_POST['restore_settings']))
     252{
     253  ImageStdParams::set_and_save( ImageStdParams::get_default_sizes() );
     254  pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param = \'disabled_derivatives\'');
     255  clear_derivative_cache();
     256}
    251257
    252258//----------------------------------------------------- template initialization
  • trunk/admin/themes/default/template/configuration.tpl

    r14221 r14228  
    3131{/literal}{/footer_script}
    3232
    33 <div class="titrePage">
    34   <h2>{'Piwigo configuration'|@translate} {$TABSHEET_TITLE}</h2>
    35 </div>
     33<h2>{'Piwigo configuration'|@translate} {$TABSHEET_TITLE}</h2>
    3634
    3735{if !isset($default)}
     
    315313    jQuery(".sizeDetails").show();
    316314    jQuery(this).css("visibility", "hidden");
     315                return false;
    317316  });
    318317
     
    320319{/literal}{/footer_script}
    321320
    322 {html_head}{literal}
    323 <style type="text/css">
     321{html_style}{literal}
    324322input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;}
    325323.dErrorDesc {background-color:red; color:white; padding:0 5px;border-radius:10px; font-weight:bold;cursor:help;}
     
    331329.sizeDetails {display:none;margin-left:10px;}
    332330.sizeEditOpen {margin-left:10px;}
    333 </style>
    334 {/literal}{/html_head}
     331{/literal}{/html_style}
    335332
    336333<fieldset id="sizesConf">
     
    644641
    645642{if !isset($default)}
    646   <p class="formButtons">
    647     <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}">
    648   </p>
     643        <p class="formButtons">
     644                <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}
     648        </p>
    649649</form>
    650650{/if}
Note: See TracChangeset for help on using the changeset viewer.