41 lines
1 KiB
Text
41 lines
1 KiB
Text
<h1>New Status</h1>
|
|
|
|
<% use_tinymce %>
|
|
<%= form_with(model: [current_user, @status]) do |f| %>
|
|
|
|
<%= f.label :icon %><br>
|
|
<%= f.file_field :icon %>
|
|
|
|
|
|
<div class="form-group rtf-html-field">
|
|
<%= f.label :text, "Status Text" %><br>
|
|
<%= f.text_area :text, class: "mce-editor observe_textlength", id: "status" %>
|
|
|
|
<%= live_validation_for_field(
|
|
'status',
|
|
maximum_length: ArchiveConfig.STATUS_MAX,
|
|
minimum_length: ArchiveConfig.CONTENT_MIN,
|
|
tooLongMessage: ts("Too long lmao"),
|
|
tooShortMessage: ts("Too short lmao"),
|
|
failureMessage: ts("You need to post some content here.")
|
|
)
|
|
%>
|
|
|
|
<%= generate_countdown_html("status", ArchiveConfig.STATUS_MAX) %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= f.label :mood %><br>
|
|
<%= f.text_field :mood %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= f.label :music %><br>
|
|
<%= f.text_field :music %>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<%= f.submit "Save Status" %>
|
|
</div>
|
|
<% end %>
|
|
|