mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-09 23:05:04 +02:00
issue #1019 do not display album selection if coming from a "add photos to album" link
This commit is contained in:
@@ -29,6 +29,7 @@ $template->assign(
|
||||
array(
|
||||
'F_ADD_ACTION'=> PHOTOS_ADD_BASE_URL,
|
||||
'chunk_size' => $conf['upload_form_chunk_size'],
|
||||
'ADMIN_PAGE_TITLE' => l10n('Upload Photos'),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -106,7 +107,7 @@ if (isset($_GET['album']))
|
||||
|
||||
// test if album really exists
|
||||
$query = '
|
||||
SELECT id
|
||||
SELECT id, uppercats
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
WHERE id = '.$_GET['album'].'
|
||||
;';
|
||||
@@ -117,6 +118,9 @@ SELECT id
|
||||
|
||||
// lets put in the session to persist in case of upload method switch
|
||||
$_SESSION['selected_category'] = $selected_category;
|
||||
|
||||
$cat = pwg_db_fetch_assoc($result);
|
||||
$template->assign('ADD_TO_ALBUM', get_cat_display_name_cache($cat['uppercats'], null));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -257,10 +257,6 @@ jQuery(document).ready(function(){
|
||||
});
|
||||
{/footer_script}
|
||||
|
||||
<div class="titrePage">
|
||||
<h2>{'Upload Photos'|@translate} {$TABSHEET_TITLE}</h2>
|
||||
</div>
|
||||
|
||||
<div id="photosAddContent">
|
||||
<div class="addAlbumEmptyCenter">
|
||||
<div class="addAlbumEmpty"{if $NB_ALBUMS > 0} style="display:none;"{/if}>
|
||||
@@ -299,8 +295,8 @@ jQuery(document).ready(function(){
|
||||
<form id="uploadForm" enctype="multipart/form-data" method="post" action="{$form_action}"{if $NB_ALBUMS == 0} style="display:none;"{/if}>
|
||||
<fieldset class="selectAlbum">
|
||||
<legend>{'Drop into album'|@translate}</legend>
|
||||
<div class="selectedAlbum" style="display: none"><span class="icon-sitemap"></span></div>
|
||||
<div class="selectAlbumBlock">
|
||||
<div class="selectedAlbum"{if !isset($ADD_TO_ALBUM)} style="display: none"{/if}><span class="icon-sitemap">{$ADD_TO_ALBUM}</span></div>
|
||||
<div class="selectAlbumBlock"{if isset($ADD_TO_ALBUM)} style="display: none"{/if}>
|
||||
<a href="#" data-add-album="category" title="{'create a new album'|@translate}" class="icon-plus"></a>
|
||||
<span id="albumSelection">
|
||||
<select data-selectize="categories" data-value="{$selected_category|@json_encode|escape:html}"
|
||||
|
||||
Reference in New Issue
Block a user