mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Add comment field to subevents (Z#23148472) (#4099)
* Add comment field to subevents (Z#23148472) * Review fix
This commit is contained in:
@@ -1231,7 +1231,7 @@ class SubEventFilterForm(FilterForm):
|
||||
if fdata.get('query'):
|
||||
query = fdata.get('query')
|
||||
qs = qs.filter(
|
||||
Q(name__icontains=i18ncomp(query)) | Q(location__icontains=query)
|
||||
Q(name__icontains=i18ncomp(query)) | Q(location__icontains=query) | Q(comment__icontains=query)
|
||||
)
|
||||
|
||||
if fdata.get('date_until'):
|
||||
|
||||
@@ -68,6 +68,7 @@ class SubEventForm(I18nModelForm):
|
||||
'presale_end',
|
||||
'location',
|
||||
'frontpage_text',
|
||||
'comment',
|
||||
'geo_lat',
|
||||
'geo_lon',
|
||||
]
|
||||
@@ -136,7 +137,7 @@ class SubEventBulkEditForm(I18nModelForm):
|
||||
self.fields[k].widget.attrs['placeholder'] = ''
|
||||
self.fields[k].one_required = False
|
||||
|
||||
for k in ('geo_lat', 'geo_lon'):
|
||||
for k in ('geo_lat', 'geo_lon', 'comment'):
|
||||
# scalar fields
|
||||
if k in self.mixed_values:
|
||||
self.fields[k].widget.attrs['placeholder'] = '[{}]'.format(_('Selection contains various values'))
|
||||
@@ -166,6 +167,7 @@ class SubEventBulkEditForm(I18nModelForm):
|
||||
'name',
|
||||
'location',
|
||||
'frontpage_text',
|
||||
'comment',
|
||||
'geo_lat',
|
||||
'geo_lon',
|
||||
'is_public',
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
</div>
|
||||
{% bootstrap_field form.frontpage_text layout="bulkedit" %}
|
||||
{% bootstrap_field form.is_public layout="bulkedit" %}
|
||||
{% bootstrap_field form.comment layout="bulkedit" %}
|
||||
{% if meta_forms %}
|
||||
<div class="form-group metadata-group">
|
||||
<label class="col-md-3 control-label">{% trans "Meta data" %}</label>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
{% bootstrap_field form.date_admission layout="control" %}
|
||||
{% bootstrap_field form.frontpage_text layout="control" %}
|
||||
{% bootstrap_field form.is_public layout="control" %}
|
||||
{% bootstrap_field form.comment layout="control" %}
|
||||
{% if meta_forms %}
|
||||
<div class="form-group metadata-group">
|
||||
<label class="col-md-3 control-label">{% trans "Meta data" %}</label>
|
||||
|
||||
@@ -138,6 +138,9 @@
|
||||
<small class="text-muted">· {{ k }}: {{ v }}</small>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if s.comment %}
|
||||
<br>{{ s.comment|linebreaksbr }}
|
||||
{% endif %}
|
||||
</small>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -1440,6 +1440,7 @@ class SubEventBulkEdit(SubEventQueryMixin, EventPermissionRequiredMixin, FormVie
|
||||
'name',
|
||||
'location',
|
||||
'frontpage_text',
|
||||
'comment',
|
||||
'geo_lat',
|
||||
'geo_lon',
|
||||
'is_public',
|
||||
|
||||
Reference in New Issue
Block a user