review/templates/pieces/forms/signoff.html @ 9030dc9517cf

web: add basic tests

This patch adds a new test module `test_web` to automate testing of web
requests. For now the tests are rather simple and only check for
expected status codes.

To set up the flask app within the tests, it has to be configured
properly. This is the reason why the app configuration part in `web.py`
has been moved into an own function - now it may also be used by the
test module.
author Oben Sonne <obensonne@googlemail.com>
date Mon, 02 Jul 2012 22:32:48 +0200
parents d6523b4269f8
children (none)
<div class="add-signoff togglebox group">
    <span class="activate">
        {% if cu_signoff %}
            <a class="button" href="#"><span>Change your signoff</span></a>
        {% else %}
            <a class="button" href="#"><span>Sign off on this changeset</span></a>
        {% endif %}
    </span>
    <form id="signoff-form" class="disabled" method="POST" action="">
        <p class="sign-off-as">Sign off as:</p>

        <div class="field">
            <input id="id_signoff-form_yes" type="radio" name="signoff" value="yes" {% if cu_signoff and cu_signoff.opinion == 'yes' %}checked{% endif %}/><label class="radio" for="id_signoff-form_yes">Yes</label>
            <input id="id_signoff-form_no"type="radio" name="signoff" value="no" {% if cu_signoff and cu_signoff.opinion == 'no' %}checked{% endif %}/><label class="radio" for="id_signoff-form_no">No</label>
            <input id="id_signoff-form_neutral"type="radio" name="signoff" value="neutral" {% if not cu_signoff or cu_signoff.opinion == '' %}checked{% endif %}/><label class="radio" for="id_signoff-form_neutral">Neutral</label>
        </div>

        <div class="field">
            <label class="infield" for="id_signoff-form_body">Signoff message</label>
            <textarea autocomplete="off" id="id_signoff-form_body" cols="60" rows="6" name="new-signoff-body">{% if cu_signoff %}{{ cu_signoff.message }}{% endif %}</textarea>
        </div>

        <div class="field cuddly">
            <input type="checkbox" class="checkbox" name="signoff-markdown" id="id_signoff-form_markdown" checked="checked" />
            <label for="id_signoff-form_markdown">Use Markdown to format this message.</label>

        </div>
        {% if cu_signoff %}
            <input type="hidden" value="{{ cu_signoff.identifier }}" name="current"/>
            <a class="submit button" href="#"><span>Change Signoff</span></a>
        {% else %}
            <a class="submit button" href="#"><span>Add Signoff</span></a>
        {% endif %}
        <a class="cancel button" href="#"><span>Cancel</span></a>
    </form>
</div>