app/soc/templates/soc/grading_record/edit.html
author Lennard de Rijk <ljvderijk@gmail.com>
Sun, 09 Aug 2009 13:03:47 -0700
changeset 2739 22f41aafcedc
parent 2651 842c0f11fc1e
permissions -rw-r--r--
Added capability to update a single GradingRecord on the edit page.

{% extends "soc/base.html" %}
{% comment %}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
{% load forms_helpers %}

{% block body %}
<p>
<p>
{% block instructions %}

{% endblock %}
</p>

{% if error_message %}
  <div class="error">{{ error_message|safe }}</div>
{% endif %}

<p>
 <table>
  {% readonly_field_as_table_row entity.grading_survey_group.fields.name.label entity.grading_survey_group.name %}
  {% readonly_field_as_table_row "Student Project Title" entity.project.title %}
  {% readonly_field_as_table_row "Organization Name" entity.project.scope.name %}
  {% readonly_field_as_table_row "Mentor Name" entity.project.mentor.name %}
  {% readonly_field_as_table_row "Student Name" entity.project.student.name %}
 </table>
</p>


<form method="POST" action="?id={{ entity.key.id_or_name }}">
  <table>
    {% block form_table %}
      {% as_table form %}
    {% endblock %}
  </table>
  <table>
  <tr>
   <td colspan="4">&nbsp;</td>
  </tr>
  <tr>
   <td> 
    <input style="font-weight: bold" type="submit" name="save" value="Save Changes"/>
   </td>
   <td> 
    <input style="font-weight: bold" type="submit" name="save_update" value="Save Changes and Update Project"/>
   </td>
   <td> 
    <input style="font-weight: bold" type="submit" name="save_update_mail" value="Save Changes, Update Project and Send Mail"/>
   </td>
   <td>
     <input type="button" value="Auto-Update this Record" onClick="parent.location='?id={{entity.key.id_or_name}}&update=1'">
   </td>
   <td>
     <input type="button" value="Back to Previous Page" onClick="javascript:history.go(-1)">
   </td>
 </tr>
 </table>
</form>
</p>

{% endblock body %}