You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2023/07/06 20:22:13 UTC
[airflow] 01/39: Fix number param html type in trigger template (#31980)
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 62c5ef11e17a1bf9bf9ab255f308d9c624423ac7
Author: Hussein Awala <hu...@awala.fr>
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 <hu...@awala.fr>
* Update airflow/www/templates/airflow/trigger.html
Co-authored-by: Tzu-ping Chung <ur...@gmail.com>
---------
Signed-off-by: Hussein Awala <hu...@awala.fr>
Co-authored-by: Tzu-ping Chung <ur...@gmail.com>
(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 %}