Skip to content

Commit

Permalink
Update organization help text (#11481)
Browse files Browse the repository at this point in the history
* Update email helptext

* Update organization help text

Fixes readthedocs/readthedocs-corporate#213

* Add placeholders
  • Loading branch information
ericholscher authored Jul 18, 2024
1 parent 0c92505 commit bf02353
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 11 deletions.
16 changes: 9 additions & 7 deletions readthedocs/organizations/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ class Meta:
"name": _("Organization Name"),
"email": _("Billing Email"),
}

# Don't use a URLField as a widget, the validation is too strict on FF
url = forms.URLField(
widget=forms.TextInput(attrs={"placeholder": "http://"}),
label=_("Site URL"),
required=False,
)
widgets = {
"email": forms.EmailInput(attrs={"placeholder": "[email protected]"}),
# Make description less prominent on the page, we don't want long descriptions
"description": forms.TextInput(
attrs={"placeholder": "Engineering docs for Example company"}
),
# Don't use a URLField as a widget, the validation is too strict on FF
"url": forms.TextInput(attrs={"placeholder": "https://"}),
}

def __init__(self, *args, **kwargs):
try:
Expand Down
79 changes: 79 additions & 0 deletions readthedocs/organizations/migrations/0013_update_naming.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Generated by Django 4.2.13 on 2024-07-17 22:41

from django.db import migrations, models
from django_safemigrate import Safe


class Migration(migrations.Migration):
safe = Safe.always

dependencies = [
("organizations", "0012_add_organization_never_disable"),
]

operations = [
migrations.AlterField(
model_name="historicalorganization",
name="description",
field=models.TextField(
blank=True,
help_text="A short description shown on your profile page",
null=True,
verbose_name="Description",
),
),
migrations.AlterField(
model_name="historicalorganization",
name="email",
field=models.EmailField(
blank=True,
help_text="Best email address for billing related inquiries",
max_length=255,
null=True,
verbose_name="Email",
),
),
migrations.AlterField(
model_name="historicalorganization",
name="url",
field=models.URLField(
blank=True,
help_text="The main website for your organization",
max_length=255,
null=True,
verbose_name="Home Page",
),
),
migrations.AlterField(
model_name="organization",
name="description",
field=models.TextField(
blank=True,
help_text="A short description shown on your profile page",
null=True,
verbose_name="Description",
),
),
migrations.AlterField(
model_name="organization",
name="email",
field=models.EmailField(
blank=True,
help_text="Best email address for billing related inquiries",
max_length=255,
null=True,
verbose_name="Email",
),
),
migrations.AlterField(
model_name="organization",
name="url",
field=models.URLField(
blank=True,
help_text="The main website for your organization",
max_length=255,
null=True,
verbose_name="Home Page",
),
),
]
8 changes: 4 additions & 4 deletions readthedocs/organizations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ class Organization(models.Model):
blank=False,
)
email = models.EmailField(
_("E-mail"),
help_text="How can we get in touch with you?",
_("Email"),
help_text="Best email address for billing related inquiries",
max_length=255,
blank=True,
null=True,
)
description = models.TextField(
_("Description"),
help_text="Tell us a little about yourself.",
help_text="A short description shown on your profile page",
blank=True,
null=True,
)
url = models.URLField(
_("Home Page"),
help_text="The main website for your Organization",
help_text="The main website for your organization",
max_length=255,
blank=True,
null=True,
Expand Down

0 comments on commit bf02353

Please sign in to comment.