diff --git a/js/components/forms/ccpo_approval.js b/js/components/forms/ccpo_approval.js index a00abde3..f286a594 100644 --- a/js/components/forms/ccpo_approval.js +++ b/js/components/forms/ccpo_approval.js @@ -9,10 +9,14 @@ export default { LocalDatetime }, + props: { + initialState: String + }, + data: function () { return { - approving: false, - denying: false + approving: this.initialState === 'approving', + denying: this.initialState === 'denying' } }, diff --git a/templates/requests/approval.html b/templates/requests/approval.html index 3aacf79e..bd7c99ba 100644 --- a/templates/requests/approval.html +++ b/templates/requests/approval.html @@ -85,7 +85,8 @@
{{ review_form.csrf_token }} - + {% set initialState = 'approving' if review_form.errors else '' %} +
@@ -148,7 +149,7 @@
- +