This is an automated email from the ASF dual-hosted git repository.
husseinawala pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2327718690 Fix number param html type in trigger template (#31980)
2327718690 is described below
commit 232771869030d708c57f840aea735b18bd4bffb2
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]>
---
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 c765f7537d..e8965c3654 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 value="{{ option }}"
@@ -117,7 +117,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 %}