Profil bearbeiten

<%= 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

<% User::PRAKTIKUMSTYPEN.product(User::ENTRY_ARTEN).each do |(typ, art)| %> <% end %>
Typ Art Zielstunden
<%= 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 ) %>
WĂśchentliche Zielstunden (weekly_target_matrix)
<% ["propädeutikum", "fachspezifikum"].each do |typ| %> <% ["Praktikum", "Selbsterfahrung", "Supervision"].each do |art| %>
<%= label_tag "user[weekly_target_matrix][#{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", step: 1 %>
<% end %> <% 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.submit "Profil aktualisieren", class: "btn btn-primary" %> <% end %> <%= link_to "ZurĂźck", entries_path, class: "btn btn-link mt-3" %>