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.4 KiB

  1. {% extends "layout.html" %}
  2. {% block title %}Admin Center{% endblock %}
  3. {% block scripts %}
  4. <script type="text/javascript">
  5. $(document).ready(function() {
  6. $("#delete_button").click(function() {
  7. return window.confirm("Are you sure?");
  8. });
  9. });
  10. </script>
  11. {% endblock %}
  12. {% block content %}
  13. <h1>Edit User #{{ info["uid"] }}</h1>
  14. <form action="{{ url_for('admin.edit_user', uid=info['uid']) }}" method="POST">
  15. <input type="hidden" name="token" value="{{ csrf_token() }}">
  16. <fieldset>
  17. <legend>User Details</legend>
  18. <strong>Username:</strong><br>
  19. <input type="text" size="20" name="username" value="{{ info['username'] }}"><p>
  20. <strong>Real name:</strong><br>
  21. <input type="text" size="20" name="name" value="{{ info['name'] }}"><p>
  22. <strong>Reset Password:</strong><br>
  23. <input type="password" size="20" name="password1"><br>
  24. <input type="password" size="20" name="password2"><p>
  25. <strong>Role:</strong><br>
  26. <select name="role">
  27. <option value="user"{% if info["role"] == "user" %} selected{% endif %}>User</option>
  28. <option value="admin"{% if info["role"] == "admin" %} selected{% endif %}>Admin</option>
  29. </select><p>
  30. <button type="submit" name="action" value="save">Save Changes</button>
  31. <button type="submit" name="action" id="delete_button" value="delete">Delete User</button>
  32. </fieldset>
  33. </form>
  34. {% endblock %}