Skip to content
Snippets Groups Projects
Commit d15c9b85 authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

custom donation page for uniweb pages

parent e81758d8
Branches
No related tags found
2 merge requests!831Fix atom feed,!829Custom donation page for uniweb pages
Pipeline #14857 passed
# Generated by Django 4.1.10 on 2023-09-29 17:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('uniweb', '0049_alter_uniwebcalendarpage_calendar_url_and_more'),
]
operations = [
migrations.AddField(
model_name='uniwebhomepage',
name='donation_page',
field=models.URLField(blank=True, default='https://dary.pirati.cz', null=True, verbose_name='URL pro příjem darů (tlačítko Darovat)'),
),
]
......@@ -374,6 +374,12 @@ class UniwebHomePage(
blank=True,
features=RICH_TEXT_DEFAULT_FEATURES,
)
donation_page = models.URLField(
"URL pro příjem darů (tlačítko Darovat)",
blank=True,
null=True,
default="https://dary.pirati.cz",
)
### PANELS
......@@ -406,6 +412,7 @@ class UniwebHomePage(
FieldPanel("show_pirate_buttons"),
FieldPanel("footer_links"),
FieldPanel("footer_extra_content"),
FieldPanel("donation_page"),
],
"nastavení patičky",
),
......
......@@ -117,7 +117,7 @@
</div>
<div class="flex flex-col md:flex-row lg:flex-col lg:items-end space-y-2 md:space-y-0 md:space-x-2 lg:space-x-0 lg:space-y-2">
{% if page.root_page.show_pirate_buttons %}
<a href="https://dary.pirati.cz" class="btn btn--icon btn--cyan-200 btn--hoveractive text-lg btn--fullwidth sm:btn--autowidth">
<a href="{{ page.root_page.donation_page }}" class="btn btn--icon btn--cyan-200 btn--hoveractive text-lg btn--fullwidth sm:btn--autowidth">
<div class="btn__body-wrap">
<div class="btn__body">Darovat</div>
<div class="btn__icon">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment