2020-03-06 12:11:38 +03:00
|
|
|
<div class="w-full max-w-md mx-auto mt-8">
|
2019-09-02 14:29:19 +03:00
|
|
|
<%= form_for @conn, "/contact", [class: "bg-white shadow-md rounded px-8 py-6 mb-4 mt-16"], fn f -> %>
|
2020-03-06 12:11:38 +03:00
|
|
|
<h2 class="text-xl font-black">Contact us</h2>
|
|
|
|
<p class="text-gray-600 mt-2">Please get in touch with any questions and thoughts, we'll get back to you as soon as possible!</p>
|
|
|
|
<%= textarea f, :text, rows: 4, class: "transition bg-gray-200 appearance-none border border-transparent rounded w-full p-2 text-gray-700 leading-normal appearance-none focus:outline-none focus:bg-white focus:border-gray-300 text-xs mt-4" %>
|
2019-09-02 14:29:19 +03:00
|
|
|
<%= if @conn.assigns[:current_user] do %>
|
|
|
|
<%= hidden_input f, :email, value: @conn.assigns[:current_user].email %>
|
|
|
|
<% else %>
|
|
|
|
<div class="my-4">
|
2020-03-06 12:11:38 +03:00
|
|
|
<%= label f, :email, "Your email (optional)", class: "block text-gray-700 text-sm font-bold mb-2" %>
|
|
|
|
<%= email_input f, :email, class: "transition bg-gray-200 appearance-none border border-transparent rounded w-full p-2 text-gray-700 leading-normal appearance-none focus:outline-none focus:bg-white focus:border-gray-300", placeholder: "example@email.com" %>
|
2019-09-02 14:29:19 +03:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<%= submit "Send", class: "button mt-4 w-full" %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|