Compare commits

...

2 Commits

Author SHA1 Message Date
Mira Weller
0fb4fea7bf Don't use an arrow icon for calendar navigation submit button 2026-03-25 13:37:33 +01:00
Raphael Michel
a71efa6747 Event settings: Workaround for Django 5.2 change (#6025) 2026-03-24 22:00:05 +01:00
6 changed files with 13 additions and 6 deletions

View File

@@ -34,6 +34,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under the License.
from dataclasses import dataclass
from decimal import Decimal
from urllib.parse import urlencode
from zoneinfo import ZoneInfo
@@ -578,6 +579,12 @@ class EventSettingsValidationMixin:
del self.cleaned_data[field]
@dataclass
class FontOption:
title: str
data: str
class EventSettingsForm(EventSettingsValidationMixin, FormPlaceholderMixin, SettingsForm):
timezone = forms.ChoiceField(
choices=((a, a) for a in common_timezones),
@@ -729,7 +736,7 @@ class EventSettingsForm(EventSettingsValidationMixin, FormPlaceholderMixin, Sett
del self.fields['event_list_filters']
del self.fields['event_calendar_future_only']
self.fields['primary_font'].choices = [('Open Sans', 'Open Sans')] + sorted([
(a, {"title": a, "data": v}) for a, v in get_fonts(self.event, pdf_support_required=False).items()
(a, FontOption(title=a, data=v)) for a, v in get_fonts(self.event, pdf_support_required=False).items()
], key=lambda a: a[0])
# create "virtual" fields for better UX when editing <name>_asked and <name>_required fields

View File

@@ -37,7 +37,7 @@
</select>
<span class="input-group-btn">
<button type="submit" class="btn btn-default" aria-label="{% trans "Show month" %}">
{% icon "chevron-right" %}
{% icon "check" %}
</button>
</span>
</div>

View File

@@ -41,7 +41,7 @@
</select>
<span class="input-group-btn">
<button type="submit" class="btn btn-default" aria-label="{% trans "Show week" %}">
{% icon "chevron-right" %}
{% icon "check" %}
</button>
</span>
</div>

View File

@@ -69,7 +69,7 @@
</select>
<span class="input-group-btn">
<button type="submit" class="btn btn-default" aria-label="{% trans "Show month" %}">
{% icon "chevron-right" %}
{% icon "check" %}
</button>
</span>
</div>

View File

@@ -61,7 +61,7 @@
<input class="datepickerfield form-control" id="calendar-input-date" value="{{ date|date:"SHORT_DATE_FORMAT" }}" name="date">
<span class="input-group-btn">
<button type="submit" class="btn btn-default" aria-label="{% trans "Show date" %}">
{% icon "chevron-right" %}
{% icon "check" %}
</button>
</span>
</div>

View File

@@ -73,7 +73,7 @@
</select>
<span class="input-group-btn">
<button type="submit" class="btn btn-default" aria-label="{% trans "Show week" %}">
{% icon "chevron-right" %}
{% icon "check" %}
</button>
</span>
</div>