This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v2-6-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit e991f6689d9af2baf0da0b8884b622b5a86ae092 Author: Hussein Awala <[email protected]> AuthorDate: Mon Jun 19 11:31:52 2023 +0200 Fix number param html type in trigger template (#31980) * Keep valuetype="number" for both param number and integer types and change only type value Signed-off-by: Hussein Awala <[email protected]> * Update airflow/www/templates/airflow/trigger.html Co-authored-by: Tzu-ping Chung <[email protected]> --------- Signed-off-by: Hussein Awala <[email protected]> Co-authored-by: Tzu-ping Chung <[email protected]> (cherry picked from commit 232771869030d708c57f840aea735b18bd4bffb2) --- airflow/www/templates/airflow/trigger.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow/www/templates/airflow/trigger.html b/airflow/www/templates/airflow/trigger.html index 4c03e243f4..08f17176dc 100644 --- a/airflow/www/templates/airflow/trigger.html +++ b/airflow/www/templates/airflow/trigger.html @@ -72,7 +72,7 @@ {% elif "enum" in form_details.schema and form_details.schema.enum %} <select class="my_select2 form-control" name="element_{{ form_key }}" id="element_{{ form_key }}" data-placeholder="Select Value" onchange="updateJSONconf();" - {%- if "integer" in form_details.schema.type %} valuetype="number" {% elif "number" in form_details.schema.type %} valuetype="decimal" {%- endif %} + {%- if "integer" in form_details.schema.type or "number" in form_details.schema.type %} valuetype="number"{% endif %} {%- if not "null" in form_details.schema.type %} required=""{% endif %}> {% for option in form_details.schema.enum -%} <option{% if form_details.value == option %} selected="true"{% endif %}>{{ option }}</option> @@ -94,7 +94,7 @@ </textarea> {% elif form_details.schema and ("integer" in form_details.schema.type or "number" in form_details.schema.type) %} <input class="form-control" name="element_{{ form_key }}" id="element_{{ form_key }}" - {% if "integer" in form_details.schema.type %} valuetype="number" type="number" {%else%} valuetype="decimal" type="decimal" {% endif %} + valuetype="number" {% if "integer" in form_details.schema.type %} type="number" {% else %} type="decimal" {% endif %} value="{% if form_details.value %}{{ form_details.value }}{% endif %}" {%- if form_details.schema.minimum %} min="{{ form_details.schema.minimum }}"{% endif %} {%- if form_details.schema.maximum %} max="{{ form_details.schema.maximum }}"{% endif %}
