Skip to content

Commit

Permalink
Fix units regex
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Nov 18, 2024
1 parent ce9be64 commit 562461f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/templates/input_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<!-- number type -->
<input type="number" class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" aria-describedby="help{{key}}" {% if value.required %}required{%endif%} {% if min_value %}min="{{min_value[0]}}"{%endif%} {% if max_value %}max="{{max_value[0]}}"{%endif%}/>
{% elif value.type == "scalar-unit.size" %}
<input type="text" class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" pattern="[0-9]*( )([TMG]B)" title="Number Unit(MB, GB or TB)">
<input type="text" class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" pattern="[0-9]*( )[TMG]i{0,1}B" title="Number Unit(MB, GB or TB)">
{% else %}
<!-- text type, hide fields with password -->
<input {% if 'password' in key %}type="password"{% else %}type="text"{% endif %} class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" aria-describedby="help{{key}}" {% if value.required %}required{%endif%} {% if min_length %}minlength="{{min_length[0]}}"{%endif%} {% if max_length %}maxlength="{{max_length[0]}}"{%endif%}/>
Expand Down

0 comments on commit 562461f

Please sign in to comment.