Skip to content
Permalink
Browse files

issue #1019 do not display album selection if coming from a "add phot…

…os to album" link
  • Loading branch information...
plegall committed May 28, 2019
1 parent 242b734 commit b150774bc9fb2c7ffd17f6f8312552d46ad02c01
@@ -29,6 +29,7 @@
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 @@
// test if album really exists
$query = '
SELECT id
SELECT id, uppercats
FROM '.CATEGORIES_TABLE.'
WHERE id = '.$_GET['album'].'
;';
@@ -117,6 +118,9 @@
// 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}"

0 comments on commit b150774

Please sign in to comment.
You can’t perform that action at this time.