mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 02:24:20 +00:00
Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/nopaque into development
This commit is contained in:
commit
4d0f12129c
@ -12,6 +12,8 @@ class AddCorpusFileForm(FlaskForm):
|
||||
# Required fields
|
||||
author = StringField('Author', validators=[DataRequired(), Length(1, 255)])
|
||||
file = FileField('File', validators=[DataRequired()])
|
||||
publishing_year = IntegerField('Publishing year',
|
||||
validators=[DataRequired()])
|
||||
title = StringField('Title', validators=[DataRequired(), Length(1, 255)])
|
||||
# Optional fields
|
||||
address = StringField('Adress', validators=[Length(0, 255)])
|
||||
@ -22,7 +24,6 @@ class AddCorpusFileForm(FlaskForm):
|
||||
journal = StringField('Journal', validators=[Length(0, 255)])
|
||||
pages = StringField('Pages', validators=[Length(0, 255)])
|
||||
publisher = StringField('Publisher', validators=[Length(0, 255)])
|
||||
publishing_year = IntegerField('Publishing year')
|
||||
school = StringField('School', validators=[Length(0, 255)])
|
||||
submit = SubmitField()
|
||||
|
||||
@ -46,6 +47,8 @@ class EditCorpusFileForm(FlaskForm):
|
||||
'''
|
||||
# Required fields
|
||||
author = StringField('Author', validators=[DataRequired(), Length(1, 255)])
|
||||
publishing_year = IntegerField('Publishing year',
|
||||
validators=[DataRequired()])
|
||||
title = StringField('Title', validators=[DataRequired(), Length(1, 255)])
|
||||
# Optional fields
|
||||
address = StringField('Adress', validators=[Length(0, 255)])
|
||||
@ -56,7 +59,6 @@ class EditCorpusFileForm(FlaskForm):
|
||||
journal = StringField('Journal', validators=[Length(0, 255)])
|
||||
pages = StringField('Pages', validators=[Length(0, 255)])
|
||||
publisher = StringField('Publisher', validators=[Length(0, 255)])
|
||||
publishing_year = IntegerField('Publishing year')
|
||||
school = StringField('School', validators=[Length(0, 255)])
|
||||
submit = SubmitField()
|
||||
|
||||
|
@ -31,6 +31,9 @@
|
||||
<div class="col s12 m4">
|
||||
{{ wtf.render_field(add_corpus_file_form.title, data_length='255', material_icon='title') }}
|
||||
</div>
|
||||
<div class="col s12 m4">
|
||||
{{ wtf.render_field(add_corpus_file_form.publishing_year, material_icon='access_time') }}
|
||||
</div>
|
||||
<div class="col s12">
|
||||
{{ wtf.render_field(add_corpus_file_form.file, accept='.vrt', placeholder='Choose your .vrt file') }}
|
||||
</div>
|
||||
@ -46,7 +49,7 @@
|
||||
<div class="collapsible-header"><i class="material-icons">add</i>Add additional metadata</div>
|
||||
<div class="collapsible-body">
|
||||
{% for field in add_corpus_file_form
|
||||
if field.short_name not in ['author', 'csrf_token', 'file', 'submit', 'title'] %}
|
||||
if field.short_name not in ['author', 'csrf_token', 'file', 'publishing_year', 'submit', 'title'] %}
|
||||
{{ wtf.render_field(field, data_length='255', material_icon=field.label.text[0:1]) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -20,12 +20,15 @@
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
<div class="col s12 m6">
|
||||
<div class="col s12 m4">
|
||||
{{ wtf.render_field(edit_corpus_file_form.author, data_length='255', material_icon='person') }}
|
||||
</div>
|
||||
<div class="col s12 m6">
|
||||
<div class="col s12 m4">
|
||||
{{ wtf.render_field(edit_corpus_file_form.title, data_length='255', material_icon='title') }}
|
||||
</div>
|
||||
<div class="col s12 m4">
|
||||
{{ wtf.render_field(edit_corpus_file_form.publishing_year, material_icon='access_time') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action right-align">
|
||||
@ -38,7 +41,7 @@
|
||||
<div class="collapsible-header"><i class="material-icons">edit</i>Edit additional metadata</div>
|
||||
<div class="collapsible-body">
|
||||
{% for field in edit_corpus_file_form
|
||||
if field.short_name not in ['author', 'csrf_token', 'submit', 'title'] %}
|
||||
if field.short_name not in ['author', 'csrf_token', 'publishing_year', 'submit', 'title'] %}
|
||||
{{ wtf.render_field(field, data_length='255', material_icon=field.label.text[0:1]) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user