|
@@ -127,9 +127,10 @@ class ListManager {
|
127
|
127
|
} else if (this.editableTypes[i]['type'] === 'checkboxes') {
|
128
|
128
|
formData += this.getCategoryCheckboxes(defaultValues['id']);
|
129
|
129
|
} else {
|
130
|
|
- if (this.editableTypes[i]['name'] === 'icon')
|
131
|
|
- formData += "<i class='mdi mdi-" + value + "' style='margin-left: 5px'></i>";
|
132
|
|
- if (this.editableTypes[i]['name'] === 'description')
|
|
130
|
+ if (this.editableTypes[i]['name'] === 'icon'){
|
|
131
|
+ formData += "<i id='" + inputId + "Icon' class='mdi mdi-" + value + "' style='margin-left: 5px'></i>";
|
|
132
|
+ formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" onchange="ListManager.onIconInputChange(this)" required />';
|
|
133
|
+ } else if (this.editableTypes[i]['name'] === 'description')
|
133
|
134
|
formData += '<textarea name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" required >' + value + '</textarea>';
|
134
|
135
|
else
|
135
|
136
|
formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" required />';
|
|
@@ -139,6 +140,11 @@ class ListManager {
|
139
|
140
|
return formData;
|
140
|
141
|
}
|
141
|
142
|
|
|
143
|
+ static onIconInputChange(input) {
|
|
144
|
+ const id = $(input).attr('id') + 'Icon';
|
|
145
|
+ $('#' + id).attr('class', 'mdi mdi-' + $(input).val());
|
|
146
|
+ }
|
|
147
|
+
|
142
|
148
|
getImagePicker(id, index) {
|
143
|
149
|
let imageSrc = undefined;
|
144
|
150
|
if (index !== -1)
|