Fix some broken help_text bubbles (they are truncated or not displayed if they
authorTodd Larsen <tlarsen@google.com>
Sat, 22 Nov 2008 09:49:13 +0000
changeset 549 00a9ce3dc082
parent 548 2ceb3b14349c
child 550 577dbfbeef97
Fix some broken help_text bubbles (they are truncated or not displayed if they contain " double quotation marks). Add notice text (sort of ugly at the moment, Dmitri? :) explaining the "Public name" and "Link ID" fields in great detail. This patch is in preparation for making "Link ID" immutable for Users in a subsequent patch. Patch by: Todd Larsen
app/soc/models/linkable.py
app/soc/models/user.py
app/soc/templates/soc/user/edit_self.html
app/soc/views/models/user.py
--- a/app/soc/models/linkable.py	Sat Nov 22 09:22:44 2008 +0000
+++ b/app/soc/models/linkable.py	Sat Nov 22 09:49:13 2008 +0000
@@ -114,7 +114,7 @@
   link_id = db.StringProperty(required=True,
       verbose_name=ugettext_lazy('Link ID'))
   link_id.help_text = ugettext_lazy(
-      '"ID" used when creating URL links.'
+      'Link ID is used as part of various URL links throughout the site.'
       ' Lower ASCII characters, digits, and underscores only.')
 
   #: Optional Self Reference property to another Linkable entity which defines
--- a/app/soc/models/user.py	Sat Nov 22 09:22:44 2008 +0000
+++ b/app/soc/models/user.py	Sat Nov 22 09:49:13 2008 +0000
@@ -81,15 +81,11 @@
       verbose_name=ugettext_lazy('Public name'))
   name.help_text = ugettext_lazy(
       'Human-readable name (UTF-8) that will be displayed publicly on the'
-      ' site. While you can use your real name, like "First Last", please'
-      ' keep in mind that this "public name" will be used as your alias'
-      ' throughout the site, displayed to all users, for comments, document'
-      ' ownership, and the like.  Please do not use your real name if you'
-      ' are a minor (not an adult) where you live.')
+      ' site.')
       
   #: field storing whether User is a Developer with site-wide access.
   is_developer = db.BooleanProperty(
       verbose_name=ugettext_lazy('Is Developer'))
   is_developer.help_text = ugettext_lazy(
-      'Field used to indicate user with site-wide "Developer" access.')
+      'Field used to indicate user with site-wide Developer access.')
 
--- a/app/soc/templates/soc/user/edit_self.html	Sat Nov 22 09:22:44 2008 +0000
+++ b/app/soc/templates/soc/user/edit_self.html	Sat Nov 22 09:49:13 2008 +0000
@@ -31,12 +31,33 @@
 <form method="POST">
  <table>
   {% field_as_table_row form.name %}
+  <tr>
+   <td class="notice" colspan="4">
+While you can use your real name, like <tt>First Last</tt>, please
+keep in mind that this public name will be used as your alias
+<b><i>throughout the site</i></b>, displayed to all users, for comments,
+document ownership, and the like.  You can change this public name at any
+time.<br>
+<br>
+<b><i>Please</i> do not <i>use your real name if you are a minor (not an
+adult) where you live.</i></b>
+   </td>
+  </tr>
+  <tr><td colspan="4">&nbsp;</td></tr>
+
   {% field_as_table_row form.link_id %}
   <tr>
-   <td colspan="4">&nbsp;</td>
+   <td class="notice" colspan="4">
+This <i>Link ID</i> is used throughout the site when creating various URL
+links related to you and content you create.  As a result, it may only
+consist of lower ASCII characters, digits, and underscores.  Also, it must
+be unique and not in use by any other user of the site.
+   </td>
   </tr>
-  </table>
-  <table>
+  <tr><td colspan="4">&nbsp;</td></tr>
+
+ </table>
+ <table>
   <tr>
     {% block submit_buttons %}
    <td> 
--- a/app/soc/views/models/user.py	Sat Nov 22 09:22:44 2008 +0000
+++ b/app/soc/views/models/user.py	Sat Nov 22 09:49:13 2008 +0000
@@ -36,6 +36,7 @@
 from soc.views.helper import access
 from soc.views.models import base
 
+import soc.models.linkable
 import soc.models.user
 import soc.logic.models.user
 import soc.views.helper
@@ -51,10 +52,11 @@
 
   link_id = forms.CharField(
       label=soc.models.user.User.link_id.verbose_name,
-      help_text=soc.models.user.User.link_id.help_text)
+      help_text=soc.models.linkable.Linkable.link_id.help_text)
 
   name = forms.CharField(
-      label=soc.models.user.User.name.verbose_name)
+      label=soc.models.user.User.name.verbose_name,
+      help_text=soc.models.user.User.name.help_text)
 
   is_developer = forms.BooleanField(required=False,
       label=soc.models.user.User.is_developer.verbose_name,