Added label 'URL' for external link

- Regression - missing label for external link URL field in link chooser
- Resolves #5656
This commit is contained in:
Stefani Castellanos 2019-10-27 11:01:34 -05:00 committed by LB
parent a459e91692
commit 92864f22b4
4 changed files with 5 additions and 1 deletions

View file

@ -57,6 +57,7 @@ Changelog
* Fix: `DraftailRichTextArea` is no longer treated as a hidden field by Django's form logic (Sergey Fedoseev)
* Fix: Replace format() placeholders in translatable strings with % formatting (Matt Westcott)
* Fix: Altering Django REST Framework's `DEFAULT_AUTHENTICATION_CLASSES` setting no longer breaks the page explorer menu and admin API (Matt Westcott)
* Fix: Regression - missing label for external link URL field in link chooser (Timothy Bautista)
2.6.3 (22.10.2019)

View file

@ -418,6 +418,7 @@ Contributors
* ryanomor
* Thijs Baaijen
* Igor van Spengen
* Timothy Bautista
Translators
===========

View file

@ -78,6 +78,7 @@ Bug fixes
* ``DraftailRichTextArea`` is no longer treated as a hidden field by Django's form logic (Sergey Fedoseev)
* Replace format() placeholders in translatable strings with % formatting (Matt Westcott)
* Altering Django REST Framework's ``DEFAULT_AUTHENTICATION_CLASSES`` setting no longer breaks the page explorer menu and admin API (Matt Westcott)
* Regression - missing label for external link URL field in link chooser (Timothy Bautista)
Upgrade considerations

View file

@ -1,6 +1,7 @@
from django import forms
from django.core import validators
from django.forms.widgets import TextInput
from django.utils.translation import ugettext_lazy as _
class URLOrAbsolutePathValidator(validators.URLValidator):
@ -26,7 +27,7 @@ class URLOrAbsolutePathField(forms.URLField):
class ExternalLinkChooserForm(forms.Form):
url = URLOrAbsolutePathField(required=True, label="")
url = URLOrAbsolutePathField(required=True, label=_("URL"))
link_text = forms.CharField(required=False)