views: fixup regressions in new dmail, new feedback forms.

Fixup regression in 59b277ead. Simpleform expected `to_name`,
`user_name` methods to exist on these models.
This commit is contained in:
evazion
2019-08-18 13:28:45 -05:00
parent 576b4feb3b
commit 5b27726635
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
<%= simple_form_for(dmail) do |f| %>
<%= f.input :to_name, :label => "To", :input_html => { data: { autocomplete: "user" } } %>
<%= f.input :to_name, :label => "To", :input_html => { value: dmail.to.try(:name), data: { autocomplete: "user" } } %>
<%= f.input :title, :as => :string %>
<%= dtext_field "dmail", "body" %>
<%= f.button :submit, "Send", :data => { :disable_with => "Sending..." } %>

View File

@@ -14,7 +14,7 @@
<%= error_messages_for "user_feedback" %>
<%= simple_form_for(@user_feedback) do |f| %>
<%= f.input :user_name, :label => "User", :input_html => { data: { autocomplete: "user" } } %>
<%= f.input :user_name, :label => "User", :input_html => { value: @user_feedback.user.try(:name), data: { autocomplete: "user" } } %>
<%= f.input :category, :collection => ["positive", "neutral", "negative"], :include_blank => false %>
<%= dtext_field "user_feedback", "body" %>
<%= f.button :submit, "Submit" %>