A Python content management system designed for kirsle.net featuring a blog, comments and photo albums. https://rophako.kirsle.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.5 KiB

{% extends "layout.html" %}
{% block title %}Admin Center{% endblock %}
{% block scripts %}
<script type="text/javascript">
$(document).ready(function() {
$("#delete_button").click(function() {
return window.confirm("Are you sure?");
{% endblock %}
{% block content %}
<h1>Edit User #{{ info["uid"] }}</h1>
<form action="{{ url_for('admin.edit_user', uid=info['uid']) }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<legend>User Details</legend>
<input type="text" class="form-control" size="20" name="username" value="{{ info['username'] }}"><p>
<strong>Real name:</strong><br>
<input type="text" class="form-control" size="20" name="name" value="{{ info['name'] }}"><p>
<strong>Reset Password:</strong><br>
<input type="password" class="form-control" size="20" name="password1"><br>
<input type="password" class="form-control" size="20" name="password2"><p>
<select name="role" class="form-control">
<option value="user"{% if info["role"] == "user" %} selected{% endif %}>User</option>
<option value="admin"{% if info["role"] == "admin" %} selected{% endif %}>Admin</option>
<button type="submit" class="btn btn-primary" name="action" value="save">Save Changes</button>
<button type="submit" class="btn btn-warning" name="action" id="delete_button" value="delete">Delete User</button>
{% endblock %}