Style the "Resend Invitation" button

This commit is contained in:
George Drummond 2019-03-07 10:57:35 -05:00
parent d57b96cf05
commit 5f241cf154
No known key found for this signature in database
GPG Key ID: 296DD6077123BF17
2 changed files with 14 additions and 12 deletions

View File

@ -171,3 +171,6 @@
} }
} }
.inline-form {
display: inline-block;
}

View File

@ -70,18 +70,9 @@
<h2 class="officer__title">{{ ("task_orders.invitations." + officer_type + ".title") | translate }}</h2> <h2 class="officer__title">{{ ("task_orders.invitations." + officer_type + ".title") | translate }}</h2>
<p class="officer__description">{{ ("task_orders.invitations." + officer_type + ".description") | translate }}</p> <p class="officer__description">{{ ("task_orders.invitations." + officer_type + ".description") | translate }}</p>
{% set prefix = { "contracting_officer": "ko", "contracting_officer_representative": "cor", "security_officer": "so" }[officer_type] %}
<form method='POST' action="{{ url_for("portfolios.resend_invite", portfolio_id=portfolio.id, task_order_id=task_order.id) }}">
{{ form.csrf_token }}
<input name="invite_type" value="{{ prefix }}_invite" type="hidden" />
<button>
Resend
</button>
</form>
<edit-officer-form v-bind:has-errors='{{ ((form.errors|length) > 0)|tojson }}' v-bind:has-changes='{{ form.has_changes() | tojson }}' inline-template> <edit-officer-form v-bind:has-errors='{{ ((form.errors|length) > 0)|tojson }}' v-bind:has-changes='{{ form.has_changes() | tojson }}' inline-template>
<div> <div>
{% set prefix = { "contracting_officer": "ko", "contracting_officer_representative": "cor", "security_officer": "so" }[officer_type] %}
{% set first_name = task_order[prefix + "_first_name"] %} {% set first_name = task_order[prefix + "_first_name"] %}
{% set last_name = task_order[prefix + "_last_name"] %} {% set last_name = task_order[prefix + "_last_name"] %}
{% set email = task_order[prefix + "_email"] %} {% set email = task_order[prefix + "_email"] %}
@ -89,7 +80,6 @@
{% set dod_id = task_order[prefix + "_dod_id"] %} {% set dod_id = task_order[prefix + "_dod_id"] %}
{% set invited = False %} {% set invited = False %}
{% if task_order[officer_type] %} {% if task_order[officer_type] %}
{% set invited = True %} {% set invited = True %}
<div class="officer__info"> <div class="officer__info">
@ -106,7 +96,16 @@
</div> </div>
<div class="officer__actions"> <div class="officer__actions">
{{ Link("Update", "edit", onClick="edit") }} {{ Link("Update", "edit", onClick="edit") }}
{{ Link("Resend Invitation", "avatar") }}
<form method='POST' action="{{ url_for("portfolios.resend_invite", portfolio_id=portfolio.id, task_order_id=task_order.id) }}" class="inline-form">
{{ form.csrf_token }}
<input name="invite_type" value="{{ prefix }}_invite" type="hidden" />
<button class="icon-link">
{{ Icon('avatar') }}
Resend Invitation
</button>
</form>
{{ Link("Remove", "trash", classes="remove") }} {{ Link("Remove", "trash", classes="remove") }}
</div> </div>
{% elif first_name and last_name %} {% elif first_name and last_name %}