Skip to content

Commit

Permalink
Remove _simple suffix from form field template macros
Browse files Browse the repository at this point in the history
  • Loading branch information
homeworkprod committed May 28, 2021
1 parent a7bd946 commit d9acfce
Show file tree
Hide file tree
Showing 79 changed files with 315 additions and 315 deletions.
@@ -1,5 +1,5 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/forms.html' import form_buttons, form_field_check_simple, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field_check, form_field %}
{% from 'macros/misc.html' import render_notification %}
{% set current_page = 'authentication_login' %}
{% set title = _('Login') %}
Expand Down Expand Up @@ -27,9 +27,9 @@
<h1>{{ title }}</h1>

<form action="{{ url_for('.login') }}" method="post" id="login-form">
{{ form_field_simple(form.screen_name, maxlength=40, autofocus='autofocus') }}
{{ form_field_simple(form.password, maxlength=40) }}
{{ form_field_check_simple(form.permanent, _('permanently stay logged in')) }}
{{ form_field(form.screen_name, maxlength=40, autofocus='autofocus') }}
{{ form_field(form.password, maxlength=40) }}
{{ form_field_check(form.permanent, _('permanently stay logged in')) }}

<div id="login-failed-notice" class="hidden">
{{ render_notification(_('Login failed.'), category='danger', icon='warning') }}
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'board_admin' %}
{% set current_page_brand = brand %}
Expand All @@ -15,7 +15,7 @@
<h1>{{ render_icon('add') }} {{ title }}</h1>

<form action="{{ url_for('.board_create', brand_id=brand.id) }}" method="post">
{{ form_field_simple(form.board_id, maxlength=40, placeholder=brand.id, autofocus='autofocus') }}
{{ form_field(form.board_id, maxlength=40, placeholder=brand.id, autofocus='autofocus') }}

<p>Ein Forum kann sowohl für eine einzelne Party als auch für mehrere oder alle Partys derselben Marke genutzt werden.</p>
<p>Tipp: Sofern das Forum nur für eine konkrete Party genutzt werden soll, verwende die ID <em>dieser Party</em> als ID für das Forum. Falls es jedoch partyübergreifend genutzt werden soll, verwende die ID <em>der Marke</em> der Partys als ID für das Forum.</p>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'board_admin' %}
{% set current_page_brand = brand %}
Expand All @@ -15,9 +15,9 @@
<h1>{{ render_icon('add') }} {{ title }}</h1>

<form action="{{ url_for('.category_create', board_id=board.id) }}" method="post">
{{ form_field_simple(form.slug, maxlength=40, autofocus='autofocus') }}
{{ form_field_simple(form.title, maxlength=40) }}
{{ form_field_simple(form.description, maxlength=80) }}
{{ form_field(form.slug, maxlength=40, autofocus='autofocus') }}
{{ form_field(form.title, maxlength=40) }}
{{ form_field(form.description, maxlength=80) }}

