Skip to content

Commit

Permalink
Show automatically generated GUID (copyable)
Browse files Browse the repository at this point in the history
ref #1530
  • Loading branch information
rixx committed Feb 12, 2024
1 parent a26219f commit 3c52321
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pretalx/schedule/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ def __init__(self, *args, **kwargs):
"Information for speakers, e.g.: Projector has only HDMI input."
)
self.fields["capacity"].widget.attrs["placeholder"] = "300"
self.fields["guid"].widget.attrs["placeholder"] = self.instance.uuid or ""
if self.instance.pk and not self.instance.guid:
self.fields["guid"].help_text = _(
"The current, automatically generated GUID is: {guid}."
).format(guid=self.instance.uuid)

class Meta:
model = Room
Expand Down

0 comments on commit 3c52321

Please sign in to comment.