app/soc/templates/soc/survey/take.html
author James Levy <jamesalexanderlevy@gmail.com>
Sat, 04 Jul 2009 13:53:17 +0200
changeset 2526 8f29bfb9eb52
parent 2490 5aa7b281fdc7
child 2551 087684992ab0
permissions -rw-r--r--
Survey editing/taking Javascript and CSS fixes. This patch adds some cosmetic changes and functional fixes: - UI now removes all of the field content when a field is deleted, - CSS tweaks, and jQuery hack to specialize comment CSS, - fixed JS path in take.html. Reviewed by: Pawel Solyga (with some small changes)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2475
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     1
{% extends "soc/base.html" %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     2
{% comment %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     3
Licensed under the Apache License, Version 2.0 (the "License");
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     4
you may not use this file except in compliance with the License.
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     5
You may obtain a copy of the License at
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     6
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     7
http://www.apache.org/licenses/LICENSE-2.0
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     8
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     9
Unless required by applicable law or agreed to in writing, software
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    10
distributed under the License is distributed on an "AS IS" BASIS,
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    11
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    12
See the License for the specific language governing permissions and
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    13
limitations under the License.
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    14
{% endcomment %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    15
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    16
{% block scripts %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    17
{{ block.super }}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    18
<script type="text/javascript" src="/soc/content/js/survey-default-text-090627.js"></script>
2526
8f29bfb9eb52 Survey editing/taking Javascript and CSS fixes.
James Levy <jamesalexanderlevy@gmail.com>
parents: 2490
diff changeset
    19
<script type="text/javascript" src="/soc/content/js/survey-take-090627.js"></script>
2475
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    20
<script type="text/javascript" src="/jquery/jquery-growfield.js"></script>
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    21
{% endblock %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    22
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    23
{% block header_title %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    24
{{ entity.title }}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    25
{% endblock %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    26
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    27
{% block body %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    28
<div id="created">Last modified on {{ entity.modified }} by {{ entity.modified_by.name }}</div>
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    29
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    30
{% if survey_form %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    31
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    32
  {% load forms_helpers %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    33
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    34
  {{ help_text }}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    35
2490
5aa7b281fdc7 Added the possibility to change the action of the form on the Survey take page.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2487
diff changeset
    36
  {% if form_action %}
5aa7b281fdc7 Added the possibility to change the action of the form on the Survey take page.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2487
diff changeset
    37
    <form method="post" action="{{ form_action }}">
5aa7b281fdc7 Added the possibility to change the action of the form on the Survey take page.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2487
diff changeset
    38
  {% else %}
5aa7b281fdc7 Added the possibility to change the action of the form on the Survey take page.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2487
diff changeset
    39
    <form method="post">
5aa7b281fdc7 Added the possibility to change the action of the form on the Survey take page.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2487
diff changeset
    40
  {% endif %}
2477
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    41
    <div style="width:100%; float:left;">
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    42
      <div class="{{ status }}" id="survey_widget">
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    43
        <table>
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    44
          {% block form_table %}
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    45
            {% as_twoline_table survey_form %}
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    46
          {% endblock %}
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    47
        </table>
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    48
      </div> {# end survey_widget #}
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    49
    </div>
2475
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    50
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    51
<br/><br/>
2477
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    52
    <table>
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    53
      <tbody>
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    54
        <tr>
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    55
          <td>
2487
59d91f7a31e7 Removed obsolete if tag form take template.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2477
diff changeset
    56
            <input type="submit" value="Submit" style="font-weight: bold;"/>
2477
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    57
          </td>
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    58
        </tr>
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    59
      </tbody>
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    60
    </table>
e5629995d118 Implemented the takeGet view for Surveys.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2475
diff changeset
    61
  </form>
2475
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    62
{% endif %}
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    63
dfb9249d91b6 Added skeleton for the take view and its template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    64
{% endblock %}