mailcow/data/web/templates/admin/tab-config-customize.twig

131 lines
8.3 KiB
Twig
Raw Normal View History

2022-03-30 12:54:38 +02:00
<div role="tabpanel" class="tab-pane fade" id="tab-config-customize" role="tabpanel" aria-labelledby="tab-config-customize">
2022-06-06 20:38:24 +02:00
<div class="card mb-4">
2022-10-11 11:41:06 +02:00
<div class="card-header d-flex fs-5">
2022-06-06 20:38:24 +02:00
<button class="btn d-md-none flex-grow-1 text-start" data-bs-target="#collapse-tab-config-customize" data-bs-toggle="collapse" aria-controls="ollapse-tab-config-customize">
{{ lang.admin.customize }}
</button>
<span class="d-none d-md-block">{{ lang.admin.customize }}</span>
</div>
<div id="collapse-tab-config-customize" class="card-body collapse" data-bs-parent="#admin-content">
2022-03-31 12:57:33 +02:00
<legend><i class="bi bi-file-image"></i> {{ lang.admin.change_logo }}</legend><hr />
<p class="text-muted">{{ lang.admin.logo_info }}</p>
<form class="form-inline" role="form" method="post" enctype="multipart/form-data">
<p>
2022-04-13 16:37:52 +02:00
<input class="mb-4" type="file" name="main_logo" accept="image/gif, image/jpeg, image/pjpeg, image/x-png, image/png, image/svg+xml"><br>
2022-03-31 15:24:10 +02:00
<button name="submit_main_logo" type="submit" class="btn btn-sm d-block d-sm-inline btn-secondary"><i class="bi bi-upload"></i> {{ lang.admin.upload }}</button>
</p>
</form>
{% if logo %}
<div class="row">
<div class="col-sm-4">
<div class="thumbnail">
<img class="img-thumbnail" src="{{ logo }}" alt="mailcow logo">
<div class="caption">
2022-03-31 12:41:50 +02:00
<span class="badge fs-5 bg-info">{{ logo_specs.geometry.width }}x{{ logo_specs.geometry.height }} px</span>
<span class="badge fs-5 bg-info">{{ logo_specs.mimetype }}</span>
<span class="badge fs-5 bg-info">{{ logo_specs.fileSize }}</span>
</div>
</div>
<hr>
<form class="form-inline" role="form" method="post">
2022-03-31 15:24:10 +02:00
<p><button name="reset_main_logo" type="submit" class="btn btn-sm d-block d-sm-inline btn-secondary">{{ lang.admin.reset_default }}</button></p>
</form>
</div>
</div>
{% endif %}
2023-01-06 12:09:15 +01:00
<legend style="padding-top:20px" unselectable="on">{{ lang.admin.ip_check }}</legend><hr />
<div id="ip_check">
<form class="form" data-id="ip_check" role="form" method="post">
<div class="mb-4">
<input class="form-check-input" type="checkbox" value="1" name="ip_check_opt_in" id="ip_check_opt_in" {% if ip_check == 1 %}checked{% endif %}>
<label class="form-check-label" for="ip_check_opt_in">
{{ lang.admin.ip_check_opt_in|raw }}
</label>
</div>
<p><div class="btn-group">
<button class="btn btn-sm btn-xs-half d-block d-sm-inline btn-success" data-action="edit_selected" data-item="admin" data-id="ip_check" data-reload="no" data-api-url='edit/ip_check' data-api-attr='{}' href="#"><i class="bi bi-check-lg"></i> {{ lang.admin.save }}</button>
</div></p>
</form>
</div>
2022-03-31 12:57:33 +02:00
<legend>{{ lang.admin.app_links }}</legend><hr />
<p class="text-muted">{{ lang.admin.merged_vars_hint|raw }}</p>
<form class="form-inline" data-id="app_links" role="form" method="post">
<table class="table table-condensed" style="white-space: nowrap;" id="app_link_table">
<tr>
<th>{{ lang.admin.app_name }}</th>
<th>{{ lang.admin.link }}</th>
2022-07-06 16:55:31 +02:00
<th style="width:100px;">&nbsp;</th>
</tr>
{% for row in app_links %}
{% for key, val in row %}
<tr>
<td><input class="input-sm input-xs-lg form-control" data-id="app_links" type="text" name="app" required value="{{ key }}"></td>
<td><input class="input-sm input-xs-lg form-control" data-id="app_links" type="text" name="href" required value="{{ val }}"></td>
2022-07-06 16:55:31 +02:00
<td><a href="#" role="button" class="btn btn-sm btn-xs-lg btn-secondary h-100 w-100" type="button">{{ lang.admin.remove_row }}</a></td>
</tr>
{% endfor %}
{% endfor %}
{% for app in mailcow_apps %}
<tr>
<td><input class="input-sm input-xs-lg form-control" value="{{ app.name }}" disabled></td>
<td><input class="input-sm input-xs-lg form-control" value="{{ app.link }}" disabled></td>
2022-07-06 16:55:31 +02:00
<td><a href="#" role="button" class="btn btn-sm btn-xs-lg btn-secondary h-100 w-100 disabled" type="button">{{ lang.admin.remove_row }}</a></td>
</tr>
{% endfor %}
</table>
<p><div class="btn-group">
2022-03-31 15:24:10 +02:00
<button class="btn btn-sm btn-xs-half d-block d-sm-inline btn-success" data-action="edit_selected" data-item="admin" data-id="app_links" data-reload="no" data-api-url='edit/app_links' data-api-attr='{}' href="#"><i class="bi bi-check-lg"></i> {{ lang.admin.save }}</button>
<button class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary" type="button" id="add_app_link_row">{{ lang.admin.add_row }}</button>
</div></p>
</form>
2022-03-31 12:57:33 +02:00
<legend data-bs-target="#ui_texts" style="padding-top:20px" unselectable="on">{{ lang.admin.ui_texts }}</legend><hr />
<div id="ui_texts">
<form class="form" data-id="uitexts" role="form" method="post">
2022-04-13 16:37:52 +02:00
<div class="mb-2">
<label for="uitests_title_name">{{ lang.admin.title_name }}:</label>
<input type="text" class="form-control" id="uitests_title_name" name="title_name" placeholder="mailcow UI" value="{{ ui_texts.title_name|raw }}">
</div>
2022-04-13 16:37:52 +02:00
<div class="mb-2">
<label for="uitests_main_name">{{ lang.admin.main_name }}:</label>
<input type="text" class="form-control" id="uitests_main_name" name="main_name" placeholder="mailcow UI" value="{{ ui_texts.main_name|raw }}">
</div>
2022-04-13 16:37:52 +02:00
<div class="mb-2">
<label for="uitests_apps_name">{{ lang.admin.apps_name }}:</label>
<input type="text" class="form-control" id="uitests_apps_name" name="apps_name" placeholder="{{ lang.header.apps }}" value="{{ ui_texts.apps_name|raw }}">
</div>
2022-04-13 16:37:52 +02:00
<div class="mb-4">
<label for="help_text">{{ lang.admin.help_text }}:</label>
<textarea class="form-control" id="help_text" name="help_text" rows="7">{{ ui_texts.help_text|raw }}</textarea>
</div>
<hr>
2022-04-13 14:07:07 +02:00
<div>
2022-03-31 12:57:33 +02:00
<p class="text-muted">{{ lang.admin.ui_header_announcement_help }}</p>
<label for="ui_announcement_type">{{ lang.admin.ui_header_announcement }}:</label>
2022-04-13 16:37:52 +02:00
<div class="row">
<div class="col-12 col-md-6 col-lg-4 col-xl-3">
<p><select multiple data-width="100%" id="ui_announcement_type" name="ui_announcement_type" class="selectpicker show-tick" data-max-options="1" title="{{ lang.admin.ui_header_announcement_select }}">
<option {% if ui_texts.ui_announcement_type == 'info' %}selected{% endif %} value="info">{{ lang.admin.ui_header_announcement_type_info }}</option>
<option {% if ui_texts.ui_announcement_type == 'warning' %}selected{% endif %} value="warning">{{ lang.admin.ui_header_announcement_type_warning }}</option>
<option {% if ui_texts.ui_announcement_type == 'danger' %}selected{% endif %} value="danger">{{ lang.admin.ui_header_announcement_type_danger }}</option>
</select></p>
</div>
</div>
<p><textarea class="form-control" id="ui_announcement_text" name="ui_announcement_text" rows="7">{{ ui_texts.ui_announcement_text }}</textarea></p>
<div class="checkbox">
<label>
<input type="checkbox" name="ui_announcement_active" class="form-check-input" {% if ui_texts.ui_announcement_active == 1 %}checked{% endif %}> {{ lang.admin.ui_header_announcement_active }}
</label>
</div>
</div>
<hr>
2022-04-13 16:37:52 +02:00
<div class="mb-4">
<label for="ui_footer">{{ lang.admin.ui_footer }}:</label>
<textarea class="form-control" id="ui_footer" name="ui_footer" rows="7">{{ ui_texts.ui_footer }}</textarea>
</div>
2022-03-31 15:24:10 +02:00
<button class="btn btn-sm d-block d-sm-inline btn-success" data-action="edit_selected" data-item="ui" data-id="uitexts" data-api-url='edit/ui_texts' data-api-attr='{}' href="#"><i class="bi bi-check-lg"></i> {{ lang.admin.save }}</button>
</form>
</div>
</div>
</div>
</div>