Skip to content

Commit

Permalink
Merge pull request #1527 from digitalfabrik/bugfix/fix_save_button_align
Browse files Browse the repository at this point in the history
Fix horizontal align of page form save buttons
  • Loading branch information
david-venhoff authored Jun 7, 2022
2 parents c79a54f + dd9d99e commit 1b78f77
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
UNRELEASED
----------

* [ [#1516](https://github.com/digitalfabrik/integreat-cms/issues/1516) ] Fix save buttons alignment


2022.6.0
--------
Expand Down
4 changes: 2 additions & 2 deletions integreat_cms/cms/templates/events/event_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% get_current_language as LANGUAGE_CODE %}
{% get_language LANGUAGE_CODE as current_language %}
<div class="flex flex-wrap justify-between gap-4 mb-4">
<h1 class="heading">
<h1 class="heading overflow-hidden text-ellipsis">
{% if event_form.instance.id %}
{% if event_translation_form.instance.id %}
{% with event_translation_form.instance.title as event_title %}
Expand All @@ -36,7 +36,7 @@ <h1 class="heading">
</h1>
{% if perms.cms.change_event %}
{% if not event_form.instance.id or not event_form.instance.archived %}
<div class="flex flex-wrap gap-4">
<div class="flex flex-wrap gap-4 ml-auto mr-0">
<button name="submit_draft" class="btn btn-gray">{% trans 'Save as draft' %}</button>
{% if perms.cms.publish_event %}
<button name="submit_public" class="btn">
Expand Down
4 changes: 2 additions & 2 deletions integreat_cms/cms/templates/languages/language_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<form method="post" data-unsaved-warning>
{% csrf_token %}
<div class="flex flex-wrap mb-4 justify-between">
<h1 class="heading">
<h1 class="heading overflow-hidden text-ellipsis">
{% if form.instance.id %}
{% with form.instance.translated_name as translated_language_name %}
{% blocktrans %}Edit language "{{ translated_language_name }}"{% endblocktrans %}
Expand All @@ -16,7 +16,7 @@ <h1 class="heading">
{% endif %}
</h1>
{% if perms.cms.change_language %}
<button class="btn">{% trans 'Save' %}</button>
<button class="btn ml-auto mr-0">{% trans 'Save' %}</button>
{% endif %}
</div>

Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/templates/pages/_page_order_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load content_filters %}
{% load page_filters %}
<div class="table-listing">
<table data-activate-page-order class="w-full mt-4 rounded border border-solid border-gray-200 shadow bg-white table-auto cursor-default">
<table data-activate-page-order class="w-full mt-4 rounded border border-solid border-gray-200 shadow bg-white table-auto cursor-default break-all">
<tbody>
{% for sibling in siblings %}
{% if sibling == page %}
Expand Down
4 changes: 2 additions & 2 deletions integreat_cms/cms/templates/pages/page_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
data-unsaved-warning>
{% csrf_token %}
<div class="w-full flex flex-wrap justify-between mb-6">
<h1 class="heading">
<h1 class="heading overflow-hidden text-ellipsis">
{% if page %}
{% if page_translation_form.instance.id %}
{% with page_translation_form.instance.title as page_title %}
Expand All @@ -37,7 +37,7 @@ <h1 class="heading">
{% endif %}
</h1>
{% if not page_form.instance.id or not page_form.instance.archived %}
<div class="flex flex-wrap gap-4">
<div class="flex flex-wrap gap-4 ml-auto mr-0">
<button
name="preview_page"
type="button"
Expand Down
4 changes: 2 additions & 2 deletions integreat_cms/cms/templates/pois/poi_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
data-unsaved-warning>
{% csrf_token %}
<div class="w-full flex flex-wrap justify-between mb-4">
<h1 class="heading">
<h1 class="heading overflow-hidden text-ellipsis">
{% if poi_form.instance.id %}
{% if poi_translation_form.instance.id %}
{% with poi_translation_form.instance.title as poi_title %}
Expand All @@ -31,7 +31,7 @@ <h1 class="heading">
{% endif %}
</h1>
{% if not poi_form.instance.archived and perms.cms.change_poi %}
<div class="flex flex-wrap gap-4">
<div class="flex flex-wrap gap-4 ml-auto mr-0">
<button name="submit_draft" class="btn btn-gray">{% trans 'Save as draft' %}</button>
<button name="submit_public" class="btn">
{% if poi_translation_form.instance.status == PUBLIC %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% csrf_token %}
<div class="flex flex-wrap">
<div class="w-full flex flex-wrap justify-between gap-4 mb-6">
<h1 class="heading">
<h1 class="heading overflow-hidden text-ellipsis">
{% if push_notification_form.instance.id %}
{% with push_notification_form.instance as push_notification_title %}
{% blocktrans %}Edit news message "{{ push_notification_title }}"{% endblocktrans %}
Expand All @@ -18,7 +18,7 @@ <h1 class="heading">
{% trans 'Create news message' %}
{% endif %}
</h1>
<div class="flex flex-wrap gap-4">
<div class="flex flex-wrap gap-4 ml-auto mr-0">
{% if perms.cms.change_pushnotification %}
<button name="submit_save" class="btn btn-gray">{% trans 'Save' %}</button>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions integreat_cms/cms/templates/regions/region_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<form enctype="multipart/form-data" method="post" data-unsaved-warning>
{% csrf_token %}
<div class="flex flex-wrap justify-between mb-4">
<h1 class="heading">
<h1 class="heading overflow-hidden text-ellipsis">
{% if form.initial %}
{% with form.name.value as region_name %}
{% blocktrans %}Edit region "{{ region_name }}"{% endblocktrans %}
Expand All @@ -18,7 +18,7 @@ <h1 class="heading">
{% endif %}
</h1>
{% if perms.cms.change_region %}
<button class="btn">{% trans 'Save' %}</button>
<button class="btn ml-auto mr-0">{% trans 'Save' %}</button>
{% endif %}
</div>

Expand Down
2 changes: 1 addition & 1 deletion integreat_cms/cms/templates/users/user_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<form method="post" data-unsaved-warning>
{% csrf_token %}
<div class="flex justify-between mb-4">
<h1 class="heading">
<h1 class="heading overflow-hidden text-ellipsis">
{% if user_form.instance.id %}
{% with user_form.username.value as user_name %}
{% blocktrans %}Edit user "{{ user_name }}"{% endblocktrans %}
Expand Down

0 comments on commit 1b78f77

Please sign in to comment.