Compare commits
No commits in common. "99349a35c5c3225fafeed932cafdf8cbc19d7372" and "9c9f99c87a342e05a11f413eb01a885a7662f927" have entirely different histories.
99349a35c5
...
9c9f99c87a
|
@ -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',
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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), <a href="https://www.twilio.com/console/phone-numbers/incoming" target="_blank">voir la liste ici</a>.',
|
||||
'required' => true,
|
||||
'type' => 'phone_number',
|
||||
'number' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'status_change_callback',
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -105,7 +105,17 @@
|
|||
var html = '';
|
||||
jQuery.each(data_fields, function (index, field)
|
||||
{
|
||||
if (field.type == 'phone_number')
|
||||
if (!field.number)
|
||||
{
|
||||
html += '<div class="form-group">' +
|
||||
'<label>' + field.title + '</label>' +
|
||||
'<p class="italic small help">' + field.description + '</p>' +
|
||||
'<div class="form-group">' +
|
||||
'<input name="adapter_data[' + field.name + ']" class="form-control" ' + (field.required ? 'required' : '') + ' ' + (field.default_value ? 'value="' + field.default_value + '"' : '') + '>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
var random_id = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
||||
html += '' +
|
||||
|
@ -123,27 +133,6 @@
|
|||
};
|
||||
|
||||
numbers.push(number);
|
||||
|
||||
}
|
||||
else if (field.type == 'boolean')
|
||||
{
|
||||
html += '<div class="form-group">' +
|
||||
'<label>' + field.title + '</label>' +
|
||||
'<p class="italic small help">' + field.description + '</p>' +
|
||||
'<div class="form-group">' +
|
||||
'<input type="checkbox" id="adapter_data[' + field.name + ']" name="adapter_data[' + field.name + ']" class="form-control" ' + (field.required ? 'required' : '') + ' ' + (field.default_value ? 'value="' + field.default_value + '" checked' : 'value="1"') + '><label class="switch" for="adapter_data[' + field.name + ']"></label>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
html += '<div class="form-group">' +
|
||||
'<label>' + field.title + '</label>' +
|
||||
'<p class="italic small help">' + field.description + '</p>' +
|
||||
'<div class="form-group">' +
|
||||
'<input name="adapter_data[' + field.name + ']" class="form-control" ' + (field.required ? 'required' : '') + ' ' + (field.default_value ? 'value="' + field.default_value + '"' : '') + '>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue