view bts_webui/amancay/templates/bug_forms.html @ 173:1dcf2b9f84df draft

Added {% csrf_token %} in any template that uses a POST form
author eriol-guest
date Thu, 07 Jul 2011 06:41:23 +0000
parents 2417a0ecc73d
children
line wrap: on
line source

{% comment %} vim: set sw=4 ts=4 sts=4 noet: {% endcomment %}
<!-- hidden forms: add comment -->
<div class="action_form" id="add_comment_form">
	<form name="add_comment" method="POST">{% csrf_token %}
		<input type="hidden" name="form_type" value="comment"/>
		<fieldset class="action_form">
		<legend class="action_form">Add Comment</legend>
		<ul>
			{% if current_user.is_authenticated %}
			<li>The message will be sent from <b>{{ current_user.email }}</b></li>
			{% else %}
			<li><label for="from_email">Your Email:</label>
			<input size="80" name="from_email" maxlength="255" /></li>
			{% endif %}
			<li><label for="subject">Subject:</label>
			<input size="80" name="subject" maxlength="255"/></li>
			<li><label for="comment">Comment:</label>
			<textarea cols="80" rows="10" name="comment" /></textarea></li>
			<li><input type="submit" class="submit" value="Submit" /></li>
		</ul>
		</fieldset>
	</form>
</div>

<!-- reassign -->
<div class="action_form" id="reassign_form">
	<form name="reassign" method="POST">{% csrf_token %}
		<input type="hidden" name="form_type" value="reassign"/>
		<fieldset class="action_form">
		<legend class="action_form">Reassign report to</legend>
		<ul>
			{% if current_user.is_authenticated %}
			<li>The message will be sent from <b>{{ current_user.email }}</b></li>
			{% else %}
			<li><label for="from_email">Your Email:</label>
			<input size="80" name="from_email" maxlength="255" /></li>
			{% endif %}
			<li><label for="reassign_to">Reassign to:</label>
			<input size="80" name="reassign_to" maxlength="255"/></li>
			<li><label for="reassign_version">Version:</label>
			<input size="80" name="reassign_version" maxlength="255"/></li>
			<li><label for="reassign_comment">Comment:</label>
			<textarea cols="80" rows="5" name="reassign_comment" /></textarea></li>
			<li><input type="submit" class="submit" value="Submit" /></li>
		</ul>
		</fieldset>
	</form>
</div> 

<!-- retitle -->
<div class="action_form" id="retitle_form">
	<form name="retitle" method="POST">{% csrf_token %}
		<input type="hidden" name="form_type" value="retitle"/>
		<fieldset class="action_form">
		<legend class="action_form">Retitle bug report</legend>
		<ul>
		{% if current_user.is_authenticated %}
		<li>The message will be sent from <b>{{ current_user.email }}</b></li>
		{% else %}
		<li><label for="from_email">Your Email:</label>
		<input size="80" name="from_email" maxlength="255" /></li>
		{% endif %}
		<li><label for="retitle_to">Retitle to:</label>
		<input size="80" name="retitle_to" maxlength="255"/></li>
		<li><label for="retitle_comment">Comment:</label>
		<textarea cols="80" rows="5" name="retitle_comment" /></textarea></li>
		<li><input type="submit" class="submit" value="Submit" /></li>
		</ul>
		</fieldset>
	</form>
</div> 

<!-- close -->
<div class="action_form" id="close_form">
	<form name="close" method="POST">{% csrf_token %}
		<input type="hidden" name="form_type" value="close"/>
		<fieldset class="action_form">
		<legend class="action_form">Close bug report</legend>
		<ul>
			{% if current_user.is_authenticated %}
			<li>The message will be sent from <b>{{ current_user.email }}</b></li>
			{% else %}
			<li><label for="from_email">Your Email:</label>
			<input size="80" name="from_email" maxlength="255" /></li>
			{% endif %}
			<li><label for="close_version">Fixed Version:</label>
			<input size="80" name="close_version" maxlength="255"/></li>
			<li><label for="close_comment">Comment:</label>
			<textarea cols="80" rows="5" name="close_comment" /></textarea></li>
			<li><input type="submit" class="submit" value="Submit" /></li>
		</ul>
		</fieldset>
	</form>
</div> 

<!-- severity -->
<div class="action_form" id="severity_form">
	<form name="severity" method="POST">{% csrf_token %}
		<input type="hidden" name="form_type" value="severity"/>
		<fieldset class="action_form">
		<legend class="action_form">Change bug severity</legend>
		<ul>
			{% if current_user.is_authenticated %}
			<li>The message will be sent from <b>{{ current_user.email }}</b></li>
			{% else %}
			<li><label for="from_email">Your Email:</label>
			<input size="80" name="from_email" maxlength="255" /></li>
			{% endif %}
			<li><label for="severity">New severity:</label>
			<select name="severity">
				<option value="critical">Critical</option>
				<option value="grave">Grave</option>
				<option value="serious">Serious</option>
				<option value="important">Important</option>
				<option value="normal">Normal</option>
				<option value="minor">Minor</option>
				<option value="wishlist">Wishlist</option>
			</select></li>
			<li><label for="severity_comment">Comment:</label>
			<textarea cols="80" rows="5" name="severity_comment" /></textarea></li>
			<li><input type="submit" class="submit" value="Submit" /></li>
		</ul>
		</fieldset>
	</form>
</div> 

<!-- subscription -->
<div class="action_form" id="subscribe_form">
	<form name="severity" method="POST">{% csrf_token %}
		<input type="hidden" name="form_type" value="subscribe"/>
		<fieldset class="action_form">
		<legend class="action_form">Confirm subscription</legend>
		<ul>
			<li>Changes made to this bug report will be sent to the following
			email address:
			{% if current_user.is_authenticated %}
				<b>{{ current_user.email }}</b>. If you are sure
				about this, click Confirm.
				<input type="hidden" size="80" name="subscribe_email"
				maxlength="255" value="{{ current_user.email }}" />
			{% else %}
				<li><label for="from_email">Your Email:</label>
				<input size="80" name="subscribe_email" maxlength="255" /></li>
			{% endif %}
			<br/>
			Remember that some bug reports might produce high traffic.</li>
			<li><input type="submit" class="submit" value="Confirm" /></li>
		</ul>
		</fieldset>
	</form>
</div> 

<!-- owner -->
<div class="action_form" id="owner_form">
	<form name="owner_new" method="POST">{% csrf_token %}
		<input type="hidden" name="form_type" value="owner">
		<fieldset class="action_form">
		<legend class="action_form">Change bug owner</legend>
		<ul>
			<li><label for="from_email">New owner email:</label>
			<input size="80" name="new_owner_email" maxlength="255" /></li>
			<br/>
			<li><input type="submit" class="submit" value="Change owner" /></li>
		</ul>
		</fieldset>
	</form>
	{% if current_user.is_authenticated %}
	<form name="owner_takeover" method="POST">{% csrf_token %}
		<input type="hidden" name="form_type" value="owner">
		<fieldset class="action_form">
		<legend class="action_form">Take over this bug</legend>
		<ul>
			<li><input size="80" name="new_owner_email" maxlength="255"
			value="{{ current_user.email }}"/>
			<input type="submit" class="submit" value="Take over this bug" /></li>
		</ul>
		</fieldset>
	</form>
	{% endif %}
</div>