diff --git a/VERSION b/VERSION index c0c4025..fb6e94b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.5.0 +v3.4.3 diff --git a/adapters/OctopushVirtualNumberAdapter.php b/adapters/OctopushVirtualNumberAdapter.php index 0096f72..5e27c5f 100644 --- a/adapters/OctopushVirtualNumberAdapter.php +++ b/adapters/OctopushVirtualNumberAdapter.php @@ -154,7 +154,7 @@ class OctopushVirtualNumberAdapter implements AdapterInterface 'title' => 'Numéro de téléphone virtuel', 'description' => 'Numéro de téléphone virtuel Octopush à utiliser.', 'required' => true, - 'type' => 'phone_number', + 'number' => true, ], [ 'name' => 'sms_type', diff --git a/adapters/OvhSmsShortcodeAdapter.php b/adapters/OvhSmsShortcodeAdapter.php index 91a28a3..a753f00 100644 --- a/adapters/OvhSmsShortcodeAdapter.php +++ b/adapters/OvhSmsShortcodeAdapter.php @@ -144,13 +144,6 @@ namespace adapters; 'description' => 'Paramètre "Consumer Key" obtenu lors de la génération de la clef API OVH.', 'required' => true, ], - [ - 'name' => 'no_stop_clause', - 'title' => 'Désactiver la clause "STOP SMS" automatique', - 'description' => 'En cochant ce paramètre, la clause "STOP SMS" ne sera pas ajoutée automatiquement au SMS par OVH.', - 'required' => false, - 'type' => 'boolean' - ], ]; } @@ -229,7 +222,6 @@ namespace adapters; 'message' => $text, 'receivers' => [$destination], 'senderForResponse' => true, - 'noStopClause' => (bool) ($this->data['no_stop_clause'] ?? false), ]; if ($this->data['sender']) @@ -333,7 +325,7 @@ namespace adapters; { $success = true; - if ($this->data['sender'] && (mb_strlen($this->data['sender']) < 3 || mb_strlen($this->data['sender']) > 11)) + if ($this->data['sender'] && (mb_strlen($this->data['sender']) < 3 || mb_strlen($this->data['sender'] > 11))) { return false; } @@ -342,7 +334,6 @@ namespace adapters; $endpoint = '/sms/' . $this->data['service_name']; $response = $this->api->get($endpoint); - return $success && (bool) $response; } catch (\Throwable $t) diff --git a/adapters/OvhSmsVirtualNumberAdapter.php b/adapters/OvhSmsVirtualNumberAdapter.php index b1078f9..2d27335 100644 --- a/adapters/OvhSmsVirtualNumberAdapter.php +++ b/adapters/OvhSmsVirtualNumberAdapter.php @@ -135,7 +135,7 @@ namespace adapters; 'title' => 'Numéro', 'description' => 'Numéro de téléphone virtuel chez OVH.', 'required' => true, - 'type' => 'phone_number', + 'number' => true, ], [ 'name' => 'app_key', diff --git a/adapters/TwilioVirtualNumberAdapter.php b/adapters/TwilioVirtualNumberAdapter.php index 5ad0cc9..9d628f4 100644 --- a/adapters/TwilioVirtualNumberAdapter.php +++ b/adapters/TwilioVirtualNumberAdapter.php @@ -140,7 +140,7 @@ class TwilioVirtualNumberAdapter implements AdapterInterface 'title' => 'Numéro de téléphone virtuel', 'description' => 'Numéro de téléphone virtuel Twilio à utiliser parmis les numéro actifs (format international), voir la liste ici.', 'required' => true, - 'type' => 'phone_number', + 'number' => true, ], [ 'name' => 'status_change_callback', diff --git a/assets/css/style.css b/assets/css/style.css index ea2f87d..b518b32 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -484,54 +484,6 @@ footer img padding-left: 15px; } -#adapter-data-fields input[type="checkbox"] -{ - display: block; - width: auto; -} - -#adapter-data-fields input[type=checkbox]{ - height: 0; - width: 0; - visibility: hidden; -} - -#adapter-data-fields .switch { - cursor: pointer; - text-indent: -9999px; - width: 44px; - height: 24px; - background: #aaa; - display: block; - border-radius: 100px; - position: relative; -} - -#adapter-data-fields .switch:after { - content: ''; - position: absolute; - top: 2px; - left: 2px; - width: 20px; - height: 20px; - background: #fff; - border-radius: 20px; - transition: 0.3s; -} - -#adapter-data-fields input:checked + .switch { - background: #5cb85c; -} - -#adapter-data-fields input:checked + .switch:after { - left: calc(100% - 2px); - transform: translateX(-100%); -} - -#adapter-data-fields .switch:active:after { - width: 30px; -} - /* DATATABLES */ .dataTables_paginate { diff --git a/controllers/publics/Phone.php b/controllers/publics/Phone.php index 14028ea..52ba392 100644 --- a/controllers/publics/Phone.php +++ b/controllers/publics/Phone.php @@ -211,7 +211,7 @@ class Phone extends \descartes\Controller //If field phone number is invalid foreach ($find_adapter['meta_data_fields'] as $field) { - if ('phone_number' !== ($field['type'] ?? false)) + if (false === ($field['number'] ?? false)) { continue; } diff --git a/daemons/Phone.php b/daemons/Phone.php index ed1a2c7..4f67a4e 100644 --- a/daemons/Phone.php +++ b/daemons/Phone.php @@ -58,7 +58,7 @@ class Phone extends AbstractDaemon { usleep(0.5 * 1000000); //Micro sleep for perfs - $this->read_tick += 1; + ++$this->read_tick; $this->bdd = \descartes\Model::_connect(DATABASE_HOST, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD); diff --git a/templates/phone/add.php b/templates/phone/add.php index f1e08c3..4ae484f 100644 --- a/templates/phone/add.php +++ b/templates/phone/add.php @@ -105,7 +105,17 @@ var html = ''; jQuery.each(data_fields, function (index, field) { - if (field.type == 'phone_number') + if (!field.number) + { + html += '
' + field.description + '
' + + '' + field.description + '
' + - '' + field.description + '
' + - '