1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-03 03:19:17 +01:00

Fix select come campi personalizzati

This commit is contained in:
Thomas Zilio 2019-06-07 15:01:00 +02:00
parent 259a9b45eb
commit 246fb0aa92
2 changed files with 23 additions and 1 deletions

11
add.php
View File

@ -38,6 +38,15 @@ echo '
$(document).ready(function(){
var form = $("#custom_fields_top-add").parent().find("form").first();
// Rimozione select inizializzati
$("#custom_fields_bottom-add").find("select").each(function () {
$(this).select2().select2("destroy");
});
$("#custom_fields_bottom-add").find("select").each(function () {
$(this).select2().select2("destroy");
});
// Campi a inizio form
form.prepend($("#custom_fields_top-add").html());
@ -53,6 +62,8 @@ $(document).ready(function(){
}
last.after($("#custom_fields_bottom-add").html());
start_superselect();
});
</script>';

View File

@ -204,6 +204,15 @@ if (empty($record) || !$has_access) {
$(document).ready(function(){
var form = $("#module-edit").find("form").first();
// Rimozione select inizializzati
$("#custom_fields_bottom-edit").find("select").each(function () {
$(this).select2().select2("destroy");
});
$("#custom_fields_bottom-edit").find("select").each(function () {
$(this).select2().select2("destroy");
});
// Campi a inizio form
form.prepend($("#custom_fields_top-edit").html());
@ -219,6 +228,8 @@ if (empty($record) || !$has_access) {
}
last.after($("#custom_fields_bottom-edit").html());
start_superselect();
});
</script>';