{{ form_buttons(_('Create')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'board_admin' %}
{% set current_page_brand = brand %}
Expand All @@ -15,9 +15,9 @@
<h1>{{ render_icon('edit') }} {{ title }}</h1>

<form action="{{ url_for('.category_update', category_id=category.id) }}" method="post">
{{ form_field_simple(form.slug, maxlength=40, autofocus='autofocus') }}
{{ form_field_simple(form.title, maxlength=40) }}
{{ form_field_simple(form.description, maxlength=80) }}
{{ form_field(form.slug, maxlength=40, autofocus='autofocus') }}
{{ form_field(form.title, maxlength=40) }}
{{ form_field(form.description, maxlength=80) }}

{{ form_buttons(_('Save')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'brands_admin' %}
{% set title = _('Create Brand') %}
Expand All @@ -14,8 +14,8 @@
<h1>{{ render_icon('add') }} {{ title }}</h1>

<form action="{{ url_for('.create') }}" method="post">
{{ form_field_simple(form.id, maxlength=40, placeholder='superlan', autofocus='autofocus') }}
{{ form_field_simple(form.title, maxlength=40, placeholder='SuperLAN') }}
{{ form_field(form.id, maxlength=40, placeholder='superlan', autofocus='autofocus') }}
{{ form_field(form.title, maxlength=40, placeholder='SuperLAN') }}

{{ form_buttons(_('Create')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'brand_admin' %}
{% set current_page_brand = brand %}
Expand All @@ -15,9 +15,9 @@
<h1>{{ render_icon('edit') }} {{ title }}</h1>

<form action="{{ url_for('.email_config_update', brand_id=brand.id) }}" method="post">
{{ form_field_simple(form.sender_address, autofocus='autofocus') }}
{{ form_field_simple(form.sender_name) }}
{{ form_field_simple(form.contact_address) }}
{{ form_field(form.sender_address, autofocus='autofocus') }}
{{ form_field(form.sender_name) }}
{{ form_field(form.contact_address) }}

{{ form_buttons(_('Save')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_check_simple, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field_check, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'brands_admin' %}
{% set current_page_brand = brand %}
Expand All @@ -15,9 +15,9 @@
<h1>{{ render_icon('edit') }} {{ title }}</h1>

<form action="{{ url_for('.update', brand_id=brand.id) }}" method="post">
{{ form_field_simple(form.title, maxlength=40, autofocus='autofocus') }}
{{ form_field_simple(form.image_filename) }}
{{ form_field_check_simple(form.archived) }}
{{ form_field(form.title, maxlength=40, autofocus='autofocus') }}
{{ form_field(form.image_filename) }}
{{ form_field_check(form.archived) }}

{{ form_buttons(_('Save')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'news_admin' %}
{% set current_page_brand = brand %}
Expand All @@ -15,8 +15,8 @@
<h1>{{ render_icon('add') }} {{ title }}</h1>

<form action="{{ url_for('.channel_create', brand_id=brand.id) }}" method="post">
{{ form_field_simple(form.channel_id, maxlength=40, placeholder=brand.id, autofocus='autofocus') }}
{{ form_field_simple(form.url_prefix, maxlength=80, placeholder='https://www.example.com/news/') }}
{{ form_field(form.channel_id, maxlength=40, placeholder=brand.id, autofocus='autofocus') }}
{{ form_field(form.url_prefix, maxlength=80, placeholder='https://www.example.com/news/') }}

<p>Ein News-Kanal kann sowohl für eine einzelne Party als auch für mehrere oder alle Partys derselben Marke genutzt werden.</p>
<p>Tipp: Sofern der News-Kanal nur für eine konkrete Party genutzt werden soll, verwende die ID <em>dieser Party</em> als ID für den News-Kanal. Falls er jedoch partyübergreifend genutzt werden soll, verwende die ID <em>der Marke</em> der Partys als ID für den News-Kanal.</p>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'news_admin' %}
{% set current_page_brand = brand %}
Expand All @@ -21,11 +21,11 @@ <h1>{{ render_icon('add') }} {{ title }}</h1>
Maximale Bildgröße: {{ maximum_dimensions|join(' &times; ')|safe }} Pixel<br>
Maximale Dateigröße: 150 KB
{%- endset %}
{{ form_field_simple(form.image, maxlength=150000, accept='image/*', autofocus='autofocus', note=note) }}
{{ form_field(form.image, maxlength=150000, accept='image/*', autofocus='autofocus', note=note) }}
{%- endwith %}
{{ form_field_simple(form.alt_text) }}
{{ form_field_simple(form.caption) }}
{{ form_field_simple(form.attribution) }}
{{ form_field(form.alt_text) }}
{{ form_field(form.caption) }}
{{ form_field(form.attribution) }}

{{ form_buttons(_('Add')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'news_admin' %}
{% set current_page_brand = item.brand %}
Expand All @@ -15,9 +15,9 @@
<h1>{{ render_icon('edit') }} {{ title }}</h1>

<form action="{{ url_for('.image_update', image_id=image.id) }}" method="post">
{{ form_field_simple(form.alt_text, autofocus='autofocus') }}
{{ form_field_simple(form.caption) }}
{{ form_field_simple(form.attribution) }}
{{ form_field(form.alt_text, autofocus='autofocus') }}
{{ form_field(form.caption) }}
{{ form_field(form.attribution) }}

{{ form_buttons(_('Save')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'news_admin' %}
{% set current_page_brand = brand %}
Expand All @@ -15,10 +15,10 @@
<h1>{{ render_icon('add') }} {{ title }}</h1>

<form action="{{ url_for('.item_create', channel_id=channel.id) }}" method="post">
{{ form_field_simple(form.slug, maxlength=80, autofocus='autofocus') }}
{{ form_field_simple(form.title, maxlength=80) }}
{{ form_field_simple(form.body, class='monospace') }}
{{ form_field_simple(form.image_url_path, maxlength=80) }}
{{ form_field(form.slug, maxlength=80, autofocus='autofocus') }}
{{ form_field(form.title, maxlength=80) }}
{{ form_field(form.body, class='monospace') }}
{{ form_field(form.image_url_path, maxlength=80) }}

{{ form_buttons(_('Create draft')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'news_admin' %}
{% set current_page_brand = item.brand %}
Expand All @@ -17,10 +17,10 @@ <h1>{{ render_icon('published') }} {{ title }}</h1>
<form action="{{ url_for('.item_publish_later', item_id=item.id) }}" method="post">
<div class="row">
<div class="column-auto">
{{ form_field_simple(form.publish_on, autofocus='autofocus') }}
{{ form_field(form.publish_on, autofocus='autofocus') }}
</div>
<div class="column-auto">
{{ form_field_simple(form.publish_at) }}
{{ form_field(form.publish_at) }}
</div>
</div>

Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'news_admin' %}
{% set current_page_brand = item.brand %}
Expand All @@ -15,10 +15,10 @@
<h1>{{ render_icon('edit') }} {{ title }}</h1>

<form action="{{ url_for('.item_update', item_id=item.id) }}" method="post">
{{ form_field_simple(form.slug, maxlength=100, note='<strong>Achtung:</strong> Eine Änderung des Slugs wirkt sich auf den Permalink der News aus!') }}
{{ form_field_simple(form.title, maxlength=100, autofocus='autofocus') }}
{{ form_field_simple(form.body, class='monospace') }}
{{ form_field_simple(form.image_url_path, maxlength=100) }}
{{ form_field(form.slug, maxlength=100, note='<strong>Achtung:</strong> Eine Änderung des Slugs wirkt sich auf den Permalink der News aus!') }}
{{ form_field(form.title, maxlength=100, autofocus='autofocus') }}
{{ form_field(form.body, class='monospace') }}
{{ form_field(form.image_url_path, maxlength=100) }}

{{ form_buttons(_('Save')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'orga_admin' %}
{% set current_page_brand = brand %}
Expand All @@ -15,7 +15,7 @@
<h1>{{ render_icon('add') }} {{ title }}</h1>

<form action="{{ url_for('.create_orgaflag', brand_id=brand.id) }}" method="post">
{{ form_field_simple(form.user, maxlength=36, autofocus='autofocus') }}
{{ form_field(form.user, maxlength=36, autofocus='autofocus') }}

{{ form_buttons(_('Save')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/misc.html' import render_notification %}
{% set current_page = 'orga_team_admin.teams' %}
{% set current_page_party = party %}
Expand All @@ -16,8 +16,8 @@ <h1>{{ title }}</h1>

{%- if unassigned_orgas_available %}
<form action="{{ url_for('.membership_create', team_id=team.id) }}" method="post">
{{ form_field_simple(form.user_id, autofocus='autofocus') }}
{{ form_field_simple(form.duties, maxlength=40) }}
{{ form_field(form.user_id, autofocus='autofocus') }}
{{ form_field(form.duties, maxlength=40) }}

{{ form_buttons(_('Save')) }}
</form>
Expand Down
@@ -1,7 +1,7 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/admin/user.html' import render_user_avatar_20_and_admin_link %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% set current_page = 'orga_team_admin.teams' %}
{% set current_page_party = party %}
{% set title = 'Orga-Team-Mitgliedschaft bearbeiten' %}
Expand All @@ -21,8 +21,8 @@ <h1>{{ title }}</h1>
{{ render_user_avatar_20_and_admin_link(user) }}
</div>
</div>
{{ form_field_simple(form.orga_team_id, autofocus='autofocus') }}
{{ form_field_simple(form.duties, maxlength=40) }}
{{ form_field(form.orga_team_id, autofocus='autofocus') }}
{{ form_field(form.duties, maxlength=40) }}

{{ form_buttons(_('Save')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% from 'macros/icons.html' import render_icon %}
{% set current_page = 'orga_team_admin.teams' %}
{% set current_page_party = party %}
Expand All @@ -15,7 +15,7 @@
<h1>{{ render_icon('add') }} {{ title }}</h1>

<form action="{{ url_for('.team_create', party_id=party.id) }}" method="post">
{{ form_field_simple(form.title, maxlength=40, autofocus='autofocus') }}
{{ form_field(form.title, maxlength=40, autofocus='autofocus') }}

{{ form_buttons(_('Create')) }}
</form>
Expand Down
@@ -1,6 +1,6 @@
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_simple %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% set current_page = 'orga_team_admin.teams' %}
{% set current_page_party = party %}
{% set title = 'Orga-Teams kopieren' %}
Expand All @@ -14,7 +14,7 @@
<h1>Orga-Teams von anderer Party kopieren</h1>

<form action="{{ url_for('.teams_copy', target_party_id=party.id) }}" method="post">
{{ form_field_simple(form.party_id, autofocus='autofocus') }}
{{ form_field(form.party_id, autofocus='autofocus') }}

{{ form_buttons(_('Copy')) }}
</form>
Expand Down

0 comments on commit d9acfce

Please sign in to comment.