mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
#13344 minor fix
This commit is contained in:
parent
776cfb7350
commit
ba1c013381
@ -202,21 +202,34 @@ ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function errordate() {
|
||||||
|
confirmDialog({
|
||||||
|
title: "<?php echo __('Error'); ?>",
|
||||||
|
message: "<?php echo __('Expiration date must be later than today.'); ?>",
|
||||||
|
hideCancelButton: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$('#button-next').on('click', function() {
|
$('#button-next').on('click', function() {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var date = $('#text-date-expiration').val();
|
var date = $('#text-date-expiration').val();
|
||||||
var time = date+' '+$('#text-time-expiration').val();
|
var time = date+' '+$('#text-time-expiration').val();
|
||||||
if (date !== '' || time !== '') {
|
if (date !== '' && $('#text-time-expiration').val() !== '') {
|
||||||
if (date < $('#hidden-today_date').val() || time < $('#hidden-today_date').val()+' '+$('#hidden-today_time').val()) {
|
if (date < $('#hidden-today_date').val() || time < $('#hidden-today_date').val()+' '+$('#hidden-today_time').val()) {
|
||||||
confirmDialog({
|
console.log("ENTRO AQUI");
|
||||||
title: "<?php echo __('Error'); ?>",
|
errordate();
|
||||||
message: "<?php echo __('Expiration date must be later than today.'); ?>",
|
|
||||||
hideCancelButton: true,
|
|
||||||
});
|
|
||||||
} else{
|
} else{
|
||||||
$('#form_token').submit();
|
$('#form_token').submit();
|
||||||
}
|
}
|
||||||
} else {
|
} else if (date !== '' && time === ' ') {
|
||||||
|
if (date < $('#hidden-today_date').val()) {
|
||||||
|
errordate();
|
||||||
|
} else{
|
||||||
|
$('#form_token').submit();
|
||||||
|
}
|
||||||
|
} else if (date === '' && time !== ' ') {
|
||||||
|
errordate();
|
||||||
|
}else {
|
||||||
$('#form_token').submit();
|
$('#form_token').submit();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user