Slides require mesage

This commit is contained in:
Jonathan 2023-03-31 09:51:40 +02:00
parent 9635b4b721
commit 93966788eb
3 changed files with 81 additions and 5 deletions

View File

@ -351,12 +351,87 @@ function load_modal(settings) {
AJAX_RUNNING = 0;
}
} else {
if (Array.isArray(settings.form) === false) {
$("#" + settings.form + " :input").each(function() {
if (this.checkValidity() === false) {
var select2 = $(this).attr("data-select2-id");
if (typeof select2 !== typeof undefined && select2 !== false) {
$(this)
.next()
.attr("title", this.validationMessage);
$(this)
.next()
.tooltip({
tooltipClass: "uitooltip",
position: {
my: "right bottom",
at: "right top",
using: function(position, feedback) {
$(this).css(position);
$("<div>")
.addClass("arrow")
.addClass(feedback.vertical)
.addClass(feedback.horizontal)
.appendTo(this);
}
}
});
$(this)
.next()
.tooltip("open");
var element = $(this).next();
setTimeout(
function(element) {
element.tooltip("destroy");
element.removeAttr("title");
},
3000,
element
);
} else {
$(this).attr("title", this.validationMessage);
$(this).tooltip({
tooltipClass: "uitooltip",
position: {
my: "right bottom",
at: "right top",
using: function(position, feedback) {
$(this).css(position);
$("<div>")
.addClass("arrow")
.addClass(feedback.vertical)
.addClass(feedback.horizontal)
.appendTo(this);
}
}
});
$(this).tooltip("open");
var element = $(this);
setTimeout(
function(element) {
element.tooltip("destroy");
element.removeAttr("title");
},
3000,
element
);
}
flagError = true;
}
});
}
if (!flagError) {
// No onsumbit configured. Directly close.
if (document.getElementById(settings.form) != undefined) {
document.getElementById(settings.form).submit();
}
d.dialog("close");
}
}
};
required_buttons.push({

View File

@ -287,7 +287,7 @@ class Manager implements PublicLogin
$this->dashboardId = (int) \get_parameter('dashboardId', 0);
if ($this->slides === 1) {
$this->slidesIds = (array) \get_parameter('slidesIds', [get_user_dashboards($config['id_user'])[0]['id']]);
$this->slidesIds = (array) \get_parameter('slidesIds');
$this->cellModeSlides = (int) \get_parameter(
'cellModeSlides',
0

View File

@ -81,6 +81,7 @@ $inputs[] = [
'return' => true,
'multiple' => true,
'sort' => false,
'required' => 'required',
],
];