diff --git a/amanuensis/server/lexicon/settings/forms.py b/amanuensis/server/lexicon/settings/forms.py index 6b0f10c..74c424f 100644 --- a/amanuensis/server/lexicon/settings/forms.py +++ b/amanuensis/server/lexicon/settings/forms.py @@ -59,6 +59,11 @@ def parse_index_type(type_str): class IndexDefinitionForm(FlaskForm): """/lexicon//settings/index/""" + class Meta: + # Disable CSRF on the individual index definitions, since the schema + # form will have one + csrf = False + TYPE_CHOICES = ([("", "")] + [(str(t), str(t).lower()) for t in IndexType]) index_type = SelectField(choices=TYPE_CHOICES, coerce=parse_index_type) diff --git a/amanuensis/server/lexicon/settings/settings.jinja b/amanuensis/server/lexicon/settings/settings.jinja index 1e4eecd..c9a9faf 100644 --- a/amanuensis/server/lexicon/settings/settings.jinja +++ b/amanuensis/server/lexicon/settings/settings.jinja @@ -105,7 +105,6 @@ Cap {% for index_form in form.indices %} - {{ index_form.hidden_tag() }} {{ index_form.index_type() }} {{ index_form.pattern() }}