Sha256: 5cfaf319730ebefcab2c39456509a726975c22aca7fc5c318e8548aaa77aafcf
Contents?: true
Size: 1.73 KB
Versions: 37
Compression:
Stored size: 1.73 KB
Contents
<%= render Koi::Content::Editor::ItemFormComponent.new(model: table, url: path, data: { controller: "content--editor--table" }) do |form| %> <%= form.content_heading_fieldset %> <% content = sanitize_content_table(normalize_content_table(form.object, heading: false)) %> <%= form.govuk_text_area :content, value: content, data: { content__editor__table_target: "input" } %> <%# hidden button to receive <Enter> events (HTML-default is to click first button in form) %> <%= form.button "Save", hidden: "" %> <%# hidden button to submit the table for re-rendering %> <%= form.button "Update", formaction: table.persisted? ? content_routes.table_path : content_routes.tables_path, hidden: "", data: { content__editor__table_target: "update" } %> <%= form.govuk_number_field :heading_rows, label: { text: "Heading rows" }, width: 2, placeholder: 0, min: 0, data: { content__editor__table_target: "headerRows", action: "input->content--editor--table#update" } %> <%= form.govuk_number_field :heading_columns, label: { text: "Heading columns" }, width: 2, placeholder: 0, min: 0, data: { content__editor__table_target: "headerColumns", action: "input->content--editor--table#update" } %> <% end %>
Version data entries
37 entries across 37 versions & 1 rubygems