Adding text editing bars to report and new topic (#60)

This commit is contained in:
SomewhatDamaged 2020-03-28 02:46:36 +11:00 committed by GitHub
parent 44a20a7888
commit ac12462bec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

View file

@ -40,8 +40,25 @@ p
= form_for @changeset, @action, fn f ->
.field
= select f, :category, report_categories(), class: "input"
.block
.block__header.block__header--js-tabbed
a.selected href="#" data-click-tab="write"
i.fas.fa-edit>
' Edit
a href="#" data-click-tab="preview"
i.fa.fa-eye>
' Preview
.block__tab.communication-edit__tab.selected data-tab="write"
= render PhilomenaWeb.TextileView, "_help.html", conn: @conn
= render PhilomenaWeb.TextileView, "_toolbar.html", conn: @conn
.field
= textarea f, :reason, class: "input input--wide", placeholder: "Provide anything else we should know here."
= textarea f, :reason, class: "input input--wide input--text js-preview-input js-toolbar-input", placeholder: "Provide anything else we should know here."
.block__tab.communication-edit__tab.hidden data-tab="preview"
' [Loading preview...]
= if !@conn.assigns.current_user do
.field

View file

@ -21,6 +21,8 @@
= inputs_for f, :posts, fn fp ->
.field
= render PhilomenaWeb.TextileView, "_help.html", conn: @conn
= render PhilomenaWeb.TextileView, "_toolbar.html", conn: @conn
= textarea fp, :body, class: "input input--wide input--text js-preview-input js-toolbar-input", placeholder: "Please read the site rules before posting and use [spoiler][/spoiler] for NSFW stuff in SFW forums.", required: true
= error_tag fp, :body