Skip to content

Commit

Permalink
export/html: Use the 'UID reset button' on the requirement form (when…
Browse files Browse the repository at this point in the history
… the requirement exists and does not have a UID)
  • Loading branch information
mettta committed Nov 13, 2023
1 parent 786282b commit 97eec0f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@
{% set text_field_row_context.errors=form_object.get_errors(field_.field_name) %}
{% set text_field_row_context.field = field_ %}
{% set text_field_row_context.field_type = "singleline" %}
{% include "components/requirement_form/row_with_text_field.jinja" %}
{% set text_field_row_context.reference_mid = form_object.requirement_mid %}
{%- if field_.field_name == "UID" and field_.field_escaped_value == "" -%}
<turbo-frame id="uid_with_reset-{{ text_field_row_context.reference_mid }}">
{# this template is turbo-frame and has a button to reset to the default value: #}
{% include "components/requirement_form/frame_row_with_uid_with_reset_field.jinja" %}
</turbo-frame>
{%- else -%}
{% include "components/requirement_form/row_with_text_field.jinja" %}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}

Expand Down

0 comments on commit 97eec0f

Please sign in to comment.