<html xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude">
	<xi:include href="../layout.html" />
	<head>
		<title>Manage Settings</title>
		<link rel="stylesheet" type="text/css" href="/data/manager.css" />
	</head>
	<body id="settings-manager">
		<navheader>/manager/settings/</navheader>
		<h2>Settings</h2>
		<table>
			<tbody>
				<tr py:for="setting in result">
					<td>${setting.name.replace('_', ' ').title()}<py:if test="setting.description"> ($setting.description)</py:if></td>
					<td>
						<form action="" method="POST">
							<input name="key" type="hidden" value="$setting.name" />
							<py:choose test="">
								<textarea name="value" wrap="soft" py:when="setting.type == 'list'">$setting.value</textarea>
								<input name="value" value="$setting.value" py:otherwise=""/>
							</py:choose>
							<button type="submit">Change</button>
						</form>
					</td>
				</tr>
			</tbody>
		</table>
		<h2>Add a New Setting</h2>
		<form id="create-setting" action="" method="POST">
			<p><label for="key">Setting: </label><input name="key" /></p>
			<p><label for="value">Value: </label><input name="value" /></p>
			<p><label for="type">Type: </label><select name="type"><option selected="selected">none</option><option py:for="type_ in types">$type_</option></select></p>
			<p><label for="description">Description: </label><input name="description" /></p>
			<p>	<button type="submit">Create</button></p>
		</form>
	</body>
</html>
