2015-08-02 20:59:11 +02:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block body %}
|
|
|
|
<div class="discover">
|
|
|
|
<h1>{{title}}</h1>
|
2016-06-17 20:01:44 +02:00
|
|
|
<form role="form" method="POST" autocomplete="off">
|
2016-04-27 10:39:52 +02:00
|
|
|
{% if g.user and g.user.role_admin() and new_user %}
|
2015-10-13 18:07:17 +02:00
|
|
|
<div class="form-group required">
|
|
|
|
<label for="nickname">Username</label>
|
2016-06-17 20:01:44 +02:00
|
|
|
<input type="text" class="form-control" name="nickname" id="nickname" value="{{ content.nickname if content.nickname != None }}" autocomplete="off">
|
2015-10-13 18:07:17 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="form-group">
|
2015-10-13 18:07:17 +02:00
|
|
|
<label for="email">Email address</label>
|
2016-06-17 20:01:44 +02:00
|
|
|
<input type="email" class="form-control" name="email" id="email" value="{{ content.email if content.email != None }}" autocomplete="off" required>
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
2016-04-27 16:00:58 +02:00
|
|
|
{% if g.user and g.user.role_passwd() or g.user.role_admin()%}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="form-group">
|
2015-10-13 18:07:17 +02:00
|
|
|
<label for="password">Password</label>
|
2016-06-17 20:01:44 +02:00
|
|
|
<input type="password" class="form-control" name="password" id="password" value="" autocomplete="off">
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
2016-04-27 16:00:58 +02:00
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="kindle_mail">Kindle E-Mail</label>
|
2016-08-08 21:01:38 +02:00
|
|
|
<input type="email" class="form-control" name="kindle_mail" id="kindle_mail" value="{{ content.kindle_mail if content.kindle_mail != None }}">
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
2016-04-27 10:39:52 +02:00
|
|
|
{% if g.user and g.user.role_admin() and not profile %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="form-group">
|
2016-04-27 10:35:23 +02:00
|
|
|
<label for="admin_role">Admin user</label>
|
|
|
|
<input type="checkbox" name="admin_role" id="admin_role" {% if content.role_admin() %}checked{% endif %}>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="download_role">Allow Downloads</label>
|
|
|
|
<input type="checkbox" name="download_role" id="download_role" {% if content.role_download() %}checked{% endif %}>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="upload_role">Allow Uploads</label>
|
|
|
|
<input type="checkbox" name="upload_role" id="upload_role" {% if content.role_upload() %}checked{% endif %}>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="edit_role">Allow Edit</label>
|
|
|
|
<input type="checkbox" name="edit_role" id="edit_role" {% if content.role_edit() %}checked{% endif %}>
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
2016-04-27 16:00:58 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="passwd_role">Allow Changing Password</label>
|
|
|
|
<input type="checkbox" name="passwd_role" id="passwd_role" {% if content.role_passwd() %}checked{% endif %}>
|
|
|
|
</div>
|
2015-10-13 18:07:17 +02:00
|
|
|
{% endif %}
|
2016-04-27 10:39:52 +02:00
|
|
|
{% if g.user and g.user.role_admin() and not profile and not new_user %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="delete"> Delete this user
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<button type="submit" class="btn btn-default">Submit</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% if downloads %}
|
|
|
|
<h2>Recent Downloads</h2>
|
|
|
|
{% for entry in downloads %}
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<a class="pull-left" href="{{ url_for('show_book', id=entry.id) }}">
|
|
|
|
<img class="media-object" width="100" src="{{ url_for('get_cover', cover_path=entry.path) }}" alt="...">
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|