Ticket #16031: custom_comment_form-16031-2.diff

File custom_comment_form-16031-2.diff, 1.9 KB (added by teraom, 13 years ago)

Changed to one tr tag with colspan 2. Removed all class attributes. Wrapped form in table tag

  • docs/ref/contrib/comments/index.txt

     
    218218A complete form might look like::
    219219
    220220    {% get_comment_form for event as form %}
    221     <form action="{% comment_form_target %}" method="post">
    222       {{ form }}
    223       <tr>
    224         <td></td>
    225         <td><input type="submit" name="preview" class="submit-post" value="Preview"></td>
    226       </tr>
    227     </form>
     221    <table>
     222      <form action="{% comment_form_target %}" method="post">
     223        {% csrf_token %}
     224        {{ form }}
     225        <tr>
     226          <td colspan="2">
     227            <input type="submit" name="submit" value="Post">
     228            <input type="submit" name="preview" value="Preview">
     229          </td>
     230        </tr>
     231      </form>
     232    </table>
    228233
    229234Be sure to read the `notes on the comment form`_, below, for some special
    230235considerations you'll need to make if you're using this approach.
  • docs/ref/contrib/comments/example.txt

     
    103103  <!-- A context variable called form is created with the necessary hidden
    104104  fields, timestamps and security hashes -->
    105105  <table>
    106   <form action="{% comment_form_target %}" method="post">
    107     {{ form }}
    108     <tr>
    109       <td></td>
    110       <td><input type="submit" name="preview" class="submit-post" value="Preview"></td>
    111     </tr>
    112   </form>
     106    <form action="{% comment_form_target %}" method="post">
     107      {% csrf_token %}
     108      {{ form }}
     109      <tr>
     110        <td colspan="2">
     111          <input type="submit" name="submit" value="Post">
     112          <input type="submit" name="preview" value="Preview">
     113        </td>
     114      </tr>
     115    </form>
    113116  </table>
    114117
    115118Flagging
Back to Top