set value of checkbox to false when modal closes
This commit is contained in:
parent
71340fd039
commit
1aab857a1e
@ -4,7 +4,7 @@ from . import task_orders_bp
|
|||||||
from atst.domain.authz.decorator import user_can_access_decorator as user_can
|
from atst.domain.authz.decorator import user_can_access_decorator as user_can
|
||||||
from atst.domain.portfolios import Portfolios
|
from atst.domain.portfolios import Portfolios
|
||||||
from atst.domain.task_orders import TaskOrders
|
from atst.domain.task_orders import TaskOrders
|
||||||
from atst.forms.task_order import TaskOrderForm, SignatureForm
|
from atst.forms.task_order import SignatureForm
|
||||||
from atst.models import Permissions
|
from atst.models import Permissions
|
||||||
from atst.models.task_order import Status as TaskOrderStatus
|
from atst.models.task_order import Status as TaskOrderStatus
|
||||||
from atst.utils.flash import formatted_flash as flash
|
from atst.utils.flash import formatted_flash as flash
|
||||||
@ -14,12 +14,10 @@ from atst.utils.flash import formatted_flash as flash
|
|||||||
@user_can(Permissions.VIEW_TASK_ORDER_DETAILS, message="review task order details")
|
@user_can(Permissions.VIEW_TASK_ORDER_DETAILS, message="review task order details")
|
||||||
def review_task_order(task_order_id):
|
def review_task_order(task_order_id):
|
||||||
task_order = TaskOrders.get(task_order_id)
|
task_order = TaskOrders.get(task_order_id)
|
||||||
to_form = TaskOrderForm(number=task_order.number)
|
|
||||||
signature_form = SignatureForm()
|
signature_form = SignatureForm()
|
||||||
return render_template(
|
return render_template(
|
||||||
"portfolios/task_orders/review.html",
|
"portfolios/task_orders/review.html",
|
||||||
task_order=task_order,
|
task_order=task_order,
|
||||||
to_form=to_form,
|
|
||||||
signature_form=signature_form,
|
signature_form=signature_form,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ export default {
|
|||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
valid: false,
|
valid: false,
|
||||||
|
checked: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -17,5 +18,11 @@ export default {
|
|||||||
toggleValid: function() {
|
toggleValid: function() {
|
||||||
this.valid = !this.valid
|
this.valid = !this.valid
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleClose: function() {
|
||||||
|
this.$root.closeModal(this.name)
|
||||||
|
this.checked = false
|
||||||
|
this.valid = false
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,14 @@
|
|||||||
) }}
|
) }}
|
||||||
</label>
|
</label>
|
||||||
<div v-on:change="toggleValid" class="checkbox">
|
<div v-on:change="toggleValid" class="checkbox">
|
||||||
{{ CheckboxInput(field=form.signature) }}
|
<div class='usa-input'>
|
||||||
|
<fieldset data-ally-disabled="true" class="usa-input__choices">
|
||||||
|
<legend>
|
||||||
|
{{ form.signature(**{"v-model": "checked"}) }}
|
||||||
|
{{ form.signature.label | safe }}
|
||||||
|
</legend>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-group">
|
<div class="action-group">
|
||||||
@ -24,7 +31,7 @@
|
|||||||
{{ submit_text }}
|
{{ submit_text }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<button v-on:click="$root.closeModal('{{ modal_id }}')" class="usa-button usa-button-secondary">{{ "common.cancel" | translate }}</button>
|
<button v-on:click="handleClose" class="usa-button usa-button-secondary">{{ "common.cancel" | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</submit-confirmation>
|
</submit-confirmation>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user