summaryrefslogtreecommitdiff
path: root/app/views/scores/_form.html.erb
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-01-01 18:23:43 +0100
committerMarius Peter <marius.peter@tutanota.com>2025-01-01 18:23:43 +0100
commitfa67785624240efd9f47dc488032d3a2ce41ae6f (patch)
treede43e969541ec17a2d04fea034a37a45c65be2d8 /app/views/scores/_form.html.erb
parentcff1e4fc3596943db63603c614eb08945130eeaa (diff)
Update score form input type.
Diffstat (limited to 'app/views/scores/_form.html.erb')
-rw-r--r--app/views/scores/_form.html.erb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/scores/_form.html.erb b/app/views/scores/_form.html.erb
index 9cbcec7..87a924e 100644
--- a/app/views/scores/_form.html.erb
+++ b/app/views/scores/_form.html.erb
@@ -5,10 +5,11 @@
<% criteria.each do |criterium| %>
<% current_score = existing_scores.find { |score| score.scoring_criterium_id == criterium.id } %>
<p>
- <%= select_tag "scores[#{criterium.id}][value]",
- options_for_select(1..5, current_score&.value),
- required: true,
- prompt: "Score" %>
+ <%= number_field_tag "scores[#{criterium.id}][value]",
+ current_score&.value,
+ in: 1..5,
+ required: true,
+ placeholder: "Score (1-5)" %>
<%= label_tag "scores[#{criterium.id}][value]",
criterium.name.capitalize %>
</p>
Copyright 2019--2025 Marius PETER