X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/0e343c408f25ebd720f88a717a601cb696a2e089..d13abc7e1d9c204640fe9a6624a162a7cc106de6:/resources/js/wysiwyg/ui/framework/forms.ts diff --git a/resources/js/wysiwyg/ui/framework/forms.ts b/resources/js/wysiwyg/ui/framework/forms.ts index 08edb214e..b12d9f692 100644 --- a/resources/js/wysiwyg/ui/framework/forms.ts +++ b/resources/js/wysiwyg/ui/framework/forms.ts @@ -11,7 +11,7 @@ import {el} from "../../utils/dom"; export interface EditorFormFieldDefinition { label: string; name: string; - type: 'text' | 'select' | 'textarea' | 'checkbox'; + type: 'text' | 'select' | 'textarea' | 'checkbox' | 'hidden'; } export interface EditorSelectFormFieldDefinition extends EditorFormFieldDefinition { @@ -67,6 +67,9 @@ export class EditorFormField extends EditorUiElement { input = el('textarea', {id, name: this.definition.name, class: 'editor-form-field-input'}); } else if (this.definition.type === 'checkbox') { input = el('input', {id, name: this.definition.name, type: 'checkbox', class: 'editor-form-field-input-checkbox', value: 'true'}); + } else if (this.definition.type === 'hidden') { + input = el('input', {id, name: this.definition.name, type: 'hidden'}); + return el('div', {hidden: 'true'}, [input]); } else { input = el('input', {id, name: this.definition.name, class: 'editor-form-field-input'}); }