d1058aed8b
Signed-off-by: volpino <fox91@anche.no>
117 lines
4.0 KiB
HTML
117 lines
4.0 KiB
HTML
{% extends "_base.html" %}
|
|
{% load url from future %}
|
|
|
|
{% block title %}
|
|
{{ block.super }} - Edit user preferences for {{ user }}
|
|
{% endblock %}
|
|
|
|
{% block css %}
|
|
{{ block.super }}
|
|
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/toggle_buttons.css" media="screen" title="Normal" />
|
|
{% endblock %}
|
|
|
|
{% block javascript %}
|
|
{{ block.super }}
|
|
<script type="text/javascript" language="javascript" src="{{STATIC_URL}}js/jquery.js"></script>
|
|
<script type="text/javascript" language="javascript" src="{{STATIC_URL}}js/jquery.toggle.buttons.js"></script>
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
{% if updated %}
|
|
<div class="alert alert-success">
|
|
<strong>Saved!</strong> Your preferences has been saved
|
|
</div>
|
|
{% endif %}
|
|
|
|
<h2>
|
|
Edit user preferences
|
|
</h2>
|
|
|
|
<form id="preferences_form" method='post' action='.'>
|
|
{% csrf_token %}
|
|
<table class="table">
|
|
<thead><tr><th>Personal settings</th></tr></thead>
|
|
<tr>
|
|
<th>{{ form.first_name.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.first_name.errors }}</ul>{{ form.first_name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.last_name.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.last_name.errors }}</ul>{{ form.last_name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.email.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.email.errors }}</ul>{{ form.email }}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table class="table">
|
|
<thead><tr><th>Feed settings</th></tr></thead>
|
|
<tr>
|
|
<th>{{ form.feed_upstream_info.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.feed_upstream_info.errors }}</ul>{{ form.feed_upstream_info }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.feed_portage_info.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.feed_portage_info.errors }}</ul>{{ form.feed_portage_info }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.feed_show_adds.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.feed_show_adds.errors }}</ul>{{ form.feed_show_adds }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.feed_show_removals.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.feed_show_removals.errors }}</ul>{{ form.feed_show_removals }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.feed_ignore_pre.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.feed_ignore_pre.errors }}</ul>{{ form.feed_ignore_pre }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.feed_ignore_pre_if_stable.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.feed_ignore_pre_if_stable.errors }}</ul>{{ form.feed_ignore_pre_if_stable }}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table class="table">
|
|
<thead><tr><th>Mail settings</th></tr></thead>
|
|
<tr>
|
|
<th>{{ form.email_activated.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.email_activated.errors }}</ul>{{ form.email_activated }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.email_every.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.email_every.errors }}</ul>{{ form.email_every }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.email_ignore_pre.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.email_ignore_pre.errors }}</ul>{{ form.email_ignore_pre }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ form.email_ignore_pre_if_stable.label_tag }}</th>
|
|
<td><ul class="errorlist">{{ form.email_ignore_pre_if_stable.errors }}</ul>{{ form.email_ignore_pre_if_stable }}</td>
|
|
</tr>
|
|
<tr><td> </td><td></td></tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>
|
|
<input class="btn btn-large" type='submit' value="Save" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$("#preferences_form").find("input:checkbox").each(function () {
|
|
var div = $("<div/>")
|
|
, td = $(this).closest("td");
|
|
$(this).remove();
|
|
td.append(div.append($(this)));
|
|
div.toggleButtons();
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|