Profil bearbeiten
<%= render "devise/shared/error_messages", resource: resource %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= f.label :email, "E-Mail", class: "form-label" %>
<%= f.email_field :email, class: "form-control" %>
đŻ Zielstunden individuell
| Typ |
Art |
Zielstunden |
<% User::PRAKTIKUMSTYPEN.product(User::ENTRY_ARTEN).each do |(typ, art)| %>
| <%= typ.capitalize %> |
<%= art %> |
<%= number_field_tag(
"user[required_hours_matrix][#{typ}][#{art}]",
current_user.required_hours_matrix.dig(typ, art),
class: "form-control", min: 0
) %>
|
<% end %>
WĂśchentliche Zielstunden (weekly_target_matrix)
| Typ |
Art |
Zielstunden / Woche |
<% User::PRAKTIKUMSTYPEN.product(User::ENTRY_ARTEN).each do |typ, art| %>
| <%= typ.capitalize %> |
<%= art %> |
<%= number_field_tag(
"user[weekly_target_matrix][#{typ}][#{art}]",
current_user.weekly_target_matrix.dig(typ, art),
class: "form-control",
min: 0,
step: 0.25
) %>
|
<% end %>
đ Passwort ändern (optional)
<%= f.label :password, "Neues Passwort", class: "form-label" %>
<%= f.password_field :password, autocomplete: "new-password", class: "form-control", placeholder: "â˘â˘â˘â˘â˘â˘â˘â˘" %>
<%= f.label :password_confirmation, "Passwort bestätigen", class: "form-label" %>
<%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
<%= f.label :current_password, "Aktuelles Passwort", class: "form-label" %>
<%= f.password_field :current_password, autocomplete: "current-password", class: "form-control" %>
<%= f.check_box :praepedeutikum_done, class: "form-check-input" %>
<%= f.label :praepedeutikum_done, "Propädeutikum abgeschlossen", class: "form-check-label" %>
<%= f.submit "Profil aktualisieren", class: "btn btn-primary" %>
<% end %>
<%= link_to "ZurĂźck", entries_path, class: "btn btn-link mt-3" %>