Skip to content

Commit

Permalink
Rename/seperate relationship macros
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarow committed Aug 15, 2023
1 parent 3ae767e commit 5cea3eb
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% macro data_product_application_fields(form) -%}
{{form.criticality_rating.label}} {{form.criticality_rating(size=5)}}
{% if form.criticality_rating.errors %}
<ul class="errors">
{% for error in form.criticality_rating.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
<br />

{{form.performance_rating.label}} {{form.performance_rating(size=50)}}
{% if form.performance_rating.errors %}
<ul class="errors">
{% for error in form.performance_rating.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
<br />

{{form.rationale.label}} {{form.rationale(size=50)}}
{% if form.rationale.errors %}
<ul class="errors">
{% for error in form.rationale.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
<br />

{{form.needed_improvements.label}} {{form.needed_improvements(size=50)}}
{% if form.needed_improvements.errors %}
<ul class="errors">
{% for error in form.needed_improvements.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{%- endmacro -%}
Original file line number Diff line number Diff line change
@@ -1,44 +1,3 @@
{% macro data_product_application_fields(form) -%}
{{form.criticality_rating.label}} {{form.criticality_rating(size=5)}}
{% if form.criticality_rating.errors %}
<ul class="errors">
{% for error in form.criticality_rating.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
<br />

{{form.performance_rating.label}} {{form.performance_rating(size=50)}}
{% if form.performance_rating.errors %}
<ul class="errors">
{% for error in form.performance_rating.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
<br />

{{form.rationale.label}} {{form.rationale(size=50)}}
{% if form.rationale.errors %}
<ul class="errors">
{% for error in form.rationale.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
<br />

{{form.needed_improvements.label}} {{form.needed_improvements(size=50)}}
{% if form.needed_improvements.errors %}
<ul class="errors">
{% for error in form.needed_improvements.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{%- endmacro -%}

{% macro observing_system_data_product_fields(form) -%}
{{form.criticality_rating.label}} {{form.criticality_rating(size=5)}}
{% if form.criticality_rating.errors %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data_product_fields,
data_product_application_fields
%}
{% from 'macros/forms/relationships/app_sba.j2' import
{% from 'macros/forms/relationships/dataproduct_application.j2' import
data_product_application_fields
%}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data_product_fields,
observing_system_data_product_fields
%}
{% from 'macros/forms/relationships/app_sba.j2' import
{% from 'macros/forms/relationships/observingsystem_dataproduct.j2' import
observing_system_data_product_fields
%}

Expand Down

0 comments on commit 5cea3eb

Please sign in to comment.