Bugfixes
This commit is contained in:
parent
7109abeea2
commit
17e50573d6
6 changed files with 36 additions and 17 deletions
|
|
@ -215,11 +215,14 @@
|
|||
// set dynamic form data
|
||||
modal.find("select[name=type]").val(button.data("type"));
|
||||
modal.find("select[name=type]").change(); // Update dynamic inputs
|
||||
$.each(button.attr(), function(name, value) {
|
||||
if(name.startsWith("data-")) {
|
||||
name = name.substring(5);
|
||||
console.log(name, value);
|
||||
modal.find("input[name="+name+"]").val(value);
|
||||
$.each(button.attr(), function(fieldName, value) {
|
||||
if(fieldName.startsWith("data-")) {
|
||||
fieldName = fieldName.substring(5);
|
||||
console.log(fieldName, value);
|
||||
// case insensitive search
|
||||
modal.find("input").filter(function() {
|
||||
return this.name.toLowerCase() == fieldName;
|
||||
}).val(value);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue