Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hint about icon aspect ratio to POI form #1890

Merged
merged 1 commit into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions integreat_cms/cms/migrations/0052_alter_poi_icon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 3.2.16 on 2022-11-22 21:31

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
"""
Add help text to POI icon field
"""

dependencies = [
("cms", "0051_rename_farsi_flag"),
]

operations = [
migrations.AlterField(
model_name="poi",
name="icon",
field=models.ForeignKey(
blank=True,
help_text="The best results are achieved with images in 16:9 aspect ratio.",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="pois",
to="cms.mediafile",
verbose_name="icon",
),
),
]
1 change: 1 addition & 0 deletions integreat_cms/cms/models/pois/poi.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class POI(AbstractContentModel):
on_delete=models.SET_NULL,
blank=True,
null=True,
help_text=_("The best results are achieved with images in 16:9 aspect ratio."),
)
archived = models.BooleanField(
default=False,
Expand Down
8 changes: 4 additions & 4 deletions integreat_cms/cms/templates/pois/poi_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,10 @@ <h3 class="heading font-bold text-black">
{{ poi_form.icon.label }}
</h3>
</div>
<div class="w-full px-4 pb-4 rounded shadow bg-white">
<label for="{{ poi_form.icon.id_for_label }}">
{{ poi_form.icon.label }}
</label>
<div class="w-full p-4 rounded shadow bg-white">
<div class="help-text">
{{ poi_form.icon.help_text }}
</div>
{% render_field poi_form.icon label=poi_form.icon.label %}
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions integreat_cms/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -2906,6 +2906,11 @@ msgstr "Diesen Ort auf Karte zeigen"
msgid "Tick if you want to show this location on map"
msgstr "Kreuzen Sie an, wenn dieser Ort auf der Karte gezeigt werden soll."

#: cms/models/pois/poi.py
msgid "The best results are achieved with images in 16:9 aspect ratio."
msgstr ""
"Die besten Ergebnisse erzielen Sie mit Bildern im Seitenverhältnis 16:9."

#: cms/models/pois/poi.py
msgid "Whether or not the location is read-only and hidden in the API."
msgstr "Ob der Ort schreibgeschützt und in der API verborgen ist oder nicht."
Expand Down