ldap-frontend/ldap_frontend/templates/selfservice.html

81 lines
4.7 KiB
HTML
Raw Permalink Normal View History

2021-12-21 07:30:36 +00:00
{% extends "layout/default.html" %}
2021-12-23 08:14:27 +00:00
{% block title %}{% trans %}self service{% endtrans %}{% endblock %}
2021-12-21 07:30:36 +00:00
{% block content %}
<form action="{{ url_for("selfservice") }}" method="post" class="row g-3 needs-validation">
2021-12-21 15:57:39 +00:00
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
2021-12-21 07:30:36 +00:00
<fieldset>
2021-12-23 08:14:27 +00:00
<legend>{% trans %}Edit User Data{% endtrans %}</legend>
2021-12-21 07:30:36 +00:00
<div class="row mb-3">
2021-12-23 08:14:27 +00:00
<label for="uid" class="form-label col-sm-2">{% trans %}uid{% endtrans %}</label>
2021-12-21 07:30:36 +00:00
<div class="col-sm-10">
<input type="text" name="uid" id="uid" value="{{ CURRENT_USER["uid"]|e }}" disabled readonly class="form-control" aria-describedby="uidHelp">
2021-12-23 08:14:27 +00:00
<div id="uidHelp" class="form-text">{% trans %}Contact an administrator if you want to change this.{% endtrans %}</div>
2021-12-21 07:30:36 +00:00
</div>
</div>
<div class="row mb-3">
2021-12-23 08:14:27 +00:00
<label for="cn" class="form-label col-sm-2">{% trans commonName %}name{% endtrans %}</label>
2021-12-21 07:30:36 +00:00
<div class="col-sm-10">
<input type="text" name="cn" id="cn" value="{{ CURRENT_USER["cn"]|e }}" disabled readonly class="form-control" aria-describedby="cnHelp">
2021-12-23 08:14:27 +00:00
<div id="cnHelp" class="form-text">{% trans %}This field gets adjusted automatically based on the fields below.{% endtrans %}</div>
2021-12-21 07:30:36 +00:00
</div>
</div>
<div class="row mb-3">
2021-12-23 08:14:27 +00:00
<label for="sn" class="form-label col-sm-2">{% trans sn %}surname{% endtrans %}</label>
2021-12-21 07:30:36 +00:00
<div class="col-sm-10">
<input type="text" name="sn" id="sn" value="{{ CURRENT_USER["sn"]|e }}" required class="form-control">
</div>
</div>
<div class="row mb-3">
2021-12-23 08:14:27 +00:00
<label for="givenName" class="form-label col-sm-2">{% trans givenName %}given name{% endtrans %}</label>
2021-12-21 07:30:36 +00:00
<div class="col-sm-10">
<input type="text" name="givenName" id="givenName" value="{{ CURRENT_USER["givenName"]|e }}" required class="form-control">
</div>
</div>
<div class="row mb-3">
<label for="mail" class="form-label col-sm-2">{% trans email %}e-mail address{% endtrans %}</label>
2021-12-21 07:30:36 +00:00
<div class="col-sm-10">
<input type="email" name="mail" id="mail" value="{{ CURRENT_USER["mail"]|e }}" required class="form-control">
2021-12-21 07:30:36 +00:00
</div>
</div>
2021-12-23 08:14:27 +00:00
<input type="submit" name="userdata" value="{% trans %}Update{% endtrans %}" class="btn btn-primary mb-3"><br>
2021-12-21 07:30:36 +00:00
</fieldset>
</form>
<form action="{{ url_for("selfservice") }}" method="post">
2021-12-21 15:57:39 +00:00
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
2021-12-21 07:30:36 +00:00
<fieldset>
2021-12-23 08:14:27 +00:00
<legend>{% trans %}change password{% endtrans %}</legend>
2021-12-21 07:30:36 +00:00
<div class="row mb-3">
2021-12-23 08:14:27 +00:00
<label for="current" class="form-label col-sm-2">{% trans %}current password{% endtrans %}</label>
2021-12-21 07:30:36 +00:00
<div class="col-sm-10">
<input type="password" name="current" id="current" value="" class="form-control">
</div>
</div>
<div class="row mb-3">
2021-12-23 08:14:27 +00:00
<label for="new" class="form-label col-sm-2">{% trans %}new password{% endtrans %}</label>
2021-12-21 07:30:36 +00:00
<div class="col-sm-10">
2021-12-23 08:14:27 +00:00
<input type="password" name="new" id="new" value="" class="form-control" aria-describedby="newHelp">
<div id="newHelp" class="form-text">{% trans %}Your new password must be atleast 12 characters long.{% endtrans %}</div>
2021-12-21 07:30:36 +00:00
</div>
</div>
<div class="row mb-3">
2021-12-23 08:14:27 +00:00
<label for="repeat" class="form-label col-sm-2">{% trans %}repeat new password{% endtrans %}</label>
2021-12-21 07:30:36 +00:00
<div class="col-sm-10">
<input type="password" name="repeat" id="repeat" value="" class="form-control">
</div>
</div>
2021-12-23 08:14:27 +00:00
<input type="submit" name="passwordchange" value="{% trans %}change password{% endtrans %}" class="btn btn-primary mb-3"><br>
2021-12-21 07:30:36 +00:00
</fieldset>
</form>
{% endblock %}