mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Subevent creation: Layout issue
This commit is contained in:
@@ -50,6 +50,7 @@ class SubEventItemForm(SubEventItemOrVariationFormMixin, forms.ModelForm):
|
||||
self.fields['price'].widget.attrs['placeholder'] = '{} {}'.format(
|
||||
self.item.default_price, self.item.event.currency
|
||||
)
|
||||
self.fields['price'].label = str(self.item.name)
|
||||
|
||||
class Meta:
|
||||
model = SubEventItem
|
||||
@@ -62,6 +63,7 @@ class SubEventItemVariationForm(SubEventItemOrVariationFormMixin, forms.ModelFor
|
||||
self.fields['price'].widget.attrs['placeholder'] = '{} {}'.format(
|
||||
self.variation.price, self.item.event.currency
|
||||
)
|
||||
self.fields['price'].label = '{} – {}'.format(str(self.item.name), self.variation.value)
|
||||
|
||||
class Meta:
|
||||
model = SubEventItem
|
||||
|
||||
@@ -101,14 +101,7 @@
|
||||
<fieldset>
|
||||
<legend>{% trans "Item prices" %}</legend>
|
||||
{% for f in itemvar_forms %}
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
{{ f.item }}{% if f.variation %} – {{ f.variation }}{% endif %}
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
{% bootstrap_field f.price layout="inline" %}
|
||||
</div>
|
||||
</div>
|
||||
{% bootstrap_field f.price layout='horizontal' %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user