Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix number param html type in trigger template #31980

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions airflow/www/templates/airflow/trigger.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So just to make sure, this PR reverts this line from #31946 and the aggregated change is only line 120, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because we need just to change type attribute

{%- if not "null" in form_details.schema.type %} required=""{% endif %}>
{% for option in form_details.schema.enum -%}
<option value="{{ option }}"
Expand Down Expand Up @@ -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 %}
Expand Down