kopia lustrzana https://github.com/wagtail/wagtail
allow wagtailforms field choices to be as long as they want
rodzic
5b72f81327
commit
a2ec49e01a
|
@ -10,6 +10,7 @@ Changelog
|
|||
* Remember tree location in page chooser when switching between Internal / External / Email link (Matt Westcott)
|
||||
* `FieldRowPanel` now creates equal-width columns automatically if `col*` classnames are not specified (Chris Rogers)
|
||||
* Form builder now validates against multiple fields with the same name (Richard McMillan)
|
||||
* The 'choices' field on the form builder no longer has a maximum length (Johannes Spielmann)
|
||||
* Fix: Email templates and document uploader now support custom `STATICFILES_STORAGE` (Jonny Scholes)
|
||||
* Fix: Removed alignment options (deprecated in HTML and not rendered by Wagtail) from `TableBlock` context menu (Moritz Pfeiffer)
|
||||
* Fix: Fixed incorrect CSS path on ModelAdmin's "choose a parent page" view
|
||||
|
|
|
@ -142,6 +142,7 @@ Contributors
|
|||
* Yann Fouillat (Gagaro)
|
||||
* Jonny Scholes
|
||||
* Richard McMillan
|
||||
* Johannes Spielmann
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
@ -20,6 +20,7 @@ Minor features
|
|||
* Remember tree location in page chooser when switching between Internal / External / Email link (Matt Westcott)
|
||||
* ``FieldRowPanel`` now creates equal-width columns automatically if ``col*`` classnames are not specified (Chris Rogers)
|
||||
* Form builder now validates against multiple fields with the same name (Richard McMillan)
|
||||
* The 'choices' field on the form builder no longer has a maximum length (Johannes Spielmann)
|
||||
|
||||
|
||||
Bug fixes
|
||||
|
@ -33,3 +34,7 @@ Bug fixes
|
|||
Upgrade considerations
|
||||
======================
|
||||
|
||||
Form builder ``FormField`` models require a migration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The ``choices`` field on the ``wagtailforms.models.AbstractFormField`` model has been changed from a ``CharField`` to a ``TextField``, to allow it to be of unlimited length. If you are using the ``wagtailforms`` module in your project, you will need to run ``python manage.py makemigrations`` and ``python manage.py migrate`` after upgrading, in order to apply this change to your form page models.
|
||||
|
|
|
@ -280,7 +280,7 @@ class Migration(migrations.Migration):
|
|||
('label', models.CharField(help_text='The label of the form field', max_length=255, verbose_name='label')),
|
||||
('field_type', models.CharField(choices=[('singleline', 'Single line text'), ('multiline', 'Multi-line text'), ('email', 'Email'), ('number', 'Number'), ('url', 'URL'), ('checkbox', 'Checkbox'), ('checkboxes', 'Checkboxes'), ('dropdown', 'Drop down'), ('radio', 'Radio buttons'), ('date', 'Date'), ('datetime', 'Date/time')], max_length=16, verbose_name='field type')),
|
||||
('required', models.BooleanField(default=True, verbose_name='required')),
|
||||
('choices', models.CharField(blank=True, help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.', max_length=512, verbose_name='choices')),
|
||||
('choices', models.TextField(blank=True, help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.', verbose_name='choices')),
|
||||
('default_value', models.CharField(blank=True, help_text='Default value. Comma separated values supported for checkboxes.', max_length=255, verbose_name='default value')),
|
||||
('help_text', models.CharField(blank=True, max_length=255, verbose_name='help text')),
|
||||
],
|
||||
|
|
|
@ -68,9 +68,8 @@ class AbstractFormField(Orderable):
|
|||
)
|
||||
field_type = models.CharField(verbose_name=_('field type'), max_length=16, choices=FORM_FIELD_CHOICES)
|
||||
required = models.BooleanField(verbose_name=_('required'), default=True)
|
||||
choices = models.CharField(
|
||||
choices = models.TextField(
|
||||
verbose_name=_('choices'),
|
||||
max_length=512,
|
||||
blank=True,
|
||||
help_text=_('Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.')
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue