Make the ToS text in-line and hook up thick-box in the help-text.
authorSverre Rabbelier <srabbelier@gmail.com>
Wed, 04 Feb 2009 23:09:28 +0000
changeset 1216 ec4f1dd84b39
parent 1215 b21e40ef8dad
child 1217 aeabe6bed55b
Make the ToS text in-line and hook up thick-box in the help-text. This way the user can see the ToS in scrollable form between the link_id and the 'agree to tos' checkbox. Also, when clicking on the link to the 'side-wide terms of service' a thickbox will pop up and display the Terms of Service in an overlay. Patch by: "Mario Ferraro" <fadinlight@gmail.com>
app/soc/templates/soc/user/edit_profile.html
--- a/app/soc/templates/soc/user/edit_profile.html	Wed Feb 04 23:06:48 2009 +0000
+++ b/app/soc/templates/soc/user/edit_profile.html	Wed Feb 04 23:09:28 2009 +0000
@@ -12,6 +12,13 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 {% endcomment %}
+{% block stylesheet %}
+  {{ block.super }}
+  <link rel="stylesheet" href="/soc/content/css/thickbox.css" type="text/css"/>
+{% endblock %}
+{% block scripts %}
+	<script src="/jquery/jquery-thickbox.js"></script>
+{% endblock %}
 {% load forms_helpers %}
 {% block page_title %}User Profile{% endblock %}
 {% block header_title %}
@@ -59,15 +66,20 @@
 {% if tos_link %}
 {% if not user.agreed_to_tos %}
 <tr>
-  <td>
+  <td style="width:450px" colspan="4">
+    <div id="ToS" style="overflow:auto;height:200px">
       {{ tos_contents|safe|linebreaks }}
+    </div>
   </td>
 </tr>
   {% field_as_table_row form.agreed_to_tos %}
   <tr>
    <td class="fieldhelptext" colspan="4">
+   <div id="ToS_hidden" style="display:none">
+      {{ tos_contents|safe|linebreaks }}
+   </div>
 In order to participate on this site, you must agree to the
-<a href="{{tos_link}}">site-wide Terms of Service</a>.<br><br>
+<a href="#TB_inline?height=500&amp;width=500&amp;inlineId=ToS_hidden" title="Terms of Service" class="thickbox">site-wide Terms of Service</a>.<br><br>
 (There may also be additional Terms of Service specific to participation
 in certain Programs or Groups.  Those are agreed to elsewhere on the site,
 when signing up for the specific participation Roles.)