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:
parent
259a9b45eb
commit
246fb0aa92
11
add.php
11
add.php
@ -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>';
|
||||
|
||||
|
11
editor.php
11
editor.php
@ -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>';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user