Check users in in invoices when modifying number of guests

This commit is contained in:
Phyks 2013-09-26 17:36:26 +02:00
parent 4d8b63e0c4
commit dbceafd606
2 changed files with 13 additions and 3 deletions

View File

@ -26,8 +26,13 @@ function set_days_month_year() {
} }
function guest_user_label(id) { function guest_user_label(id) {
if(document.getElementById('guest_user_'+id).value > 1) if(document.getElementById('guest_user_'+id).value > 1) {
document.getElementById('guest_user_'+id+'_label').innerHTML = ' guests'; document.getElementById('guest_user_'+id+'_label').innerHTML = ' guests';
if(!document.getElementById('users_in_'+id).checked) {
document.getElementById('users_in_'+id).checked = true;
}
}
else else
document.getElementById('guest_user_'+id+'_label').innerHTML = ' guest'; document.getElementById('guest_user_'+id+'_label').innerHTML = ' guest';
} }

View File

@ -26,8 +26,13 @@ function set_days_month_year() {
} }
function guest_user_label(id) { function guest_user_label(id) {
if(document.getElementById('guest_user_'+id).value > 1) if(document.getElementById('guest_user_'+id).value > 1) {
document.getElementById('guest_user_'+id+'_label').innerHTML = ' invités'; document.getElementById('guest_user_'+id+'_label').innerHTML = ' invités';
if(!document.getElementById('users_in_'+id).checked) {
document.getElementById('users_in_'+id).checked = true;
}
}
else else
document.getElementById('guest_user_'+id+'_label').innerHTML = ' invité'; document.getElementById('guest_user_'+id+'_label').innerHTML = ' invité';
} }