@@ -1,51 +1,51 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @copyright Copyright (c) 2016 Arthur Schiwon <[email protected]> |
|
4 | - * |
|
5 | - * @author Arthur Schiwon <[email protected]> |
|
6 | - * |
|
7 | - * @license GNU AGPL version 3 or any later version |
|
8 | - * |
|
9 | - * This program is free software: you can redistribute it and/or modify |
|
10 | - * it under the terms of the GNU Affero General Public License as |
|
11 | - * published by the Free Software Foundation, either version 3 of the |
|
12 | - * License, or (at your option) any later version. |
|
13 | - * |
|
14 | - * This program is distributed in the hope that it will be useful, |
|
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 | - * GNU Affero General Public License for more details. |
|
18 | - * |
|
19 | - * You should have received a copy of the GNU Affero General Public License |
|
20 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
21 | - * |
|
22 | - */ |
|
3 | + * @copyright Copyright (c) 2016 Arthur Schiwon <[email protected]> |
|
4 | + * |
|
5 | + * @author Arthur Schiwon <[email protected]> |
|
6 | + * |
|
7 | + * @license GNU AGPL version 3 or any later version |
|
8 | + * |
|
9 | + * This program is free software: you can redistribute it and/or modify |
|
10 | + * it under the terms of the GNU Affero General Public License as |
|
11 | + * published by the Free Software Foundation, either version 3 of the |
|
12 | + * License, or (at your option) any later version. |
|
13 | + * |
|
14 | + * This program is distributed in the hope that it will be useful, |
|
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 | + * GNU Affero General Public License for more details. |
|
18 | + * |
|
19 | + * You should have received a copy of the GNU Affero General Public License |
|
20 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
21 | + * |
|
22 | + */ |
|
23 | 23 | |
24 | 24 | /** @var \OCP\IL10N $l */ |
25 | 25 | /** @var array $_ */ |
26 | 26 | |
27 | 27 | $mail_smtpauthtype = [ |
28 | - 'LOGIN' => $l->t('Login') |
|
28 | + 'LOGIN' => $l->t('Login') |
|
29 | 29 | ]; |
30 | 30 | |
31 | 31 | $mail_smtpsecure = [ |
32 | - '' => $l->t('None'), |
|
33 | - 'ssl' => $l->t('SSL/TLS') |
|
32 | + '' => $l->t('None'), |
|
33 | + 'ssl' => $l->t('SSL/TLS') |
|
34 | 34 | ]; |
35 | 35 | |
36 | 36 | $mail_smtpmode = [ |
37 | - ['smtp', 'SMTP'], |
|
37 | + ['smtp', 'SMTP'], |
|
38 | 38 | ]; |
39 | 39 | if ($_['sendmail_is_available']) { |
40 | - $mail_smtpmode[] = ['sendmail', 'Sendmail']; |
|
40 | + $mail_smtpmode[] = ['sendmail', 'Sendmail']; |
|
41 | 41 | } |
42 | 42 | if ($_['mail_smtpmode'] === 'qmail') { |
43 | - $mail_smtpmode[] = ['qmail', 'qmail']; |
|
43 | + $mail_smtpmode[] = ['qmail', 'qmail']; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $mail_sendmailmode = [ |
47 | - 'smtp' => 'smtp (-bs)', |
|
48 | - 'pipe' => 'pipe (-t)' |
|
47 | + 'smtp' => 'smtp (-bs)', |
|
48 | + 'pipe' => 'pipe (-t)' |
|
49 | 49 | ]; |
50 | 50 | |
51 | 51 | ?> |
@@ -65,29 +65,29 @@ discard block |
||
65 | 65 | <label for="mail_smtpmode"><?php p($l->t('Send mode')); ?></label> |
66 | 66 | <select name="mail_smtpmode" id="mail_smtpmode"> |
67 | 67 | <?php foreach ($mail_smtpmode as $smtpmode): |
68 | - $selected = ''; |
|
69 | - if ($smtpmode[0] == $_['mail_smtpmode']): |
|
70 | - $selected = 'selected="selected"'; |
|
71 | - endif; ?> |
|
68 | + $selected = ''; |
|
69 | + if ($smtpmode[0] == $_['mail_smtpmode']): |
|
70 | + $selected = 'selected="selected"'; |
|
71 | + endif; ?> |
|
72 | 72 | <option value="<?php p($smtpmode[0])?>" <?php p($selected) ?>><?php p($smtpmode[1]) ?></option> |
73 | 73 | <?php endforeach;?> |
74 | 74 | </select> |
75 | 75 | |
76 | 76 | <label id="mail_smtpsecure_label" for="mail_smtpsecure" |
77 | 77 | <?php if ($_['mail_smtpmode'] !== 'smtp') { |
78 | - print_unescaped(' class="hidden"'); |
|
79 | - } ?>> |
|
78 | + print_unescaped(' class="hidden"'); |
|
79 | + } ?>> |
|
80 | 80 | <?php p($l->t('Encryption')); ?> |
81 | 81 | </label> |
82 | 82 | <select name="mail_smtpsecure" id="mail_smtpsecure" |
83 | 83 | <?php if ($_['mail_smtpmode'] !== 'smtp') { |
84 | - print_unescaped(' class="hidden"'); |
|
85 | - } ?>> |
|
84 | + print_unescaped(' class="hidden"'); |
|
85 | + } ?>> |
|
86 | 86 | <?php foreach ($mail_smtpsecure as $secure => $name): |
87 | - $selected = ''; |
|
88 | - if ($secure == $_['mail_smtpsecure']): |
|
89 | - $selected = 'selected="selected"'; |
|
90 | - endif; ?> |
|
87 | + $selected = ''; |
|
88 | + if ($secure == $_['mail_smtpsecure']): |
|
89 | + $selected = 'selected="selected"'; |
|
90 | + endif; ?> |
|
91 | 91 | <option value="<?php p($secure)?>" <?php p($selected) ?>><?php p($name) ?></option> |
92 | 92 | <?php endforeach;?> |
93 | 93 | </select> |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | </p> |
112 | 112 | |
113 | 113 | <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] !== 'smtp') { |
114 | - print_unescaped(' class="hidden"'); |
|
115 | - } ?>> |
|
114 | + print_unescaped(' class="hidden"'); |
|
115 | + } ?>> |
|
116 | 116 | <label for="mail_smtphost"><?php p($l->t('Server address')); ?></label> |
117 | 117 | <input type="text" name="mail_smtphost" id="mail_smtphost" placeholder="smtp.example.com" |
118 | 118 | value="<?php p($_['mail_smtphost']) ?>" /> |
@@ -121,32 +121,32 @@ discard block |
||
121 | 121 | value="<?php p($_['mail_smtpport']) ?>" /> |
122 | 122 | </p> |
123 | 123 | <p id='setting_smtpauth' <?php if ($_['mail_smtpmode'] !== 'smtp') { |
124 | - print_unescaped(' class="hidden"'); |
|
125 | - } ?>> |
|
124 | + print_unescaped(' class="hidden"'); |
|
125 | + } ?>> |
|
126 | 126 | <label for='mail_smtpauthtype'><?php p($l->t('Authentication method')); ?> |
127 | 127 | <span class="icon-info" title="<?php p($l->t('Only applies when authentication is required')); ?>"></span> |
128 | 128 | </label> |
129 | 129 | <select name="mail_smtpauthtype" id="mail_smtpauthtype" disabled="disabled"> |
130 | 130 | <?php foreach ($mail_smtpauthtype as $authtype => $name): |
131 | - $selected = ''; |
|
132 | - if ($authtype == $_['mail_smtpauthtype']): |
|
133 | - $selected = 'selected="selected"'; |
|
134 | - endif; ?> |
|
131 | + $selected = ''; |
|
132 | + if ($authtype == $_['mail_smtpauthtype']): |
|
133 | + $selected = 'selected="selected"'; |
|
134 | + endif; ?> |
|
135 | 135 | <option value="<?php p($authtype) ?>" <?php p($selected) ?>><?php p($name) ?></option> |
136 | 136 | <?php endforeach; ?> |
137 | 137 | </select> |
138 | 138 | |
139 | 139 | <input type="checkbox" name="mail_smtpauth" id="mail_smtpauth" class="checkbox" value="1" |
140 | 140 | <?php if ($_['mail_smtpauth']) { |
141 | - print_unescaped('checked="checked"'); |
|
142 | - } ?> /> |
|
141 | + print_unescaped('checked="checked"'); |
|
142 | + } ?> /> |
|
143 | 143 | <label for="mail_smtpauth"><?php p($l->t('Authentication required')); ?></label> |
144 | 144 | </p> |
145 | 145 | </form> |
146 | 146 | <form class="mail_settings" id="mail_credentials_settings"> |
147 | 147 | <p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] !== 'smtp') { |
148 | - print_unescaped(' class="hidden"'); |
|
149 | - } ?>> |
|
148 | + print_unescaped(' class="hidden"'); |
|
149 | + } ?>> |
|
150 | 150 | <label for="mail_smtpname"><?php p($l->t('Credentials')); ?></label> |
151 | 151 | <input type="text" name="mail_smtpname" id="mail_smtpname" placeholder="<?php p($l->t('SMTP Username'))?>" |
152 | 152 | value="<?php p($_['mail_smtpname']) ?>" /> |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | |
53 | 53 | <div class="section" id="mail_general_settings"> |
54 | 54 | <form id="mail_general_settings_form" class="mail_settings"> |
55 | - <h2><?php p($l->t('Email server'));?></h2> |
|
55 | + <h2><?php p($l->t('Email server')); ?></h2> |
|
56 | 56 | <a target="_blank" rel="noreferrer noopener" class="icon-info" |
57 | - title="<?php p($l->t('Open documentation'));?>" |
|
57 | + title="<?php p($l->t('Open documentation')); ?>" |
|
58 | 58 | href="<?php p(link_to_docs('admin-email')); ?>"></a> |
59 | 59 | <p class="settings-hint"> |
60 | 60 | <?php p($l->t('It is important to set up this server to be able to send emails, like for password reset and notifications.')); ?> |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $selected = 'selected="selected"'; |
71 | 71 | endif; ?> |
72 | 72 | <option value="<?php p($smtpmode[0])?>" <?php p($selected) ?>><?php p($smtpmode[1]) ?></option> |
73 | - <?php endforeach;?> |
|
73 | + <?php endforeach; ?> |
|
74 | 74 | </select> |
75 | 75 | |
76 | 76 | <label id="mail_smtpsecure_label" for="mail_smtpsecure" |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $selected = 'selected="selected"'; |
90 | 90 | endif; ?> |
91 | 91 | <option value="<?php p($secure)?>" <?php p($selected) ?>><?php p($name) ?></option> |
92 | - <?php endforeach;?> |
|
92 | + <?php endforeach; ?> |
|
93 | 93 | </select> |
94 | 94 | |
95 | 95 | <label id="mail_sendmailmode_label" for="mail_sendmailmode" class="<?= $_['mail_smtpmode'] !== 'sendmail' ? 'hidden' : '' ?>"> |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | <select name="mail_sendmailmode" id="mail_sendmailmode" class="<?= $_['mail_smtpmode'] !== 'sendmail' ? 'hidden' : '' ?>"> |
99 | 99 | <?php foreach ($mail_sendmailmode as $sendmailmodeValue => $sendmailmodeLabel): ?> |
100 | 100 | <option value="<?php p($sendmailmodeValue)?>" <?= $sendmailmodeValue === $_['mail_sendmailmode'] ? 'selected="selected"' : '' ?>><?php p($sendmailmodeLabel) ?></option> |
101 | - <?php endforeach;?> |
|
101 | + <?php endforeach; ?> |
|
102 | 102 | </select> |
103 | 103 | </p> |
104 | 104 |