Skip to content

Commit

Permalink
get_state_display in HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
a-belhadj committed Sep 14, 2023
1 parent f2352c9 commit 3112b34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@
</div>
</form>
{% endif %}
{% if support.state == "OPENED" %}
{% if support.get_state_display == "OPENED" %}
<a href="{% url 'service_catalog:support_close' instance_id=instance.id pk=support.id %}"
class="btn btn-danger{% if not can_close_support %} disabled{% endif %}">
<i class="fas fa-times-circle"></i> Close
</a>
{% endif %}
{% if support.state == "CLOSED" %}
{% if support.get_state_display == "CLOSED" %}
<a href="{% url 'service_catalog:support_reopen' instance_id=instance.id pk=support.id %}"
class="btn btn-success{% if not can_change_support %} disabled{% endif %}">
<i class="fas fa-undo"></i> Re-open
Expand Down
2 changes: 1 addition & 1 deletion templates/service_catalog/instance_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h3 class="card-title">{{ object.name }}</h3>
<div class="tab-content">
<div class="tab-pane" id="operations">
{% if operations_table %}
{% if object.state == "AVAILABLE" %}
{% if object.get_state_display == "AVAILABLE" %}
{% render_table operations_table %}
{% else %}
<p> Instance not available</p>
Expand Down
6 changes: 3 additions & 3 deletions templates/service_catalog/mails/request_state_update.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</td>
<td width="75%" align="left"
style="font-family: Open Sans, Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 24px; padding: 5px 10px;">
{{ request.state }}
{{ request.get_state_display }}
</td>
</tr>
{% if user_applied_state and user_applied_state is not None %}
Expand Down Expand Up @@ -124,7 +124,7 @@
{% endif %}

<!-- REQUEST SUBMITTED SHOW SURVEY -->
{% if request.state == 'SUBMITTED' %}
{% if request.get_state_display == 'SUBMITTED' %}
{% include 'service_catalog/mails/utils/delimiter.html' %}
{% include 'service_catalog/mails/utils/header.html' with title="Survey" %}
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0"
Expand Down Expand Up @@ -168,7 +168,7 @@


<!-- REQUEST COMPLETE SHOW DOCS AND USER SPECS -->
{% if request.state == 'COMPLETE' %}
{% if request.get_state_display == 'COMPLETE' %}
{% include 'service_catalog/mails/utils/delimiter.html' %}
{% include 'service_catalog/mails/utils/header.html' with title="Specs" %}

Expand Down

0 comments on commit 3112b34

Please sign in to comment.