diff --git a/amp_conf/htdocs/admin/assets/js/text-editor-1.2.1.js b/amp_conf/htdocs/admin/assets/js/text-editor-1.2.1.js
index a2159ddccd..4e40b6e3fa 100644
--- a/amp_conf/htdocs/admin/assets/js/text-editor-1.2.1.js
+++ b/amp_conf/htdocs/admin/assets/js/text-editor-1.2.1.js
@@ -740,8 +740,9 @@ You should have received a copy of the GNU General Public License along with thi
var _idSuffix = "_" + this.attr("id");
$('#inputText' + _idSuffix);
$('#inputUrl' + _idSuffix);
- //$(".alert").alert("close");
- bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
+ if ($(".alert").length) {
+ bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
+ }
if ($(editorObj).data('currentRange') != '') {
$('#inputText_' + _idSuffix).val($(editorObj).data('currentRange'));
}
@@ -772,7 +773,9 @@ You should have received a copy of the GNU General Public License along with thi
document.execCommand('createLink', false, targetURL);
}
$(editorObj).data("editor").find('a[href="' + targetURL + '"]').each(function () { $(this).attr("target", "_blank"); });
- $(".alert").alert("close");
+ if ($(".alert").length) {
+ bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
+ }
// $("#InsertLink" + _idSuffix).modal("hide");
bootstrap.Modal.getOrCreateInstance($("#InsertLink"+_idSuffix)[0]).hide();
$(editorObj).data("editor").focus();
@@ -1149,16 +1152,16 @@ You should have received a copy of the GNU General Public License along with thi
//For contextmenu
$(document.body).mousedown(function (event) {
var target = $(event.target);
- if (!target.parents().andSelf().is('#context-menu')) { // Clicked outside
+ if (!target.parents().addBack().is('#context-menu')) { // Clicked outside
$('#context-menu').remove();
}
- if (!target.parents().andSelf().is('#specialchar') && (target.closest('a').html() != '')) { //Clicked outside
+ if (!target.parents().addBack().is('#specialchar') && (target.closest('a').html() != '')) { //Clicked outside
if ($("#specialchar").is(':visible')) {
$(editor_Content).data("editor").data("splcharsBtn", null);
$('#specialchar').remove();
}
}
- if (!target.parents().andSelf().is('#paletteCntr') && (target.closest('a').html() != '')) { //Clicked outside
+ if (!target.parents().addBack().is('#paletteCntr') && (target.closest('a').html() != '')) { //Clicked outside
if ($("#paletteCntr").is(':visible')) {
$(editor_Content).data("editor").data("colorBtn", null);
$('#paletteCntr').remove();
@@ -1673,8 +1676,9 @@ You should have received a copy of the GNU General Public License along with thi
})).append($('').html(message));
errorDiv.appendTo($('#' + target));
setTimeout(function () {
- // $('.alert').alert('close');
- bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
+ if ($(".alert").length) {
+ bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
+ }
}, 3000);
},
diff --git a/amp_conf/htdocs/admin/assets/less/freepbx/form.less b/amp_conf/htdocs/admin/assets/less/freepbx/form.less
index 18dd47fed3..69c91690ba 100644
--- a/amp_conf/htdocs/admin/assets/less/freepbx/form.less
+++ b/amp_conf/htdocs/admin/assets/less/freepbx/form.less
@@ -284,6 +284,55 @@ a.badge:focus {
font-size: 14px;
}
+@fpbx-select-arrow: var(--bs-form-select-bg-img, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230F5A59' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"));
+
+/* Bootstrap 5 form-control hides native select arrows; restore the chevron */
+select:not([multiple]):not(.bsmultiselect):not(.chosenmultiselect) {
+ appearance: none;
+ -webkit-appearance: none;
+ background-image: @fpbx-select-arrow;
+ background-repeat: no-repeat;
+ background-position: right 0.75rem center;
+ background-size: 16px 12px;
+ padding-right: 2.25rem;
+}
+
+/* Remove Bootstrap 5 blue focus ring on selects and checkboxes */
+select:focus,
+select:focus-visible,
+.form-select:focus,
+.form-select:focus-visible,
+.form-control:focus,
+.form-check-input:focus,
+.form-check-input:focus-visible,
+input[type="checkbox"]:focus,
+input[type="checkbox"]:focus-visible,
+.bootstrap-table input[type="checkbox"]:focus {
+ outline: none !important;
+ box-shadow: none !important;
+ --bs-focus-ring-color: transparent;
+ --bs-form-check-input-focus-box-shadow: none;
+}
+
+select:focus,
+.form-select:focus,
+.form-control:focus {
+ border-color: #ced4da !important;
+}
+
+.form-check-input,
+input[type="checkbox"] {
+ --bs-form-check-input-focus-border: #ced4da;
+ --bs-form-check-input-focus-box-shadow: none;
+}
+
+.form-check-input:focus,
+.form-check-input:focus-visible,
+input[type="checkbox"]:focus,
+input[type="checkbox"]:focus-visible {
+ border-color: #ced4da !important;
+}
+
.form-group.clearfix {
display: -ms-flexbox;
display: flex;
diff --git a/amp_conf/htdocs/admin/assets/less/freepbx/page.less b/amp_conf/htdocs/admin/assets/less/freepbx/page.less
index 87c0a85007..75a6ca7b61 100644
--- a/amp_conf/htdocs/admin/assets/less/freepbx/page.less
+++ b/amp_conf/htdocs/admin/assets/less/freepbx/page.less
@@ -115,7 +115,6 @@ textarea.form-control{
padding-left: 9px;
display: unset;
line-height: unset;
- color: @input-text-color;
}
input[type=text]:hover:not([disabled]) {
border-color: #666 #CCC #CCC #CCC;
@@ -776,6 +775,7 @@ div.attention {
overflow: auto;
max-height: 270px;
min-height: 102px;
+ padding-left: 12px;
.btn-block {
width: 98%; //http://issues.freepbx.org/browse/FREEPBX-12478
}
@@ -1455,43 +1455,6 @@ pre{
margin-top: 3px;
}
-.form-select,
-select.form-control {
- color: @input-text-color;
-}
-
-.form-group {
- margin-bottom: 1rem;
-}
-
-.dropdown-menu {
- .dropdown-item,
- .dropdown-item:visited,
- li > a,
- li > a:visited {
- color: @input-text-color;
- }
-
- .dropdown-item:hover,
- .dropdown-item:focus,
- li:hover > a,
- li:focus > a,
- li > a:hover,
- li > a:focus {
- color: @button-hover-text-color;
- background-color: @button-hover-background-color;
- }
-
- .dropdown-item.active,
- .dropdown-item.active:visited,
- li.active > a,
- li.active > a:visited {
- color: @button-active-text-color;
- background-color: @button-active-background-color;
- }
-}
-
-
@media (min-width: 768px) {
.modal-content {
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
diff --git a/amp_conf/htdocs/admin/libraries/BMO/View.class.php b/amp_conf/htdocs/admin/libraries/BMO/View.class.php
index 0755414036..bf706f0b32 100644
--- a/amp_conf/htdocs/admin/libraries/BMO/View.class.php
+++ b/amp_conf/htdocs/admin/libraries/BMO/View.class.php
@@ -769,7 +769,7 @@ public function destinationDrawSelect($goto, $i, $restrict_modules=false, $table
}
//draw "parent" select box
$style=' style="'.(($destmod=='Error')?'background-color:red;':'').'"';
- $cat_html='