bug 1642 fixed: if no category exists, prevent from selecting an existing
category (before form submission). git-svn-id: http://piwigo.org/svn/trunk@6057 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
322d345077
commit
1f01b7f912
1 changed files with 6 additions and 0 deletions
|
|
@ -49,6 +49,12 @@ jQuery(document).ready(function(){
|
|||
|
||||
}
|
||||
|
||||
if ($("select[name=category] option").length == 0) {
|
||||
$('input[name=category_type][value=existing]').attr('disabled', true);
|
||||
$('input[name=category_type]').attr('checked', false);
|
||||
$('input[name=category_type][value=new]').attr('checked', true);
|
||||
}
|
||||
|
||||
$("input[name=category_type]").click(function () {
|
||||
$("[id^=category_type_]").hide();
|
||||
$("#category_type_"+$(this).attr("value")).show();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue