From bbacbe2817fe58c693b978b685eb6f46df4664b1 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 9 Apr 2010 14:04:51 +0000 Subject: bug 1555: UploadForm, before starting upload (html/multiple modes), check if the category is correctly set and if there is at least 1 photo selected. git-svn-id: http://piwigo.org/svn/trunk@5736 68402e56-0260-453c-a942-63ccdbb3a9ee --- .../themes/default/template/photos_add_direct.tpl | 90 ++++++++++++++++++---- 1 file changed, 73 insertions(+), 17 deletions(-) (limited to 'admin') diff --git a/admin/themes/default/template/photos_add_direct.tpl b/admin/themes/default/template/photos_add_direct.tpl index 987e626a9..d262fe3fa 100644 --- a/admin/themes/default/template/photos_add_direct.tpl +++ b/admin/themes/default/template/photos_add_direct.tpl @@ -1,21 +1,62 @@ {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} +{if $upload_mode eq 'multiple'} + + +{/if} + {literal} - -{/literal} + $("#hideErrors").click(function() { + $("#formErrors").hide(); + return false; + }); + +{/literal} {if $upload_mode eq 'html'} {literal} - -{/literal} + $("#uploadForm").submit(function() { + return checkUploadStart(); + }); +{/literal} {elseif $upload_mode eq 'multiple'} - - - {/if} +}); +

{'Upload Photos'|@translate}

@@ -101,6 +150,13 @@ jQuery(document).ready(function() { {/if} +
{if $upload_mode eq 'multiple'} @@ -179,7 +235,7 @@ jQuery(document).ready(function() {

- +

{/if} -- cgit v1.2.3