{% extends "registration/base.html" %}

{% block title %}Manage your profile{% endblock %}

{% block reg_content %}
	<h3>Package subscriptions</h3>

	<p>
		<em>Note:</em> You can manage package-specific subscriptions
		when viewing a source package's overview ("show").
	</p>
	<p>
		{% include "mini_buildd/snippet_manage_subscriptions.html" with repositories=repositories %}
	</p>
	<hr/>

	<h3>Package uploads</h3>
	<p>
		Status: <tt class="status {{ user.uploader.get_status_display }}">{{ user.uploader|default:"ERROR: User has no uploader config. Please contact administrator." }}</tt>
	</p>

	<p>
		<em>Note:</em> Setting a new key will <em>automatically
		deactivate your uploader profile</em>; an administrator
		needs to (verify your key and) manually re-activate you
		later.
	</p>

	<div id="mbd_registration">
		<form action="/mini_buildd/api" method="get">
			<div>
				<input type="hidden" name="command" value="setuserkey" />
				<textarea name="key" title="Full ascii-armored GnuPG public key or one-line key ID (to be found on the keyserver)" cols="80" rows="10">{{ user.uploader.key }}</textarea>
				<input type="hidden" name="output" value="referer" />
			</div>
			<div>
				<button type="submit" title="Set new user GPG public key">Set new key</button>
			</div>
		</form>
	</div>
{% endblock %}
