Remove CSFR from subforms

This commit is contained in:
Tim Van Baak 2021-09-09 18:06:53 -07:00
parent 87531dc8e6
commit cdea172bb5
2 changed files with 5 additions and 1 deletions

View File

@ -59,6 +59,11 @@ def parse_index_type(type_str):
class IndexDefinitionForm(FlaskForm):
"""/lexicon/<name>/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)

View File

@ -105,7 +105,6 @@
<th>Cap</th>
</tr>
{% for index_form in form.indices %}
{{ index_form.hidden_tag() }}
<tr>
<td>{{ index_form.index_type() }}</td>
<td>{{ index_form.pattern() }}</td>