decimal precision constrained
This commit is contained in:
@@ -29,6 +29,17 @@
|
||||
<input name="column_name_input" value="{{ page.columns.name_input }}" placeholder="issued_on">
|
||||
{% if page.columns.show_link_target() %}<small>{{ nav.tr("td-link-alias-hint") }}</small>{% endif %}
|
||||
</label>
|
||||
<label>{{ nav.tr("td-fixed-decimal-access") }}
|
||||
<select name="fixed_decimal_input"
|
||||
hx-post="/admin/tables/columns/add/builder{{ page.selection.query() }}"
|
||||
hx-trigger="change" hx-include="#column-form"
|
||||
hx-target="#column-panel" hx-swap="innerHTML"
|
||||
hx-vals='{"action": "refresh"}'>
|
||||
<option value="no" {% if !page.columns.fixed_decimal_enabled() %}selected{% endif %}>{{ nav.tr("td-fixed-decimal-disabled") }}</option>
|
||||
<option value="yes" {% if page.columns.fixed_decimal_enabled() %}selected{% endif %}>{{ nav.tr("td-fixed-decimal-enabled") }}</option>
|
||||
</select>
|
||||
<small>{{ nav.tr("td-fixed-decimal-access-hint") }}</small>
|
||||
</label>
|
||||
<label>{{ nav.tr("td-column-type") }}
|
||||
<select name="column_type_input"
|
||||
hx-post="/admin/tables/columns/add/builder{{ page.selection.query() }}"
|
||||
@@ -37,7 +48,7 @@
|
||||
hx-vals='{"action": "refresh"}'>
|
||||
<option value="">{{ nav.tr("td-choose-type") }}</option>
|
||||
{% for column_type in column_types %}
|
||||
<option value="{{ column_type }}" {% if page.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}{{ nav.tr("td-fk-link") }}{% else %}{{ column_type }}{% endif %}</option>
|
||||
<option value="{{ column_type }}" {% if page.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}{{ nav.tr("td-fk-link") }}{% else if *column_type == "numeric" %}{{ nav.tr("td-exact-decimal") }}{% else if *column_type == "decimal" %}{{ nav.tr("td-fixed-decimal-type") }}{% else %}{{ column_type }}{% endif %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
@@ -65,6 +76,10 @@
|
||||
{% endif %}
|
||||
|
||||
{% if page.columns.show_decimal_arguments() %}
|
||||
<div class="field-note col-span-full">
|
||||
<span class="field-label">{{ nav.tr("td-fixed-decimal-warning-title") }}</span>
|
||||
<p class="hint">{{ nav.tr("td-fixed-decimal-warning") }}</p>
|
||||
</div>
|
||||
<label>{{ nav.tr("td-precision") }}
|
||||
<input name="decimal_precision_input" value="{{ page.columns.decimal_precision_input }}"
|
||||
inputmode="numeric" placeholder="12">
|
||||
|
||||
Reference in New Issue
Block a user