From 0490009705dcef00c7b775e0287a707e0defc15f Mon Sep 17 00:00:00 2001 From: flop25 Date: Thu, 11 Apr 2013 13:18:46 +0000 Subject: bug:2863 display a message on the upload page if "Resized after upload" is checked git-svn-id: http://piwigo.org/svn/trunk@22135 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/photos_add_direct_prepare.inc.php | 13 ++++++++++++- admin/themes/default/template/photos_add_direct.tpl | 4 ++++ admin/themes/default/theme.css | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'admin') diff --git a/admin/include/photos_add_direct_prepare.inc.php b/admin/include/photos_add_direct_prepare.inc.php index f9443553d..9c4ede9f3 100644 --- a/admin/include/photos_add_direct_prepare.inc.php +++ b/admin/include/photos_add_direct_prepare.inc.php @@ -105,6 +105,18 @@ if (pwg_image::get_library() == 'gd') } } +//warn the user if the picture will be resized after upload +if ($conf['original_resize']) +{ + $template->assign( + array( + 'original_resize_maxwidth' => $conf['original_resize_maxwidth'], + 'original_resize_maxheight' => $conf['original_resize_maxheight'], + ) + ); +} + + $upload_modes = array('html', 'multiple'); $upload_mode = isset($conf['upload_mode']) ? $conf['upload_mode'] : 'multiple'; @@ -255,7 +267,6 @@ if (!isset($_SESSION['upload_hide_warnings'])) ) ); } - $template->assign( array( 'setup_warnings' => $setup_warnings, diff --git a/admin/themes/default/template/photos_add_direct.tpl b/admin/themes/default/template/photos_add_direct.tpl index 6794e0407..54186cd64 100644 --- a/admin/themes/default/template/photos_add_direct.tpl +++ b/admin/themes/default/template/photos_add_direct.tpl @@ -289,6 +289,8 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
{'Select files'|@translate} + + {if isset($original_resize_maxheight)}

{'The picture dimensions will be reduced to %dx%d pixels.'|@translate|@sprintf:$original_resize_maxwidth:$original_resize_maxheight}

{/if}

{$upload_max_filesize_shorthand}B. {$upload_file_types}. {if isset($max_upload_resolution)}{$max_upload_resolution}Mpx{/if} i

@@ -300,6 +302,8 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */ {/if}

+ + {if $upload_mode eq 'html'}
diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index dd4a63385..c4ad7923e 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -995,6 +995,7 @@ div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-co #uploadBoxes {margin-top:20px;} #addUploadBox {margin-bottom:2em;} +p.uploadInfo {text-align:left;font-size:90%;color:#999;} p#uploadWarningsSummary {text-align:left;margin-bottom:1em;font-size:90%;color:#999;} p#uploadWarningsSummary .showInfo {position:static;display:inline;padding:1px 6px;margin-left:3px;} p#uploadWarnings {display:none;text-align:left;margin-bottom:1em;font-size:90%;color:#999;} -- cgit v1.2.3