Show error on page if submitting an empty comment
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
<article class='col col--grow request-approval'>
|
||||
|
||||
{% if f.errors %}
|
||||
{% if review_form.errors or internal_comment_form.errors %}
|
||||
{{ Alert('There were some errors',
|
||||
message="<p>Please see below.</p>",
|
||||
level='error'
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
<section class='request-approval__review'>
|
||||
<form method="POST" action="{{ url_for("requests.submit_approval", request_id=request.id) }}" autocomplete="off">
|
||||
{{ f.csrf_token }}
|
||||
{{ review_form.csrf_token }}
|
||||
|
||||
<ccpo-approval inline-template>
|
||||
<div>
|
||||
@@ -165,7 +165,7 @@
|
||||
<h3>Message to Requestor <span class='subtitle'>(optional)</span></h3>
|
||||
<div v-if='approving' key='approving' v-cloak>
|
||||
{{ TextInput(
|
||||
f.comment,
|
||||
review_form.comment,
|
||||
label='Approval comments or notes',
|
||||
description='Provide any comments or notes regarding the approval of this request. <strong>This message will be shared with the person making the JEDI request.</strong>.',
|
||||
paragraph=True,
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
<div v-else key='denying' v-cloak>
|
||||
{{ TextInput(
|
||||
f.comment,
|
||||
review_form.comment,
|
||||
label='Revision instructions or notes',
|
||||
paragraph=True,
|
||||
noMaxWidth=True
|
||||
@@ -194,21 +194,21 @@
|
||||
|
||||
<div class='form-row'>
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(f.fname_mao, placeholder="First name of mission authorizing official") }}
|
||||
{{ TextInput(review_form.fname_mao, placeholder="First name of mission authorizing official") }}
|
||||
</div>
|
||||
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(f.lname_mao, placeholder="Last name of mission authorizing official") }}
|
||||
{{ TextInput(review_form.lname_mao, placeholder="Last name of mission authorizing official") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='form-row'>
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(f.email_mao, placeholder="name@mail.mil", validation='email') }}
|
||||
{{ TextInput(review_form.email_mao, placeholder="name@mail.mil", validation='email') }}
|
||||
</div>
|
||||
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(f.phone_mao, placeholder="(123) 456-7890", validation='usPhone') }}
|
||||
{{ TextInput(review_form.phone_mao, placeholder="(123) 456-7890", validation='usPhone') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -218,11 +218,11 @@
|
||||
|
||||
<div class='form-row'>
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(f.fname_ccpo, placeholder="First name of CCPO authorizing official") }}
|
||||
{{ TextInput(review_form.fname_ccpo, placeholder="First name of CCPO authorizing official") }}
|
||||
</div>
|
||||
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(f.lname_ccpo, placeholder="Last name of CCPO authorizing official") }}
|
||||
{{ TextInput(review_form.lname_ccpo, placeholder="Last name of CCPO authorizing official") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user