mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
#13344 fix hour time and date time tokens
This commit is contained in:
parent
ab6199640b
commit
b942f8e66b
@ -132,7 +132,7 @@ $table->data[1][3] = html_print_input_text(
|
|||||||
50,
|
50,
|
||||||
255,
|
255,
|
||||||
true
|
true
|
||||||
);
|
).html_print_input_hidden('today_time', date('H:i:s'), true);
|
||||||
|
|
||||||
echo '<form class="max_floating_element_size" id="form_token" method="post" action="'.$url_list.'">';
|
echo '<form class="max_floating_element_size" id="form_token" method="post" action="'.$url_list.'">';
|
||||||
|
|
||||||
@ -205,8 +205,9 @@ ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript
|
|||||||
$('#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();
|
||||||
if (date !== '') {
|
var time = date+' '+$('#text-time-expiration').val();
|
||||||
if (date < $('#hidden-today_date').val()) {
|
if (date !== '' || time !== '') {
|
||||||
|
if (date < $('#hidden-today_date').val() || time < $('#hidden-today_date').val()+' '+$('#hidden-today_time').val()) {
|
||||||
confirmDialog({
|
confirmDialog({
|
||||||
title: "<?php echo __('Error'); ?>",
|
title: "<?php echo __('Error'); ?>",
|
||||||
message: "<?php echo __('Date expiration must be later than today.'); ?>",
|
message: "<?php echo __('Date expiration must be later than today.'); ?>",
|
||||||
|
@ -78,9 +78,9 @@ if ($create_token === true || $update_token === true) {
|
|||||||
$expirationTime = get_parameter('time-expiration', null);
|
$expirationTime = get_parameter('time-expiration', null);
|
||||||
$validity = null;
|
$validity = null;
|
||||||
|
|
||||||
if (empty($expirationDate) === false && $expirationDate >= date('Y-m-d')) {
|
if (empty($expirationDate) === false) {
|
||||||
$validity = $expirationDate;
|
$validity = $expirationDate;
|
||||||
if (empty($expirationTime) === false && $expirationTime > date('H:i:s')) {
|
if (empty($expirationTime) === false) {
|
||||||
$validity .= ' '.$expirationTime;
|
$validity .= ' '.$expirationTime;
|
||||||
} else {
|
} else {
|
||||||
$validity .= ' 23:59:59';
|
$validity .= ' 23:59:59';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user