add all files for last commit

This commit is contained in:
Patrick Jentsch
2022-11-29 15:28:10 +01:00
parent 5864aa653e
commit 5491cb184a
8 changed files with 130 additions and 44 deletions

View File

@ -46,13 +46,13 @@
}
// Set the data-length attribute on inputs with the maxlength attribute
for (let inputElement of document.querySelectorAll('input[maxlength]')) {
for (let inputElement of document.querySelectorAll('input[maxlength], textarea[maxlength]')) {
inputElement.dataset.length = inputElement.getAttribute('maxlength');
}
// Initialize components
M.AutoInit();
M.CharacterCounter.init(document.querySelectorAll('input[data-length][type="text"], input[data-length][type="email"], input[data-length][type="search"], input[data-length][type="password"], input[data-length][type="tel"], input[data-length][type="url"]'));
M.CharacterCounter.init(document.querySelectorAll('input[data-length][type="text"], input[data-length][type="email"], input[data-length][type="search"], input[data-length][type="password"], input[data-length][type="tel"], input[data-length][type="url"], textarea[data-length]'));
M.Dropdown.init(
document.querySelectorAll('#nav-more-dropdown-trigger'),
{alignment: 'right', constrainWidth: false, coverTrigger: false}

View File

@ -9,28 +9,19 @@
<div class="row">
<div class="col s12">
<h1 id="title">{{ title }}</h1>
<p>Here you can create a new corpus, just choose a title and a description which will help to identify it later. After the corpus has been created, annotated texts in <i>verticalized text format</i> can be added to it on the corpus overview page.</p>
</div>
<div class="col s12 m4">
<p>Fill out the following form to add a corpus to your corpora.</p>
<a class="waves-effect waves-light btn" href="{{ url_for('main.dashboard') }}"><i class="material-icons left">arrow_back</i>Back to dashboard</a>
</div>
<div class="col s12 m8">
<div class="col s12">
<div class="card">
<form method="POST">
<div class="card-content">
{{ form.hidden_tag() }}
<div class="row">
<div class="col s12 m4">
{{ wtf.render_field(form.title, material_icon='title') }}
</div>
<div class="col s12 m8">
{{ wtf.render_field(form.description, material_icon='description') }}
</div>
</div>
{{ wtf.render_field(form.title, material_icon='title') }}
{{ wtf.render_field(form.description, material_icon='description') }}
</div>
<div class="card-action right-align">
<a class="waves-effect waves-light btn red" href="{{ url_for('main.dashboard', _anchor='corpora') }}"><i class="material-icons left">close</i>Cancel</a>
{{ wtf.render_field(form.submit, material_icon='send') }}
</div>
</form>

View File

@ -36,6 +36,7 @@
</div>
</div>
<div class="card-action right-align">
<a class="waves-effect waves-light btn red" href="{{ url_for('.corpus', corpus_id=corpus.id) }}"><i class="material-icons left">close</i>Cancel</a>
{{ wtf.render_field(form.submit, material_icon='send') }}
</div>
</div>