Fix the search button

This commit is contained in:
Stephan Porada 2020-09-08 15:56:02 +02:00
parent d6a19a9d7c
commit 7186f5a777
3 changed files with 26 additions and 33 deletions

View File

@ -12,25 +12,25 @@
padding-bottom: 0px;"> padding-bottom: 0px;">
<!-- Query form --> <!-- Query form -->
<div class="row"> <div class="row">
<form id="query-form"> <form class="col s12" id="query-form">
<div class="col s12 m10"> <div class="row">
<div class="input-field"> <div class="input-field col s12 m10">
<i class="material-icons prefix">search</i> <i class="material-icons prefix">search</i>
{{ query_form.query() }} {{ query_form.query() }}
{{ query_form.query.label }} {{ query_form.query.label }}
<span class="helper-text"> <span class="helper-text">
<a href="http://cwb.sourceforge.net/files/CQP_Tutorial/"> <a href="http://cwb.sourceforge.net/files/CQP_Tutorial/">
<i class="material-icons" style="font-size: inherit;">help <i class="material-icons" style="font-size: inherit;">help
</i> </i>
CQP query language tutorial CQP query language tutorial
</a> </a>
</span> </span>
</div>
</div> </div>
<div class="col s12 m2 right-align"> <div class="col s12 m2 center-align" style="margin-top: 2em;">
<br class="hide-on-small-only"> {{ M.render_field(query_form.submit, material_icon='send',
{{ M.render_field(query_form.submit, material_icon='send') }} style='width:100%;') }}
</div> </div>
</div>
</form> </form>
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
<!-- Modal showing detailed context info for one match. --> <!-- Modal showing detailed context info for one match. -->
<div id="context-modal" class="modal modal-fixed-footer"> <div id="context-modal" class="modal">
<div class="modal-content"> <div class="modal-content">
<form> <form>
<div class="row" style="margin-bottom: 0px; margin-top: -20px;"> <div class="row" style="margin-bottom: 0px; margin-top: -20px;">

View File

@ -77,24 +77,17 @@
{% endmacro %} {% endmacro %}
{% macro render_submit_field(field) %} {% macro render_submit_field(field) %}
<button class="btn waves-effect waves-light" id="{{ field.id }}" name="{{ field.name }}" type="submit" value="{{ field.label.text }}"> <button class="btn waves-effect waves-light"
id="{{ field.id }}"
name="{{ field.name }}"
type="submit"
value="{{ field.label.text }}"
{% if 'style' in kwargs %}
style={{ kwargs.pop('style') }}
{% endif %}>
{{ field.label.text }} {{ field.label.text }}
{% if 'material_icon' in kwargs %} {% if 'material_icon' in kwargs %}
<i class="material-icons right">{{ kwargs.pop('material_icon') }}</i> <i class="material-icons right">{{ kwargs.pop('material_icon') }}</i>
{% endif %} {% endif %}
</button> </button>
{% endmacro %} {% endmacro %}
{# maybe create a modal template later on for actions like delete etc #}
{# {% macro delete_modal_file(file) %}
<div id="delete-corpus-file-{{ file.id }}-modal" class="modal">
<div class="modal-content">
<h4>Confirm corpus file deletion</h4>
<p>Do you really want to delete the corpus file {{ file.filename }}? The file will be permanently deleted!</p>
</div>
<div class="modal-footer">
<a href="#!" class="btn modal-close waves-effect waves-light">Cancel</a>
<a class="btn modal-close red waves-effect waves-light" href="{{ url_for('corpora.delete_corpus_file', corpus_file_id=resource_id, corpus_id=corpus.id) }}"><i class="material-icons left">delete</i>Delete</a>
</div>
</div>
{% endmacro %} #}