blob: 5427ebd3911aa6e95b95d6e52160dbe0e749b55d [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001<div role="tabpanel" class="tab-pane" id="tab-config-customize">
2 <div class="panel panel-default">
3 <div class="panel-heading">{{ lang.admin.customize }}</div>
4 <div class="panel-body">
5 <legend><i class="bi bi-file-image"></i> {{ lang.admin.change_logo }}</legend>
6 <p class="help-block">{{ lang.admin.logo_info }}</p>
7 <form class="form-inline" role="form" method="post" enctype="multipart/form-data">
8 <p>
9 <input type="file" name="main_logo" accept="image/gif, image/jpeg, image/pjpeg, image/x-png, image/png, image/svg+xml"><br>
10 <button name="submit_main_logo" type="submit" class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default"><i class="bi bi-upload"></i> {{ lang.admin.upload }}</button>
11 </p>
12 </form>
13 {% if logo %}
14 <div class="row">
15 <div class="col-sm-4">
16 <div class="thumbnail">
17 <img class="img-thumbnail" src="{{ logo }}" alt="mailcow logo">
18 <div class="caption">
19 <span class="label label-info">{{ logo_specs.geometry.width }}x{{ logo_specs.geometry.height }} px</span>
20 <span class="label label-info">{{ logo_specs.mimetype }}</span>
21 <span class="label label-info">{{ logo_specs.fileSize }}</span>
22 </div>
23 </div>
24 <hr>
25 <form class="form-inline" role="form" method="post">
26 <p><button name="reset_main_logo" type="submit" class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default">{{ lang.admin.reset_default }}</button></p>
27 </form>
28 </div>
29 </div>
30 {% endif %}
31 <legend>{{ lang.admin.app_links }}</legend>
32 <p class="help-block">{{ lang.admin.merged_vars_hint|raw }}</p>
33 <form class="form-inline" data-id="app_links" role="form" method="post">
34 <table class="table table-condensed" style="white-space: nowrap;" id="app_link_table">
35 <tr>
36 <th>{{ lang.admin.app_name }}</th>
37 <th>{{ lang.admin.link }}</th>
38 <th>&nbsp;</th>
39 </tr>
40 {% for row in app_links %}
41 {% for key, val in row %}
42 <tr>
43 <td><input class="input-sm input-xs-lg form-control" data-id="app_links" type="text" name="app" required value="{{ key }}"></td>
44 <td><input class="input-sm input-xs-lg form-control" data-id="app_links" type="text" name="href" required value="{{ val }}"></td>
45 <td><a href="#" role="button" class="btn btn-sm btn-xs-lg btn-default" type="button">{{ lang.admin.remove_row }}</a></td>
46 </tr>
47 {% endfor %}
48 {% endfor %}
49 {% for app in mailcow_apps %}
50 <tr>
51 <td><input class="input-sm input-xs-lg form-control" value="{{ app.name }}" disabled></td>
52 <td><input class="input-sm input-xs-lg form-control" value="{{ app.link }}" disabled></td>
53 <td>&nbsp;</td>
54 </tr>
55 {% endfor %}
56 </table>
57 <p><div class="btn-group">
58 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-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>
59 <button class="btn btn-sm btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" type="button" id="add_app_link_row">{{ lang.admin.add_row }}</button>
60 <div class="clearfix visible-xs"></div>
61 </div></p>
62 </form>
63 <legend data-target="#ui_texts" style="padding-top:20px" unselectable="on">{{ lang.admin.ui_texts }}</legend>
64 <div id="ui_texts">
65 <form class="form" data-id="uitexts" role="form" method="post">
66 <div class="form-group">
67 <label for="uitests_title_name">{{ lang.admin.title_name }}:</label>
68 <input type="text" class="form-control" id="uitests_title_name" name="title_name" placeholder="mailcow UI" value="{{ ui_texts.title_name|raw }}">
69 </div>
70 <div class="form-group">
71 <label for="uitests_main_name">{{ lang.admin.main_name }}:</label>
72 <input type="text" class="form-control" id="uitests_main_name" name="main_name" placeholder="mailcow UI" value="{{ ui_texts.main_name|raw }}">
73 </div>
74 <div class="form-group">
75 <label for="uitests_apps_name">{{ lang.admin.apps_name }}:</label>
76 <input type="text" class="form-control" id="uitests_apps_name" name="apps_name" placeholder="{{ lang.header.apps }}" value="{{ ui_texts.apps_name|raw }}">
77 </div>
78 <div class="form-group">
79 <label for="help_text">{{ lang.admin.help_text }}:</label>
80 <textarea class="form-control" id="help_text" name="help_text" rows="7">{{ ui_texts.help_text|raw }}</textarea>
81 </div>
82 <hr>
83 <div class="form-group">
84 <p class="help-block">{{ lang.admin.ui_header_announcement_help }}</p>
85 <label for="ui_announcement_type">{{ lang.admin.ui_header_announcement }}:</label>
86 <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 }}">
87 <option {% if ui_texts.ui_announcement_type == 'info' %}selected{% endif %} value="info">{{ lang.admin.ui_header_announcement_type_info }}</option>
88 <option {% if ui_texts.ui_announcement_type == 'warning' %}selected{% endif %} value="warning">{{ lang.admin.ui_header_announcement_type_warning }}</option>
89 <option {% if ui_texts.ui_announcement_type == 'danger' %}selected{% endif %} value="danger">{{ lang.admin.ui_header_announcement_type_danger }}</option>
90 </select></p>
91 <p><textarea class="form-control" id="ui_announcement_text" name="ui_announcement_text" rows="7">{{ ui_texts.ui_announcement_text }}</textarea></p>
92 <div class="checkbox">
93 <label>
94 <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 }}
95 </label>
96 </div>
97 </div>
98 <hr>
99 <div class="form-group">
100 <label for="ui_footer">{{ lang.admin.ui_footer }}:</label>
101 <textarea class="form-control" id="ui_footer" name="ui_footer" rows="7">{{ ui_texts.ui_footer }}</textarea>
102 </div>
103 <button class="btn btn-sm visible-xs-block visible-sm-inline visible-md-inline visible-lg-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>
104 </form>
105 </div>
106 </div>
107 </div>
108</div>