2015-08-02 19:23:24 +00:00
|
|
|
{% extends "layout.html" %}
|
2018-08-24 13:48:09 +00:00
|
|
|
{% block header %}
|
|
|
|
<link href="{{ url_for('static', filename='css/libs/bootstrap-table.min.css') }}" rel="stylesheet">
|
|
|
|
<link href="{{ url_for('static', filename='css/libs/bootstrap-editable.css') }}" rel="stylesheet">
|
|
|
|
{% endblock %}
|
2015-08-02 19:23:24 +00:00
|
|
|
{% block body %}
|
|
|
|
<div class="discover">
|
|
|
|
<h1>{{title}}</h1>
|
|
|
|
<form role="form" method="POST">
|
|
|
|
<div class="form-group">
|
2016-11-09 18:24:33 +00:00
|
|
|
<label for="mail_server">{{_('SMTP hostname')}}</label>
|
2015-08-02 19:23:24 +00:00
|
|
|
<input type="text" class="form-control" name="mail_server" id="mail_server" value="{{content.mail_server}}">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2017-01-18 18:07:45 +00:00
|
|
|
<label for="mail_port">{{_('SMTP port (usually 25 for plain SMTP and 465 for SSL and 587 for STARTTLS)')}}</label>
|
2015-08-02 19:23:24 +00:00
|
|
|
<input type="text" class="form-control" name="mail_port" id="mail_port" value="{{content.mail_port}}">
|
|
|
|
</div>
|
2016-03-27 21:36:51 +00:00
|
|
|
<div class="form-group">
|
2017-01-18 18:07:45 +00:00
|
|
|
<label for="mail_use_ssl">{{_('Encryption')}}</label>
|
|
|
|
<select name="mail_use_ssl" id="mail_use_ssl" class="form-control">
|
|
|
|
<option value="0" {% if content.mail_use_ssl == 0 %}selected{% endif %}>{{ _('None') }}</option>
|
|
|
|
<option value="1" {% if content.mail_use_ssl == 1 %}selected{% endif %}>{{ _('STARTTLS') }}</option>
|
|
|
|
<option value="2" {% if content.mail_use_ssl == 2 %}selected{% endif %}>{{ _('SSL/TLS') }}</option>
|
|
|
|
</select>
|
2016-03-27 21:36:51 +00:00
|
|
|
</div>
|
2015-08-02 19:23:24 +00:00
|
|
|
<div class="form-group">
|
2016-11-09 18:24:33 +00:00
|
|
|
<label for="mail_login">{{_('SMTP login')}}</label>
|
2015-08-02 19:23:24 +00:00
|
|
|
<input type="text" class="form-control" name="mail_login" id="mail_login" value="{{content.mail_login}}">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2016-11-09 18:24:33 +00:00
|
|
|
<label for="mail_password">{{_('SMTP password')}}</label>
|
2015-08-02 19:23:24 +00:00
|
|
|
<input type="password" class="form-control" name="mail_password" id="mail_password" value="{{content.mail_password}}">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2016-11-09 18:24:33 +00:00
|
|
|
<label for="mail_from">{{_('From e-mail')}}</label>
|
2015-08-02 19:23:24 +00:00
|
|
|
<input type="text" class="form-control" name="mail_from" id="mail_from" value="{{content.mail_from}}">
|
|
|
|
</div>
|
2016-12-23 08:53:39 +00:00
|
|
|
<button type="submit" name="submit" value="submit" class="btn btn-default">{{_('Save settings')}}</button>
|
|
|
|
<button type="submit" name="test" value="test" class="btn btn-default">{{_('Save settings and send Test E-Mail')}}</button>
|
2019-02-08 19:11:44 +00:00
|
|
|
<a href="{{ url_for('admin.admin') }}" id="back" class="btn btn-default">{{_('Back')}}</a>
|
2015-08-02 19:23:24 +00:00
|
|
|
</form>
|
2018-08-24 13:48:09 +00:00
|
|
|
{% if g.allow_registration %}
|
|
|
|
<h2>{{_('Allowed domains for registering')}}</h2>
|
2019-02-09 17:46:36 +00:00
|
|
|
<table class="table table-no-bordered" id="domain-table" data-url="{{url_for('admin.list_domain')}}" data-id-field="id" data-show-header="false" data-editable-mode="inline">
|
2018-08-24 13:48:09 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-02-09 17:46:36 +00:00
|
|
|
<th data-field="domain" id="domain" data-editable-type="text" data-editable-url="{{ url_for('admin.edit_domain')}}" data-editable="true" data-editable-title="{{_('Enter domainname')}}"></th>
|
2018-08-24 13:48:09 +00:00
|
|
|
<th data-field="id" id="id" data-visible="false"></th>
|
|
|
|
<th data-align="right" data-formatter="TableActions"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
2019-02-09 17:46:36 +00:00
|
|
|
<form id="domain_add" action="{{ url_for('admin.add_domain')}}" method="POST">
|
2018-08-24 13:48:09 +00:00
|
|
|
<div class="form-group required">
|
|
|
|
<label for="domainname">{{_('Add Domain')}}</label>
|
|
|
|
<input type="text" class="form-control" name="domainname" id="domainname" >
|
|
|
|
</div>
|
|
|
|
<button id="domain_submit" class="btn btn-default">{{_('Add')}}</button>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block modal %}
|
|
|
|
{% if g.allow_registration %}
|
|
|
|
<div id="DeleteDomain" class="modal fade" role="dialog">
|
|
|
|
<div class="modal-dialog modal-sm">
|
|
|
|
<!-- Modal content-->
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header bg-danger">
|
|
|
|
</div>
|
|
|
|
<div class="modal-body text-center">
|
|
|
|
<p>{{_('Do you really want to delete this domain rule?')}}</p>
|
|
|
|
<button type="button" class="btn btn-danger" id="btndeletedomain" >{{_('Delete')}}</button>
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{_('Back')}}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-02 19:23:24 +00:00
|
|
|
</div>
|
2018-08-24 13:48:09 +00:00
|
|
|
{% endif %}
|
2015-08-02 19:23:24 +00:00
|
|
|
{% endblock %}
|
2018-08-24 13:48:09 +00:00
|
|
|
{% block js %}
|
|
|
|
{% if g.allow_registration %}
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table-editable.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-editable.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/table.js') }}"></script>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|