Styling fuer Passwortaenderung

This commit is contained in:
phil 2021-02-10 01:32:09 +00:00
parent ab08ca121a
commit 3520de2d6d
4 changed files with 36 additions and 23 deletions

View file

@ -65,6 +65,7 @@ def change_password_get(zone=None):
@bottle.route('/password', method='POST')
def change_password(zone=None):
zone = bottle.request.forms.get('zone')
username = bottle.request.forms.get('username')
old_password = bottle.request.forms.get('old_password')
new_password = bottle.request.forms.get('new_password')

View file

@ -15,7 +15,13 @@
<py:match path="body" once="true">
<body py:attrs="select('@*')">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="/admin/wikis">Start</a>
<span class="navbar-brand mb-0 h1">Account Admin</span>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="/admin/wikis">Home</a></li>
<li class="nav-item"><a class="nav-link" href="/admin/wikis/password">Passwords</a></li>
</ul>
</div>
</nav>
<div class="container" style="margin-top:20px;">

View file

@ -11,7 +11,7 @@
<h2>Manage user access for wiki: <a href="https://systemausfall.org/wikis/${zone}" target="_blank">${zone}</a></h2>
<div py:if="error" class="alert alert-danger" role="alert">${error}</div>
<div py:if="success" class="alert alert-success">${success}</div>
<div py:if="success" class="alert alert-success" role="alert">${success}</div>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-4 col-sm-offset-3 col-md-offset-4">

View file

@ -10,30 +10,36 @@
<body>
<h2>Change user password</h2>
<div py:if="error" class="error">${error}</div>
<div py:if="success" class="success">${success}</div>
<div py:if="error" class="alert alert-danger" role="alert">${error}</div>
<div py:if="success" class="alert alert-success" role="alert">${success}</div>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-4 col-sm-offset-3 col-md-offset-4">
<form name="update-passwd" action="password" method="POST">
<table border="0">
<tr>
<td><label for="zone">Zone:</label></td>
<td><input type="text" size="20" name="zone" id="zone" /></td>
</tr><tr>
<td><label for="username">User name:</label></td>
<td><input type="text" size="20" name="username" id="username" /></td>
</tr><tr>
<td><label for="old_password">Old password:</label></td>
<td><input type="password" size="20" name="old_password" id="old_password" /></td>
</tr><tr>
<td><label for="new_password">New password:</label></td>
<td><input type="password" size="20" name="new_password" id="new_password" /></td>
</tr><tr>
<td><label for="new_password2">New password (repeat):</label></td>
<td><input type="password" size="20" name="new_password2" id="new_password2" /></td>
</tr>
</table>
<input type="submit" name="submit" value="Change password" />
<div class="form-group">
<label for="zone">Wiki:</label>
<input type="text" name="zone" id="zone" class="form-control" placeholder="e.g. mywiki"/>
</div>
<div class="form-group">
<label for="username">User name:</label>
<input type="text" name="username" id="username" class="form-control"/>
</div>
<div class="form-group">
<label for="old_password">Old password:</label>
<input type="password" name="old_password" id="old_password" class="form-control"/>
</div>
<div class="form-group">
<label for="new_password">New password:</label>
<input type="password" name="new_password" id="new_password" class="form-control"/>
</div>
<div class="form-group">
<label for="new_password2">New password (repeat):</label>
<input type="password" name="new_password2" id="new_password2" class="form-control"/>
</div>
<button type="submit" name="submit" class="btn btn-primary">Change password</button>
</form>
</div>
</div>
</body>
</html>