dependabot[bot] on npm_and_yarn
chore(deps): bump terser from 4… (compare)
These edits are in the form-builder.js at appx line 900...
if (attribute === 'label' && !opts.disableHTMLLabels) {
//inputConfig.contenteditable = true // replace label div with input by CA
//attributefield += m('div', attrVal, inputConfig).outerHTML
inputConfig.value = attrVal
inputConfig.type = 'text'
attributefield += <input ${attrString(inputConfig)}>
} else {
inputConfig.value = attrVal
inputConfig.type = 'text'
attributefield += <input ${attrString(inputConfig)}>
}
var fbInstances = [];
var fields = [{
label: "DateTime",
type: "text",
subtype: "datetime-local",
icon: "⏰" //html emoji
}];
for (var i = 0; i < data.length; i++){
var options = {
onSave: function (evt, formData) {
console.log("formbuilder saved");
$(".render-wrap").formRender({ formData : formData });
},
showActionButtons: false,
controlPosition: 'left',
fields: fields,
subtypes: {
text: ['datetime-local']
},
disabledAttrs: ["access"],
disableFields: ["autocomplete","button","file","hidden","starRating"],
dataType: 'json',
formData: data[i].Json,
};
const tabCount = document.getElementById("Edit-tabs").children.length;
const tabId = "page-" + tabCount.toString();
const $newTabTemplate = document.getElementById("Edit-add-page-tab");
const $newTab = $newTabTemplate.cloneNode(true);
$newTab.removeAttribute("id");
const $tabLink = $newTab.querySelector("a");
$tabLink.setAttribute("href", "#" + tabId);
$tabLink.innerText = "Section " + tabCount;
$newTabTemplate.parentElement.insertBefore($newTab, $newTabTemplate);
const $newPageTemplate = document.getElementById("Edit-new-page");
const $newPage = $newPageTemplate.cloneNode(true);
$newPage.setAttribute("id", tabId);
$newPage.classList.add("fb-editor");
$newPageTemplate.parentElement.insertBefore($newPage, $newPageTemplate);
fbInstances.push($($newPage).formBuilder(options));
Edit_fbPages.tabs("refresh");
Edit_fbPages.tabs("option", "active", tabCount - 1);
}