diff --git a/datamodels/2.x/itop-portal-base/portal/templates/layout.html.twig b/datamodels/2.x/itop-portal-base/portal/templates/layout.html.twig index 0646a2a1b..4dbc37147 100644 --- a/datamodels/2.x/itop-portal-base/portal/templates/layout.html.twig +++ b/datamodels/2.x/itop-portal-base/portal/templates/layout.html.twig @@ -135,7 +135,7 @@ - + {# Selectize for sets #} @@ -543,7 +543,12 @@ }); // Initialize confirmation message handler when a form with touched fields is closed - oBodyElem.portal_leave_handler({'message': '{{ 'Portal:Form:Close:Warning'|dict_s }}'}); + oBodyElem.leave_handler({ + 'message': '{{ 'Portal:Form:Close:Warning'|dict_s }}', + 'extra_events': { + 'body': ['hide.bs.modal'] + } + }); {% endblock %} }); diff --git a/sources/Application/WebPage/iTopWebPage.php b/sources/Application/WebPage/iTopWebPage.php index 3bffcef6f..48cedba88 100644 --- a/sources/Application/WebPage/iTopWebPage.php +++ b/sources/Application/WebPage/iTopWebPage.php @@ -321,7 +321,7 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage // Date picker options $aPickerOptions = array( 'showOn' => 'button', - 'buttonText' => '', + 'buttonText' => '', // N°6455 class will be added after JQuery UI widget 'dateFormat' => AttributeDate::GetFormat()->ToDatePicker(), 'constrainInput' => false, 'changeMonth' => true, @@ -374,6 +374,7 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage // Note: Trigger image is wrapped in a span so we can display it we want $(".date-pick").datepicker($sJSDatePickerOptions) .next("img").wrap(""); + $("button.ui-datepicker-trigger").addClass('fas fa-calendar-alt'); // Hack for the date and time picker addon issue on Chrome (see #1305) // The workaround is to instantiate the widget on demand