Skip to content

Commit

Permalink
allows messages to users to be formatted #477
Browse files Browse the repository at this point in the history
  • Loading branch information
RobStallion committed Nov 6, 2018
1 parent b7c79d6 commit 58856f8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions web/static/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,7 @@ body {
.admin-msg-mt {
margin-top: 51px;
}

.mce-notification.mce-in {
display: none;
}
13 changes: 12 additions & 1 deletion web/templates/messages/new.html.eex
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<script src="https://cloud.tinymce.com/stable/tinymce.min.js"></script>
<script>
tinymce.init({
selector: "#message-text",
plugins: "link",
menubar: false,
statusbar: false,
indentation: "0"
});
</script>

<%= component("admin_message_nav", [conn: @conn]) %>
<div id="msg-div" class="mt4 pt5 w-80 center">
<p >Compose your message</p>
Expand All @@ -7,7 +18,7 @@
<%= text_input f, :subject, class: "w-100 mv2 pa2 w5 ba br2 b--black-20" %>
<label class="red"><%= error_tag f, :subject %></label>
<p>Compose Message:</p>
<%= textarea f, :body, rows: 15, class: "w-100 mv2 pa2 w5 ba br2 b--black-20" %>
<%= textarea f, :body, rows: 15, id: "message-text", class: "w-100 mv2 pa2 w5 ba br2 b--black-20" %>
<label class="red"><%= error_tag f, :body %></label>
<%= checkbox f, :to_all, value: @to_all, hidden: true %>
<%= checkbox f, :confirm, value: false, hidden: true %>
Expand Down
2 changes: 1 addition & 1 deletion web/templates/messages/view.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<p class="bep-gray mt0 mb1 f7"><%= message.from %></p>
<div style="color:<%= message.colour %>;" class="ba mb2 pa2 tc mb3 bw1 br2">
<p class="b tl black"><%= message.subject %></p>
<p class="tl black"><%= message.body %></p>
<div class="tl black"><%= raw message.body %></div>
</div>
<% end %>
</div>
Expand Down

0 comments on commit 58856f8

Please sign in to comment.