Remove CSFR from subforms
This commit is contained in:
parent
87531dc8e6
commit
cdea172bb5
|
@ -59,6 +59,11 @@ def parse_index_type(type_str):
|
||||||
class IndexDefinitionForm(FlaskForm):
|
class IndexDefinitionForm(FlaskForm):
|
||||||
"""/lexicon/<name>/settings/index/"""
|
"""/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])
|
TYPE_CHOICES = ([("", "")] + [(str(t), str(t).lower()) for t in IndexType])
|
||||||
|
|
||||||
index_type = SelectField(choices=TYPE_CHOICES, coerce=parse_index_type)
|
index_type = SelectField(choices=TYPE_CHOICES, coerce=parse_index_type)
|
||||||
|
|
|
@ -105,7 +105,6 @@
|
||||||
<th>Cap</th>
|
<th>Cap</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for index_form in form.indices %}
|
{% for index_form in form.indices %}
|
||||||
{{ index_form.hidden_tag() }}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ index_form.index_type() }}</td>
|
<td>{{ index_form.index_type() }}</td>
|
||||||
<td>{{ index_form.pattern() }}</td>
|
<td>{{ index_form.pattern() }}</td>
|
||||||
|
|
Loading…
Reference in New Issue