aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/themes/default/template/photos_add_direct.tpl20
-rw-r--r--language/en_UK/admin.lang.php1
-rw-r--r--language/fr_FR/admin.lang.php7
3 files changed, 23 insertions, 5 deletions
diff --git a/admin/themes/default/template/photos_add_direct.tpl b/admin/themes/default/template/photos_add_direct.tpl
index 510556146..981868339 100644
--- a/admin/themes/default/template/photos_add_direct.tpl
+++ b/admin/themes/default/template/photos_add_direct.tpl
@@ -15,6 +15,11 @@ jQuery(document).ready(function(){
jQuery("#formErrors").hide();
jQuery("#formErrors li").hide();
+ if (jQuery("#albumSelect option:selected").length == 0) {
+ jQuery("#formErrors #noAlbum").show();
+ nbErrors++;
+ }
+
var nbFiles = 0;
if (jQuery("#uploadBoxes").size() == 1) {
jQuery("input[name^=image_upload]").each(function() {
@@ -96,7 +101,7 @@ jQuery(document).ready(function(){
fillCategoryListbox("albumSelect");
fillCategoryListbox("category_parent");
*/
-
+
jQuery(".addAlbumOpen").colorbox({inline:true, href:"#addAlbumForm"});
jQuery("#addAlbumForm form").submit(function(){
@@ -122,10 +127,19 @@ jQuery(document).ready(function(){
/* we refresh the album creation form, in case the user wants to create another album */
jQuery("#category_parent").find("option").remove();
+
+ jQuery("<option/>")
+ .attr("value", 0)
+ .text("------------")
+ .appendTo("#category_parent")
+ ;
+
fillCategoryListbox("category_parent", newAlbum);
jQuery("#addAlbumForm form input[name=category_name]").val('');
+ jQuery("#albumSelection").show();
+
return true;
},
error:function(XMLHttpRequest, textStatus, errorThrows) {
@@ -330,6 +344,7 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
<div id="formErrors" class="errors" style="display:none">
<ul>
+ <li id="noAlbum">{'Select an album'|@translate}</li>
<li id="noPhoto">{'Select at least one photo'|@translate}</li>
</ul>
<div class="hideButton" style="text-align:center"><a href="#" id="hideErrors">{'Hide'|@translate}</a></div>
@@ -358,10 +373,11 @@ var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */
<fieldset>
<legend>{'Drop into album'|@translate}</legend>
+ <span id="albumSelection"{if count($category_options) == 0} style="display:none"{/if}>
<select id="albumSelect" name="category">
{html_options options=$category_options selected=$category_options_selected}
</select>
- <br>{'... or '|@translate}<a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a>
+ <br>{'... or '|@translate}</span><a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a>
</fieldset>
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index 6ec38a602..fd05c61ec 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -858,4 +858,5 @@ $lang['No destination tag selected'] = 'No destination tag selected';
$lang['Tags <em>%s</em> merged into tag <em>%s</em>'] = 'Tags <em>%s</em> merged into tag <em>%s</em>';
$lang['Select at least two tags for merging'] = 'Select at least two tags for merging';
$lang['Learn more'] = 'Learn more';
+$lang['Select an album'] = 'Select an album';
?>
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index 709fbb399..d103887b6 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -149,9 +149,9 @@ $lang['Representative'] = "Représentant";
$lang['Represents'] = "Représente";
$lang['Save order'] = "Sauvegarder l'ordre";
$lang['Save to permalink history'] = "Sauvegarder dans l'historique des liens permanents";
-$lang['Select at least one album'] = 'Sélectionner au moins un album';
-$lang['Select at least one photo'] = "Sélectionner au moins une photo";
-$lang['Select at least one user'] = "Sélectionner au moins un utilisateur";
+$lang['Select at least one album'] = 'Sélectionnez au moins un album';
+$lang['Select at least one photo'] = "Sélectionnez au moins une photo";
+$lang['Select at least one user'] = "Sélectionnez au moins un utilisateur";
$lang['Show info'] = "Montrer les informations";
$lang['Site manager'] = "Gestionnaire des sites";
$lang['Status'] = "Statut";
@@ -869,4 +869,5 @@ $lang['Select at least two tags for merging'] = 'Sélectionnez au moins deux tag
$lang['Average rate'] = 'Note moyenne';
$lang['Rate'] = 'Note';
$lang['Learn more'] = 'En savoir plus';
+$lang['Select an album'] = 'Selectionnez un album';
?> \ No newline at end of file