Make deadline inconsistent with asap

This commit is contained in:
Tim Van Baak 2020-01-31 16:52:14 -08:00
parent 19263040a9
commit c47208e384
2 changed files with 7 additions and 0 deletions

View File

@ -125,6 +125,10 @@ class LexiconConfigForm(FlaskForm):
# And finally, the submit button
submit = SubmitField("Submit")
def validate_publishDeadlines(form, field):
if form.publishAsap.data:
raise ValidationError('Cannot specify deadline if immediate publishing is enabled')
# TODO add validators that call into extant valid check methods
def set_options(self, lexicon):

View File

@ -84,6 +84,9 @@
{{ form.publishDeadlines(autocomplete="off") }}
{{ form.publishDeadlines.label }}<br>
{{ flag_setting(form.publishAsap) }}
{% for error in form.publishDeadlines.errors %}
<span style="color: #ff0000">{{ error }}</span><br>
{% endfor %}
{{ flag_setting(form.publishBlockOnReady) }}
{{ number_setting(form.publishQuorum) }}
</p>