blob: 4ec6aecbdaabb43d506fe8053bda878aae2d61dc [file] [log] [blame]
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +01001<div role="tabpanel" class="tab-pane fade" id="tab-config-customize" role="tabpanel" aria-labelledby="tab-config-customize">
2 <div class="card mb-4">
3 <div class="card-header d-flex fs-5">
4 <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">
5 {{ lang.admin.customize }}
6 </button>
7 <span class="d-none d-md-block">{{ lang.admin.customize }}</span>
8 </div>
9 <div id="collapse-tab-config-customize" class="card-body collapse" data-bs-parent="#admin-content">
10 <legend><i class="bi bi-file-image"></i> {{ lang.admin.change_logo }}</legend><hr />
11 <p class="text-muted">{{ lang.admin.logo_info }}</p>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010012 <form class="form-inline" role="form" method="post" enctype="multipart/form-data">
13 <p>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010014 <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>
15 <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>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010016 </p>
17 </form>
18 {% if logo %}
19 <div class="row">
20 <div class="col-sm-4">
21 <div class="thumbnail">
22 <img class="img-thumbnail" src="{{ logo }}" alt="mailcow logo">
23 <div class="caption">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010024 <span class="badge fs-5 bg-info">{{ logo_specs.geometry.width }}x{{ logo_specs.geometry.height }} px</span>
25 <span class="badge fs-5 bg-info">{{ logo_specs.mimetype }}</span>
26 <span class="badge fs-5 bg-info">{{ logo_specs.fileSize }}</span>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010027 </div>
28 </div>
29 <hr>
30 <form class="form-inline" role="form" method="post">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010031 <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>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010032 </form>
33 </div>
34 </div>
35 {% endif %}
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010036 <legend>{{ lang.admin.app_links }}</legend><hr />
37 <p class="text-muted">{{ lang.admin.merged_vars_hint|raw }}</p>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010038 <form class="form-inline" data-id="app_links" role="form" method="post">
39 <table class="table table-condensed" style="white-space: nowrap;" id="app_link_table">
40 <tr>
41 <th>{{ lang.admin.app_name }}</th>
42 <th>{{ lang.admin.link }}</th>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010043 <th style="width:100px;">&nbsp;</th>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010044 </tr>
45 {% for row in app_links %}
46 {% for key, val in row %}
47 <tr>
48 <td><input class="input-sm input-xs-lg form-control" data-id="app_links" type="text" name="app" required value="{{ key }}"></td>
49 <td><input class="input-sm input-xs-lg form-control" data-id="app_links" type="text" name="href" required value="{{ val }}"></td>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010050 <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>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010051 </tr>
52 {% endfor %}
53 {% endfor %}
54 {% for app in mailcow_apps %}
55 <tr>
56 <td><input class="input-sm input-xs-lg form-control" value="{{ app.name }}" disabled></td>
57 <td><input class="input-sm input-xs-lg form-control" value="{{ app.link }}" disabled></td>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010058 <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>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010059 </tr>
60 {% endfor %}
61 </table>
62 <p><div class="btn-group">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010063 <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>
64 <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>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010065 </div></p>
66 </form>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010067 <legend data-bs-target="#ui_texts" style="padding-top:20px" unselectable="on">{{ lang.admin.ui_texts }}</legend><hr />
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010068 <div id="ui_texts">
69 <form class="form" data-id="uitexts" role="form" method="post">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010070 <div class="mb-2">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010071 <label for="uitests_title_name">{{ lang.admin.title_name }}:</label>
72 <input type="text" class="form-control" id="uitests_title_name" name="title_name" placeholder="mailcow UI" value="{{ ui_texts.title_name|raw }}">
73 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010074 <div class="mb-2">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010075 <label for="uitests_main_name">{{ lang.admin.main_name }}:</label>
76 <input type="text" class="form-control" id="uitests_main_name" name="main_name" placeholder="mailcow UI" value="{{ ui_texts.main_name|raw }}">
77 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010078 <div class="mb-2">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010079 <label for="uitests_apps_name">{{ lang.admin.apps_name }}:</label>
80 <input type="text" class="form-control" id="uitests_apps_name" name="apps_name" placeholder="{{ lang.header.apps }}" value="{{ ui_texts.apps_name|raw }}">
81 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010082 <div class="mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010083 <label for="help_text">{{ lang.admin.help_text }}:</label>
84 <textarea class="form-control" id="help_text" name="help_text" rows="7">{{ ui_texts.help_text|raw }}</textarea>
85 </div>
86 <hr>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010087 <div>
88 <p class="text-muted">{{ lang.admin.ui_header_announcement_help }}</p>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010089 <label for="ui_announcement_type">{{ lang.admin.ui_header_announcement }}:</label>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010090 <div class="row">
91 <div class="col-12 col-md-6 col-lg-4 col-xl-3">
92 <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 }}">
93 <option {% if ui_texts.ui_announcement_type == 'info' %}selected{% endif %} value="info">{{ lang.admin.ui_header_announcement_type_info }}</option>
94 <option {% if ui_texts.ui_announcement_type == 'warning' %}selected{% endif %} value="warning">{{ lang.admin.ui_header_announcement_type_warning }}</option>
95 <option {% if ui_texts.ui_announcement_type == 'danger' %}selected{% endif %} value="danger">{{ lang.admin.ui_header_announcement_type_danger }}</option>
96 </select></p>
97 </div>
98 </div>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010099 <p><textarea class="form-control" id="ui_announcement_text" name="ui_announcement_text" rows="7">{{ ui_texts.ui_announcement_text }}</textarea></p>
100 <div class="checkbox">
101 <label>
102 <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 }}
103 </label>
104 </div>
105 </div>
106 <hr>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +0100107 <div class="mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100108 <label for="ui_footer">{{ lang.admin.ui_footer }}:</label>
109 <textarea class="form-control" id="ui_footer" name="ui_footer" rows="7">{{ ui_texts.ui_footer }}</textarea>
110 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +0100111 <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>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100112 </form>
113 </div>
114 </div>
115 </div>
116</div>