diff --git a/app/views/entries/_form.html.erb b/app/views/entries/_form.html.erb index 6b450ba..87395cb 100644 --- a/app/views/entries/_form.html.erb +++ b/app/views/entries/_form.html.erb @@ -84,15 +84,22 @@
<%= form.label :praktikums_typ, '🔧 Praktikumstyp', class: 'form-label' %> <%= form.select :praktikums_typ, - current_user.praepedeutikum_abgeschlossen? ? - Entry::PRAKTIKUMSTYPEN.reject { |typ| typ == 'propädeutikum' } : - Entry::PRAKTIKUMSTYPEN, - {}, class: 'form-select' %> + ( + current_user.praepedeutikum_abgeschlossen? ? + Entry::PRAKTIKUMSTYPEN.reject { |typ| typ == 'propädeutikum' } : + Entry::PRAKTIKUMSTYPEN + ).map { |typ| [typ.upcase, typ] }, + {}, + class: 'form-select' %>
<%= form.label :entry_art, '📚 Art', class: 'form-label' %> - <%= form.select :entry_art, Entry::ENTRY_ARTEN, {}, class: 'form-select', id: 'entry_art_select' %> + <%= form.select :entry_art, + Entry::ENTRY_ARTEN.map { |art| [art.upcase, art] }, + {}, + class: 'form-select', + id: 'entry_art_select' %>
diff --git a/app/views/entries/index.html.erb b/app/views/entries/index.html.erb index 4277b3d..002caf5 100644 --- a/app/views/entries/index.html.erb +++ b/app/views/entries/index.html.erb @@ -205,34 +205,30 @@
<% end %> -
- - - <%= form_with url: start_timer_entries_path, method: :post, local: true do %> -
-
- <%= label_tag :typ, 'Typ' %> - <%= select_tag :typ, - options_for_select( - current_user.praepedeutikum_abgeschlossen? ? - Entry::PRAKTIKUMSTYPEN.reject { |typ| typ == 'propädeutikum' } : - Entry::PRAKTIKUMSTYPEN - ), - class: "form-select" %> -
- -
- <%= label_tag :art, 'Art' %> - <%= select_tag :art, options_for_select(Entry::ENTRY_ARTEN), class: "form-select" %> -
- -
- <%= submit_tag '▶️ Start', class: "btn btn-success w-100", disabled: @running_entry.present? %> -
-
- <% end %> +
+ <%= label_tag :typ, 'Typ' %> + <%= select_tag :typ, + options_for_select( + ( + current_user.praepedeutikum_abgeschlossen? ? + Entry::PRAKTIKUMSTYPEN.reject { |typ| typ == 'propädeutikum' } : + Entry::PRAKTIKUMSTYPEN + ).map { |typ| [typ.upcase, typ] } + ), + class: "form-select" %> +
+
+ <%= label_tag :art, 'Art' %> + <%= select_tag :art, + options_for_select( + Entry::ENTRY_ARTEN.map { |art| [art.upcase, art] } + ), + class: "form-select" %> +
+
+ <%= submit_tag '▶️ Start', class: "btn btn-success w-100", disabled: @running_entry.present? %>