Add optional arg to the OptionsInput macro call to remove the optional label from the form

Disable the button to update the PPoC when there is only one portfolio
member
This commit is contained in:
leigh-mil 2019-10-16 11:59:40 -04:00
parent ff68c640de
commit 4d59ba68d9
2 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,6 @@
button, button,
[type="button"] { [type="button"] {
&:disabled { &:disabled {
background-color: unset;
opacity: 0.75; opacity: 0.75;
} }
} }

View File

@ -21,7 +21,8 @@
<div class='form-col form-col--half'> <div class='form-col form-col--half'>
{{ {{
OptionsInput( OptionsInput(
assign_ppoc_form.role_id assign_ppoc_form.role_id,
optional=False
) )
}} }}
</div> </div>
@ -65,9 +66,10 @@
{% endset %} {% endset %}
<div class="flex-reverse-row"> <div class="flex-reverse-row">
<a class="usa-button-primary" v-on:click="openModal('change-ppoc-form')"> {% set disable_ppoc_button = 1 == portfolio.members |length %}
<button type="button" class="usa-button usa-button-primary" v-on:click="openModal('change-ppoc-form')" {% if disable_ppoc_button %}disabled{% endif %}>
{{ "fragments.ppoc.update_btn" | translate }} {{ "fragments.ppoc.update_btn" | translate }}
</a> </button>
{{ {{
MultiStepModalForm( MultiStepModalForm(
'change-ppoc-form', 'change-ppoc-form',