something awful login data
all the stuff to add 2 fields to the user object and to access the logged0in user in a liveview session
This commit is contained in:
@ -1,5 +1,31 @@
|
||||
<h1>Settings</h1>
|
||||
|
||||
<h3>Change SA data</h3>
|
||||
|
||||
<.form let={f} for={@sadata_changeset}
|
||||
action={Routes.user_settings_path(@conn, :update)}
|
||||
id="update_sadata">
|
||||
<%= if @sadata_changeset.action do %>
|
||||
<div class="alert alert-danger">
|
||||
<p>Oops, something went wrong! Please check the errors below.</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= hidden_input f, :action, name: "action", value: "update_sadata" %>
|
||||
|
||||
<%= label f, :bbuserid %>
|
||||
<%= text_input f, :bbuserid, required: true %>
|
||||
<%= error_tag f, :bbuserid %>
|
||||
|
||||
<%= label f, :bbpassword %>
|
||||
<%= text_input f, :bbpassword, required: true %>
|
||||
<%= error_tag f, :bbpassword %>
|
||||
|
||||
<div>
|
||||
<%= submit "Change sadata", class: "btn" %>
|
||||
</div>
|
||||
</.form>
|
||||
|
||||
<h3>Change email</h3>
|
||||
|
||||
<.form let={f} for={@email_changeset} action={Routes.user_settings_path(@conn, :update)} id="update_email">
|
||||
@ -20,7 +46,7 @@
|
||||
<%= error_tag f, :current_password %>
|
||||
|
||||
<div>
|
||||
<%= submit "Change email" %>
|
||||
<%= submit "Change email", class: "btn" %>
|
||||
</div>
|
||||
</.form>
|
||||
|
||||
@ -48,6 +74,6 @@
|
||||
<%= error_tag f, :current_password %>
|
||||
|
||||
<div>
|
||||
<%= submit "Change password" %>
|
||||
<%= submit "Change password", class: "btn" %>
|
||||
</div>
|
||||
</.form>
|
||||
|
Reference in New Issue
Block a user