diff --git a/controllers/publics/Api.php b/controllers/publics/Api.php index e7a1ffd..0e3cb63 100644 --- a/controllers/publics/Api.php +++ b/controllers/publics/Api.php @@ -182,7 +182,7 @@ namespace controllers\publics; * * @return : Id of scheduled created */ - public function post_scheduled() + public function post_scheduled () { $at = $_POST['at'] ?? false; $text = $_POST['text'] ?? false; @@ -193,6 +193,11 @@ namespace controllers\publics; $groups = $_POST['groups'] ?? []; $conditional_groups = $_POST['conditional_groups'] ?? []; + if (!$at) + { + $at = (new \DateTime())->format('Y-m-d H:i:s'); + } + if (!$at || !$text) { $return = self::DEFAULT_RETURN; diff --git a/templates/phone/list.php b/templates/phone/list.php index 03e29ab..f708ca1 100644 --- a/templates/phone/list.php +++ b/templates/phone/list.php @@ -42,6 +42,7 @@ + @@ -51,7 +52,8 @@ - + +
ID Nom Adaptateur Callbacks
s(\controllers\internals\Tool::phone_format($phone['name'])); ?>s($phone['id']); ?>s($phone['name']); ?> s($phone['adapter']); ?>
Reception d'un SMS :