Remaining HTML fixes email, autocomplete, use default server in logindata if none passed
Hanno Böck

Hanno Böck commited on 2024-02-02 13:40:33
Zeige 4 geänderte Dateien mit 28 Einfügungen und 23 Löschungen.

... ...
@@ -57,15 +57,15 @@ if (isset($_POST['password1']) && $_POST['password1'] != '') {
57 57
 output('<p>Hier können Sie Ihr Passwort ändern.</p>
58 58
 ' . html_form('email_chpass', 'chpass', '', '<table>
59 59
   <tr>
60
-    <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
60
+    <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value=""></td>
61 61
   </tr>
62 62
   <tr>
63
-    <td>neues Passwort:</td>       <td><input type="password" name="password1" value="" autocomplete="new-password" /></td>
63
+    <td>neues Passwort:</td>       <td><input type="password" name="password1" value="" autocomplete="new-password"></td>
64 64
   </tr>
65 65
   <tr>
66
-    <td>Bestätigung:<br /><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>
67
-                                   <td><input type="password" name="password2" value="" autocomplete="new-password" /></td>
66
+    <td>Bestätigung:<br><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>
67
+                                   <td><input type="password" name="password2" value="" autocomplete="new-password"></td>
68 68
   </tr>
69 69
 </table>
70
-<p><input type="submit" value="Speichern" /></p>
70
+<p><input type="submit" value="Speichern"></p>
71 71
 '));
... ...
@@ -91,25 +91,25 @@ if (isset($_GET['action']) && $_GET['action'] == 'save') {
91 91
   <tr><th>Einstellung:</th><th>Wert:</th><th>&#160;</th></tr>
92 92
   <tr>
93 93
     <td>Benutzername:</td>
94
-    <td><input type="text" id="user" name="user" />@<select name="domain" size="1">
94
+    <td><input type="text" id="user" name="user">@<select name="domain" size="1">
95 95
     <option value="' . config('masterdomain') . '">' . config('masterdomain') . '</option>
96 96
   ' . $options . '
97 97
     </select></td>
98 98
   </tr>
99 99
   <tr>
100 100
     <td>Mailbox:</td>
101
-    <td><input type="text" id="mailbox" name="mailbox" value="' . $user['homedir'] . '/" /></td>
101
+    <td><input type="text" id="mailbox" name="mailbox" value="' . $user['homedir'] . '/"></td>
102 102
   </tr>
103 103
   <tr>
104 104
     <td>Passwort:</td>
105
-    <td><input type="password" id="password" name="password" value="" /></td>
105
+    <td><input type="password" id="password" name="password" value="" autocomplete="new-password"></td>
106 106
   </tr>
107 107
   <tr>
108 108
     <td>Account sofort aktivieren:</td>
109
-    <td><input type="checkbox" id="enabled" name="enabled" value="true" /></td>
109
+    <td><input type="checkbox" id="enabled" name="enabled" value="true"></td>
110 110
   </tr>
111 111
   </table>
112
-  <p><input type="submit" name="create" value="Anlegen" /></p>
112
+  <p><input type="submit" name="create" value="Anlegen"></p>
113 113
   '));
114 114
 } elseif (isset($_GET['action']) && $_GET['action'] == 'delete' && $_GET['account'] != '') {
115 115
     $sure = user_is_sure();
... ...
@@ -154,8 +154,8 @@ if (isset($_GET['action']) && $_GET['action'] == 'save') {
154 154
     $form = '
155 155
   <table style="margin-bottom: 1em;">
156 156
   <tr><th>Einstellung:</th><th>alter Wert:</th><th>neuer Wert:</th><th>&#160;</th></tr>
157
-  <tr><td>Benutzername:</td><td><input type="text" id="old_account" name="old_account" value="' . $account['account'] . '" readonly="readonly" style="background-color: #C0C0C0;" /></td>
158
-          <td><input type="text" id="user" name="user" value="' . $username . '" />@<select name="domain" id="domain" size="1">
157
+  <tr><td>Benutzername:</td><td><input type="text" id="old_account" name="old_account" value="' . $account['account'] . '" readonly="readonly" style="background-color: #C0C0C0;"></td>
158
+          <td><input type="text" id="user" name="user" value="' . $username . '">@<select name="domain" id="domain" size="1">
159 159
     <option value="' . config('masterdomain') . '">' . config('masterdomain') . '</option>
160 160
     ';
161 161
     $domains = get_domain_list($user['customerno'], $user['uid']);
... ...
@@ -171,19 +171,19 @@ if (isset($_GET['action']) && $_GET['action'] == 'save') {
171 171
     }
172 172
 
173 173
     $form .= '</select></td>
174
-          <td><input type="button" onclick="document.getElementById(\'user\').value = \'' . $username . '\' ; document.getElementById(\'domain\').value = \'' . $domain . '\'" value="Zeile zurücksetzen" /></td></tr>
175
-  <tr><td>Mailbox:</td><td><input type="text" id="old_mailbox" name="old_mailbox" value="' . $account['mailbox'] . '" readonly="readonly" style="background-color: #C0C0C0;" /></td>
176
-          <td><input type="text" id="mailbox" name="mailbox" value="' . $account['mailbox'] . '" /></td>
177
-          <td><input type="button" onclick="document.getElementById(\'mailbox\').value = document.getElementById(\'old_mailbox\').value" value="Zeile zurücksetzen" /></td></tr>
174
+          <td><input type="button" onclick="document.getElementById(\'user\').value = \'' . $username . '\' ; document.getElementById(\'domain\').value = \'' . $domain . '\'" value="Zeile zurücksetzen"></td></tr>
175
+  <tr><td>Mailbox:</td><td><input type="text" id="old_mailbox" name="old_mailbox" value="' . $account['mailbox'] . '" readonly="readonly" style="background-color: #C0C0C0;"></td>
176
+          <td><input type="text" id="mailbox" name="mailbox" value="' . $account['mailbox'] . '"></td>
177
+          <td><input type="button" onclick="document.getElementById(\'mailbox\').value = document.getElementById(\'old_mailbox\').value" value="Zeile zurücksetzen"></td></tr>
178 178
   <tr><td>Passwort:</td><td><i>nicht angezeigt</i></td>
179
-          <td><input type="password" id="password" name="password" value="" /></td>
180
-          <td><input type="button" onclick="document.getElementById(\'password\').value = \'\'" value="Zeile zurücksetzen" /></td></tr>
179
+          <td><input type="password" id="password" name="password" value=""></td>
180
+          <td><input type="button" onclick="document.getElementById(\'password\').value = \'\'" value="Zeile zurücksetzen"></td></tr>
181 181
   <tr><td>Konto aktiv:</td>
182 182
     <td>&#160;</td>
183
-    <td><input type="checkbox" id="enabled" name="enabled" value="true"' . $enabled . ' /></td>
183
+    <td><input type="checkbox" id="enabled" name="enabled" value="true"' . $enabled . '></td>
184 184
     <td>&#160;</td></tr>
185 185
   </table>
186
-  <p><input type="submit" value="Änderungen speichern" /><br />
186
+  <p><input type="submit" value="Änderungen speichern"><br>
187 187
   Hinweis: Das Passwort wird nur geändert, wenn Sie auf dieser Seite eines eingeben. Geben Sie keines an, wird das bisherige beibehalten!</p>
188 188
   ';
189 189
     output(html_form('email_imap_edit', 'imap', 'action=save&id=' . $_GET['edit'], $form));
... ...
@@ -18,7 +18,10 @@ require_once('inc/base.php');
18 18
 $section = 'email_vmail';
19 19
 title("Einstellungen zum E-Mail-Abruf");
20 20
 
21
+$servername = "zucker.schokokeks.org";
22
+if (isset($_REQUEST['server'])) {
21 23
     $servername = filter_input_hostname($_REQUEST['server']);
24
+}
22 25
 $type = 'vmail';
23 26
 if (isset($_REQUEST['type']) && $_REQUEST['type'] == 'manual') {
24 27
     $type = 'manual';
... ...
@@ -67,15 +70,17 @@ output('<h3>Abruf mit einem E-Mail-Programm</h3>
67 70
 <dt>Passwort</dt><dd><em>Ihr E-Mail-Passwort</em></dd>
68 71
 </dl>
69 72
 </div>
70
-<br style="clear: left;" />
73
+<br style="clear: left;">
71 74
 <h3>SMTP</h3>
72 75
 <p>Zum Verschicken von E-Mails muss sich Ihr E-Mail-Programm auch per SMTP anmelden. Benutzen Sie dafür bitte die folgenden Daten:</p>
76
+<dl>
73 77
 <dt>Protokoll</dt><dd>SMTP</dd>
74 78
 <dt>Servername</dt><dd>' . $servername . '</dd>
75 79
 <dt>Port</dt><dd>465</dd>
76 80
 <dt>Verschlüsselung</dt><dd>SSL / TLS</dd>
77 81
 <dt>Benutzername</dt><dd><em>' . ($type == 'manual' ? 'Ihr Account-Name' : 'Ihre E-Mail-Adresse') . '</em></dd>
78 82
 <dt>Passwort</dt><dd><em>Ihr E-Mail-Passwort</em></dd>
79
-<br />
83
+</dl>
84
+<br>
80 85
 
81 86
 ');
... ...
@@ -43,7 +43,7 @@ output('<p>Mit dieser Funktion können Sie eine E-Mail-Adresse stilllegen (so we
43 43
 $form = "<h4>Text der Fehlermeldung</h4>" .
44 44
   "<p><textarea cols=\"80\" rows=\"10\" name=\"smtpreply\" id=\"smtpreply\">" . filter_output_html($account['smtpreply']) . "</textarea></p>";
45 45
 
46
-$form .= '<p><input id="submit" type="submit" value="Speichern" />&#160;&#160;&#160;&#160;';
46
+$form .= '<p><input id="submit" type="submit" value="Speichern">&#160;&#160;&#160;&#160;';
47 47
 if ($suspended) {
48 48
     $form .= internal_link('vmail', 'Abbrechen') . '</p>';
49 49
 } else {
50 50