NEW: styling (#5)

This commit is contained in:
Matthew Ryan Dillon 2020-06-16 20:29:19 -07:00 committed by GitHub
parent 26995d72e3
commit 2b8a6a1927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 175 additions and 118 deletions

View file

@ -1,49 +1,71 @@
<h1>Settings</h1>
<h1 class="title is-1">Settings</h1>
<h3>Change e-mail</h3>
<h3 class="title is-3">Change e-mail</h3>
<%= form_for @email_changeset, Routes.user_settings_path(@conn, :update_email), fn f -> %>
<%= if @email_changeset.action do %>
<div class="alert alert-danger">
<div class="help is-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<%= label f, :email %>
<%= text_input f, :email, required: true %>
<%= error_tag f, :email %>
<div class="field">
<%= label f, :email, class: "label" %>
<div class="control">
<%= text_input f, :email, required: true, class: "input" %>
</div>
<%= error_tag f, :email %>
</div<
<%= label f, :current_password, for: "current_password_for_email" %>
<%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_email" %>
<%= error_tag f, :current_password %>
<div class="field">
<%= label f, :current_password, for: "current_password_for_email", class: "label" %>
<div class="control">
<%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_email", class: "input" %>
</div>
<%= error_tag f, :current_password %>
</div>
<div>
<%= submit "Change e-mail" %>
<%= submit "Change e-mail", class: "button is-primary" %>
</div>
<% end %>
<h3>Change password</h3>
<br>
<h3 class="title is-3">Change password</h3>
<%= form_for @password_changeset, Routes.user_settings_path(@conn, :update_password), fn f -> %>
<%= if @password_changeset.action do %>
<div class="alert alert-danger">
<div class="help is-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<%= label f, :password, "New password" %>
<%= password_input f, :password, required: true %>
<%= error_tag f, :password %>
<div class="field">
<%= label f, :password, "New password", class: "label" %>
<div class="control">
<%= password_input f, :password, required: true, class: "input" %>
</div>
<%= error_tag f, :password %>
</div>
<%= label f, :password_confirmation, "Confirm new password" %>
<%= password_input f, :password_confirmation, required: true %>
<%= error_tag f, :password_confirmation %>
<div class="field">
<%= label f, :password_confirmation, "Confirm new password", class: "label" %>
<div class="control">
<%= password_input f, :password_confirmation, required: true, class: "input" %>
</div>
<%= error_tag f, :password_confirmation %>
</div>
<%= label f, :current_password, for: "current_password_for_password" %>
<%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_password" %>
<%= error_tag f, :current_password %>
<div class="field">
<%= label f, :current_password, for: "current_password_for_password", class: "label" %>
<div class="control">
<%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_password", class: "input" %>
</div>
<%= error_tag f, :current_password %>
</div>
<div>
<%= submit "Change password" %>
<%= submit "Change password", class: "button is-primary" %>
</div>
<% end %>