changeset 154:e86018a689ba

Moved the URL field for the persona to be below the header and footer image, which should be easier for users to understand, and modified field documentation to be more user-friendly too.
author Atul Varma <varmaa@toolness.com>
date Fri, 04 Apr 2008 13:37:37 -0700
parents 094102bd9529
children 7182070b0875
files personasbackend/personas/models.py personasbackend/personas/templates/personas/edit.html
diffstat 2 files changed, 26 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/personasbackend/personas/models.py	Fri Apr 04 13:22:23 2008 -0700
+++ b/personasbackend/personas/models.py	Fri Apr 04 13:37:37 2008 -0700
@@ -265,16 +265,6 @@
         blank=False,
         )
 
-    url = models.URLField(
-        "Dynamic Persona URL",
-        help_text=("URL for the content that will be placed behind "
-                   "the browser's chrome. This is an advanced option, "
-                   "and only needs to be specified if a header and "
-                   "footer image are not uploaded."),
-        verify_exists=False,
-        blank=True,
-        )
-
     def __get_resolved_url(self):
         if not self.url:
             return make_absolute_url( reverse(
@@ -359,10 +349,8 @@
     header_img = models.ImageField(
         "Header image",
         help_text=("File for the image that will be placed behind "
-                   "the browser's top chrome.  Only required if "
-                   "a URL is not specified; however, if a URL "
-                   "is specified, this image can be used as "
-                   "a preview and/or fallback."),
+                   "the browser's top chrome. It's also used to "
+                   "generate the preview of the Persona."),
         upload_to="hosted-content/headers",
         blank=True,
         max_length=MAX_FILE_NAME_LENGTH,
@@ -376,10 +364,8 @@
     footer_img = models.ImageField(
         "Footer image",
         help_text=("File for the image that will be placed behind "
-                   "the browser's bottom chrome.  Only required if "
-                   "a URL is not specified; however, if a URL "
-                   "is specified, this image can be used as "
-                   "a preview and/or fallback."),
+                   "the browser's bottom chrome. It's also used "
+                   "to generate the preview of the Persona."),
         upload_to="hosted-content/footers",
         blank=True,
         max_length=MAX_FILE_NAME_LENGTH,
@@ -390,6 +376,18 @@
             self.get_footer_img_url()
             )
 
+    url = models.URLField(
+        "Dynamic Persona URL",
+        help_text=(
+            "<b>Advanced:</b> Specifies a URL for the content that will "
+            "provide "
+            "dynamic content to be placed behind the browser chrome. "
+            "If you don't know what this means, you can leave the field "
+            "blank."),
+        verify_exists=False,
+        blank=True,
+        )
+
     text_color = models.CharField(
         help_text=("The RGB color, as a #RRGGBB color hash, "
                    "of the color of text that will be displayed "
--- a/personasbackend/personas/templates/personas/edit.html	Fri Apr 04 13:22:23 2008 -0700
+++ b/personasbackend/personas/templates/personas/edit.html	Fri Apr 04 13:37:37 2008 -0700
@@ -3,11 +3,18 @@
 {% block content %}
 <form enctype="multipart/form-data" method="post" action=".">
   {% if persona %}
-  <p>This persona's preview image currently looks like this:</p>
+  <p>This persona's preview currently looks like this:</p>
   <p><img src="{{ persona.thumbnail_url }}" /></p>
+  {% comment %}
+  TODO: This is an inhumane workaround to get around the fact that
+  it's currently hard to modify the form itself; the header/footer
+  fields themselves should eventually be changed to convey the same
+  information to the end-user in a way similar to how the Django admin
+  does it.
+  {% endcomment %}
   <p>You can change this by submitting new images for the header and
-  footer images below.  However, if you leave them blank, the preview
-  image will remain as-is.</p>
+  footer images below.  However, if you leave these fields blank, 
+  the header and footer will remain as-is.</p>
   {% endif %}
   <table class="persona-form corner-box">
     {{ form }}