aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2013-06-28 20:12:49 +0000
committerflop25 <flop25@piwigo.org>2013-06-28 20:12:49 +0000
commitbd9529fbf03be4d828abdfce0bb520c6b60cc6f7 (patch)
tree4e9657fb91966498ebbbb182f1b5c08329a67b5a /admin
parentcc8835bb1f1666491d3719b39fd19a97c623d142 (diff)
bug:2840
disable the "resize after upload" options if gd 1 lang key added git-svn-id: http://piwigo.org/svn/trunk@23643 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/configuration.php2
-rw-r--r--admin/themes/default/template/configuration.tpl14
2 files changed, 14 insertions, 2 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index f0267ea44..63bc29f3c 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -440,6 +440,8 @@ switch ($page['section'])
// when submitting the form and an error remains
if (!isset($page['sizes_loaded_in_tpl']))
{
+ $is_gd = (pwg_image::get_library()=='gd')? true : false;
+ $template->assign('is_gd', $is_gd);
$template->assign(
'sizes',
array(
diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl
index 6e51d53cf..ba1835d23 100644
--- a/admin/themes/default/template/configuration.tpl
+++ b/admin/themes/default/template/configuration.tpl
@@ -345,7 +345,17 @@ jQuery(document).ready(function(){
<fieldset id="sizesConf">
<legend>{'Original Size'|@translate}</legend>
-
+{if $is_gd}
+ <div>
+ <label>
+ {'Resize after upload disabled due to the use of GD as graphic library'|@translate}
+ <input type="checkbox" name="original_resize" id="original_resize" disabled="disabled" style="visibility: hidden">
+ <input type="hidden" name="original_resize_maxwidth" value="{$sizes.original_resize_maxwidth}">
+ <input type="hidden" name="original_resize_maxheight" value="{$sizes.original_resize_maxheight}">
+ <input type="hidden" name="original_resize_quality" value="{$sizes.original_resize_quality}">
+ </label>
+ </div>
+{else}
<div>
<label for="original_resize">
<input type="checkbox" name="original_resize" id="original_resize" {if ($sizes.original_resize)}checked="checked"{/if}>
@@ -376,7 +386,7 @@ jQuery(document).ready(function(){
</td>
</tr>
</table>
-
+{/if}
</fieldset>
<fieldset id="multiSizesConf">