Skip to content

Commit

Permalink
use html5 min/max on input field for config'd min/max
Browse files Browse the repository at this point in the history
  • Loading branch information
jrochkind committed Nov 26, 2024
1 parent 85a06b0 commit c6564f9
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@
<div class="d-flex justify-content-between align-items-end">
<div class="d-flex flex-column mr-1 me-1">
<%= label_tag(begin_input_name, t("blacklight.range_limit.range_begin_short"), class: 'text-muted small mb-1') %>
<%= number_field_tag(begin_input_name, begin_value_default, class: "form-control form-control-sm range_begin") %>
<%= number_field_tag(begin_input_name,
begin_value_default,
min: range_config[:min_value],
max: range_config[:max_value],
class: "form-control form-control-sm range_begin")
%>
</div>

<div class="d-flex flex-column ml-1 ms-1">
<%= label_tag(end_input_name, t("blacklight.range_limit.range_end_short"), class: 'text-muted small mb-1') %>
<%= number_field_tag(end_input_name, end_value_default, class: "form-control form-control-sm range_end") %>
<%= number_field_tag(end_input_name,
end_value_default,
min: range_config[:min_value],
max: range_config[:max_value],
class: "form-control form-control-sm range_end")
%>
</div>
</div>
<div class="d-flex justify-content-end mt-2">
Expand Down

0 comments on commit c6564f9

Please sign in to comment.