mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-10 10:38:46 +00:00
Ring Groups: Enhance Destination Enabled Switch
This commit is contained in:
@@ -368,14 +368,16 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_prompt";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; //confirm,announce
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_enabled";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "boolean";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false'];
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_prompt";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
|
||||
|
||||
@@ -883,6 +883,27 @@ $text['label-destination_timeout']['ru-ru'] = "Тайм-аут";
|
||||
$text['label-destination_timeout']['sv-se'] = "Tidsgräns";
|
||||
$text['label-destination_timeout']['uk-ua'] = "Таймаут";
|
||||
|
||||
$text['label-destination_enabled']['en-us'] = "Enabled";
|
||||
$text['label-destination_enabled']['en-gb'] = "Enabled";
|
||||
$text['label-destination_enabled']['ar-eg'] = "";
|
||||
$text['label-destination_enabled']['de-at'] = "Aktiviert"; //copied from de-de
|
||||
$text['label-destination_enabled']['de-ch'] = "Aktiviert"; //copied from de-de
|
||||
$text['label-destination_enabled']['de-de'] = "Aktiviert";
|
||||
$text['label-destination_enabled']['es-cl'] = "Activado";
|
||||
$text['label-destination_enabled']['es-mx'] = "Activado"; //copied from es-cl
|
||||
$text['label-destination_enabled']['fr-ca'] = "Activé"; //copied from fr-fr
|
||||
$text['label-destination_enabled']['fr-fr'] = "Activé";
|
||||
$text['label-destination_enabled']['he-il'] = "מופעל";
|
||||
$text['label-destination_enabled']['it-it'] = "Abilitato";
|
||||
$text['label-destination_enabled']['nl-nl'] = "Aan";
|
||||
$text['label-destination_enabled']['pl-pl'] = "Włączony";
|
||||
$text['label-destination_enabled']['pt-br'] = "Ativado";
|
||||
$text['label-destination_enabled']['pt-pt'] = "Habilitado";
|
||||
$text['label-destination_enabled']['ro-ro'] = "";
|
||||
$text['label-destination_enabled']['ru-ru'] = "Включено";
|
||||
$text['label-destination_enabled']['sv-se'] = "Aktiverad";
|
||||
$text['label-destination_enabled']['uk-ua'] = "Включено";
|
||||
|
||||
$text['label-destination_prompt_confirm']['en-us'] = "Confirm";
|
||||
$text['label-destination_prompt_confirm']['en-gb'] = "Confirm";
|
||||
$text['label-destination_prompt_confirm']['ar-eg'] = "";
|
||||
|
||||
@@ -377,8 +377,8 @@
|
||||
$array['ring_groups'][0]["ring_group_destinations"][$y]["destination_number"] = $row['destination_number'];
|
||||
$array['ring_groups'][0]["ring_group_destinations"][$y]["destination_delay"] = $row['destination_delay'];
|
||||
$array['ring_groups'][0]["ring_group_destinations"][$y]["destination_timeout"] = $row['destination_timeout'];
|
||||
$array['ring_groups'][0]["ring_group_destinations"][$y]["destination_prompt"] = $row['destination_prompt'];
|
||||
$array['ring_groups'][0]["ring_group_destinations"][$y]["destination_enabled"] = $row['destination_enabled'];
|
||||
$array['ring_groups'][0]["ring_group_destinations"][$y]["destination_prompt"] = $row['destination_prompt'];
|
||||
$array['ring_groups'][0]["ring_group_destinations"][$y]["domain_uuid"] = $domain_uuid;
|
||||
}
|
||||
$y++;
|
||||
@@ -755,7 +755,7 @@
|
||||
if (permission_exists('ring_group_prompt')) {
|
||||
echo " <td class='vtable'>".$text['label-destination_prompt']."</td>\n";
|
||||
}
|
||||
echo " <td class='vtable'>"."Enable"."</td>\n";
|
||||
echo " <td class='vtable'>".$text['label-destination_enabled']."</td>\n";
|
||||
if ($show_destination_delete && permission_exists('ring_group_destination_delete')) {
|
||||
echo " <td class='vtable edit_delete_checkbox_all' onmouseover=\"swap_display('delete_label_destinations', 'delete_toggle_destinations');\" onmouseout=\"swap_display('delete_label_destinations', 'delete_toggle_destinations');\">\n";
|
||||
echo " <span id='delete_label_destinations'>".$text['label-delete']."</span>\n";
|
||||
@@ -770,13 +770,19 @@
|
||||
|
||||
if (strlen($row['ring_group_destination_uuid']) > 0) {
|
||||
echo " <input name='ring_group_destinations[".$x."][ring_group_destination_uuid]' type='hidden' value=\"".escape($row['ring_group_destination_uuid'])."\">\n";
|
||||
} else {
|
||||
$row['destination_enabled'] = 'true';
|
||||
}
|
||||
}
|
||||
|
||||
echo " <tr>\n";
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <input type=\"text\" name=\"ring_group_destinations[".$x."][destination_number]\" class=\"formfld\" value=\"".escape($row['destination_number'])."\">\n";
|
||||
if (!is_uuid($row['ring_group_destination_uuid'])) { // new record
|
||||
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
|
||||
$onkeyup = "onkeyup=\"document.getElementById('ring_group_destinations_".$x."_destination_enabled').checked = (this.value != '' ? true : false);\""; // switch
|
||||
}
|
||||
else {
|
||||
$onkeyup = "onkeyup=\"document.getElementById('ring_group_destinations_".$x."_destination_enabled').value = (this.value != '' ? true : false);\""; // select
|
||||
}
|
||||
}
|
||||
echo " <input type=\"text\" name=\"ring_group_destinations[".$x."][destination_number]\" class=\"formfld\" value=\"".escape($row['destination_number'])."\" ".$onkeyup.">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <select name='ring_group_destinations[".$x."][destination_delay]' class='formfld' style='width:55px'>\n";
|
||||
@@ -807,7 +813,6 @@
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
|
||||
if (permission_exists('ring_group_prompt')) {
|
||||
echo " <td class='formfld'>\n";
|
||||
echo " <select class='formfld' style='width: 90px;' name='ring_group_destinations[".$x."][destination_prompt]'>\n";
|
||||
@@ -817,19 +822,22 @@
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td valign='top' class='".$row_style[$c]." switch-c'>\n";
|
||||
###iphone
|
||||
|
||||
echo " <label class='switch'>\n";
|
||||
$checked = ($row['destination_enabled'] == 'true' ? 'checked=checked' : '');
|
||||
echo " <input type ='checkbox' id='ring_group_destinations[".$x."][destination_enabled]' name='ring_group_destinations[".$x."][destination_enabled]' $checked>\n";
|
||||
echo " <div class ='slider round'></div>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
#iphone button
|
||||
|
||||
echo "</td>";
|
||||
|
||||
echo " <td class='formfld'>\n";
|
||||
// switch
|
||||
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
|
||||
echo " <label class='switch'>\n";
|
||||
echo " <input type='checkbox' id='ring_group_destinations_".$x."_destination_enabled' name='ring_group_destinations[".$x."][destination_enabled]' value='true' ".($row['destination_enabled'] == 'true' ? "checked='checked'" : null).">\n";
|
||||
echo " <span class='slider'></span>\n";
|
||||
echo " </label>\n";
|
||||
}
|
||||
// select
|
||||
else {
|
||||
echo " <select class='formfld' id='ring_group_destinations_".$x."_destination_enabled' name='ring_group_destinations[".$x."][destination_enabled]'>\n";
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
echo " <option value='true' ".($row['destination_enabled'] == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
if ($show_destination_delete && permission_exists('ring_group_destination_delete')) {
|
||||
if (is_uuid($row['ring_group_destination_uuid'])) {
|
||||
echo " <td class='vtable' style='text-align: center; padding-bottom: 3px;'>";
|
||||
|
||||
Reference in New Issue
Block a user