Completed
Pull Request — master (#5255)
by Maxence
15:18
created
settings/templates/personal.php 1 patch
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 <div id="app-navigation">
12 12
 	<ul class="with-icon">
13
-	<?php foreach($_['forms'] as $form) {
13
+	<?php foreach ($_['forms'] as $form) {
14 14
 		if (isset($form['anchor'])) {
15
-			$anchor = '#' . $form['anchor'];
16
-			$class = 'nav-icon-' . $form['anchor'];
15
+			$anchor = '#'.$form['anchor'];
16
+			$class = 'nav-icon-'.$form['anchor'];
17 17
 			$sectionName = $form['section-name'];
18 18
 			print_unescaped(sprintf("<li><a href='%s' class='%s'>%s</a></li>", \OCP\Util::sanitizeHTML($anchor),
19 19
 			\OCP\Util::sanitizeHTML($class), \OCP\Util::sanitizeHTML($sectionName)));
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
 <div id="app-content">
26 26
 
27 27
 <div id="quota" class="section">
28
-	<div style="width:<?php p($_['usage_relative']);?>%"
29
-		<?php if($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>>
28
+	<div style="width:<?php p($_['usage_relative']); ?>%"
29
+		<?php if ($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>>
30 30
 		<p id="quotatext">
31 31
 			<?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?>
32 32
 				<?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>',
33
-					[$_['usage'], $_['total_space']]));?>
33
+					[$_['usage'], $_['total_space']])); ?>
34 34
 			<?php else: ?>
35 35
 				<?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong> (<strong>%s %%</strong>)',
36
-					[$_['usage'], $_['total_space'],  $_['usage_relative']]));?>
36
+					[$_['usage'], $_['total_space'], $_['usage_relative']])); ?>
37 37
 			<?php endif ?>
38 38
 		</p>
39 39
 	</div>
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 			</div>
68 68
 		</div>
69 69
 		<span class="icon-checkmark hidden"/>
70
-		<?php if($_['lookupServerUploadEnabled']) { ?>
70
+		<?php if ($_['lookupServerUploadEnabled']) { ?>
71 71
 		<input type="hidden" id="avatarscope" value="<?php p($_['avatarScope']) ?>">
72 72
 		<?php } ?>
73 73
 	</form>
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
 				<span class="icon-password"/>
82 82
 			</h2>
83 83
 			<input type="text" id="displayname" name="displayname"
84
-				<?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?>
84
+				<?php if (!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?>
85 85
 				value="<?php p($_['displayName']) ?>"
86 86
 				autocomplete="on" autocapitalize="none" autocorrect="off" />
87
-			<?php if(!$_['displayNameChangeSupported']) { ?>
88
-				<span><?php if(isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span>
87
+			<?php if (!$_['displayNameChangeSupported']) { ?>
88
+				<span><?php if (isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span>
89 89
 			<?php } ?>
90 90
 			<span class="icon-checkmark hidden"/>
91
-			<?php if($_['lookupServerUploadEnabled']) { ?>
91
+			<?php if ($_['lookupServerUploadEnabled']) { ?>
92 92
 			<input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>">
93 93
 			<?php } ?>
94 94
 		</form>
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
 				<label for="email"><?php p($l->t('Email')); ?></label>
100 100
 				<span class="icon-password"/>
101 101
 			</h2>
102
-			<div class="verify <?php if ($_['email'] === ''  || $_['emailScope'] !== 'public') p('hidden'); ?>">
102
+			<div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') p('hidden'); ?>">
103 103
 				<img id="verify-email" title="<?php p($_['emailMessage']); ?>" data-status="<?php p($_['emailVerification']) ?>" src="
104 104
 				<?php
105
-				switch($_['emailVerification']) {
105
+				switch ($_['emailVerification']) {
106 106
 					case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
107 107
 						p(image_path('core', 'actions/verifying.svg'));
108 108
 						break;
@@ -115,23 +115,23 @@  discard block
 block discarded – undo
115 115
 				?>">
116 116
 			</div>
117 117
 			<input type="email" name="email" id="email" value="<?php p($_['email']); ?>"
118
-				<?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?>
118
+				<?php if (!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?>
119 119
 				placeholder="<?php p($l->t('Your email address')); ?>"
120 120
 				autocomplete="on" autocapitalize="none" autocorrect="off" />
121
-			<?php if(!$_['displayNameChangeSupported']) { ?>
122
-				<span><?php if(isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span>
121
+			<?php if (!$_['displayNameChangeSupported']) { ?>
122
+				<span><?php if (isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span>
123 123
 			<?php } ?>
124
-			<?php if($_['displayNameChangeSupported']) { ?>
124
+			<?php if ($_['displayNameChangeSupported']) { ?>
125 125
 				<br />
126 126
 				<em><?php p($l->t('For password reset and notifications')); ?></em>
127 127
 			<?php } ?>
128 128
 			<span class="icon-checkmark hidden"/>
129
-			<?php if($_['lookupServerUploadEnabled']) { ?>
129
+			<?php if ($_['lookupServerUploadEnabled']) { ?>
130 130
 			<input type="hidden" id="emailscope" value="<?php p($_['emailScope']) ?>">
131 131
 			<?php } ?>
132 132
 		</form>
133 133
 	</div>
134
-	<?php if($_['lookupServerUploadEnabled']) { ?>
134
+	<?php if ($_['lookupServerUploadEnabled']) { ?>
135 135
 	<div class="personal-settings-setting-box">
136 136
 		<form id="phoneform" class="section">
137 137
 			<h2>
@@ -166,10 +166,10 @@  discard block
 block discarded – undo
166 166
 				<label for="website"><?php p($l->t('Website')); ?></label>
167 167
 				<span class="icon-password"/>
168 168
 			</h2>
169
-			<div class="verify <?php if ($_['website'] === ''  || $_['websiteScope'] !== 'public') p('hidden'); ?>">
169
+			<div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') p('hidden'); ?>">
170 170
 				<img id="verify-website" title="<?php p($_['websiteMessage']); ?>" data-status="<?php p($_['websiteVerification']) ?>" src="
171 171
 				<?php
172
-				switch($_['websiteVerification']) {
172
+				switch ($_['websiteVerification']) {
173 173
 					case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
174 174
 						p(image_path('core', 'actions/verifying.svg'));
175 175
 						break;
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
 						p(image_path('core', 'actions/verify.svg'));
181 181
 				}
182 182
 				?>"
183
-				<?php if($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?>
183
+				<?php if ($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?>
184 184
 				>
185 185
 				<div class="verification-dialog popovermenu bubble menu">
186 186
 					<div class="verification-dialog-content">
187 187
 						<p class="explainVerification"></p>
188 188
 						<p class="verificationCode"></p>
189
-						<p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p>
189
+						<p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.')); ?></p>
190 190
 					</div>
191 191
 				</div>
192 192
 			</div>
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
 				<label for="twitter"><?php p($l->t('Twitter')); ?></label>
204 204
 				<span class="icon-password"/>
205 205
 			</h2>
206
-			<div class="verify <?php if ($_['twitter'] === ''  || $_['twitterScope'] !== 'public') p('hidden'); ?>">
206
+			<div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') p('hidden'); ?>">
207 207
 				<img id="verify-twitter" title="<?php p($_['twitterMessage']); ?>" data-status="<?php p($_['twitterVerification']) ?>" src="
208 208
 				<?php
209
-				switch($_['twitterVerification']) {
209
+				switch ($_['twitterVerification']) {
210 210
 					case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
211 211
 						p(image_path('core', 'actions/verifying.svg'));
212 212
 						break;
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
 						p(image_path('core', 'actions/verify.svg'));
218 218
 				}
219 219
 				?>"
220
-				<?php if($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?>
220
+				<?php if ($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?>
221 221
 				>
222 222
 				<div class="verification-dialog popovermenu bubble menu">
223 223
 					<div class="verification-dialog-content">
224 224
 						<p class="explainVerification"></p>
225 225
 						<p class="verificationCode"></p>
226
-						<p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p>
226
+						<p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.')); ?></p>
227 227
 					</div>
228 228
 				</div>
229 229
 			</div>
@@ -248,19 +248,19 @@  discard block
 block discarded – undo
248 248
 </div>
249 249
 
250 250
 <?php
251
-if($_['passwordChangeSupported']) {
251
+if ($_['passwordChangeSupported']) {
252 252
 	script('jquery-showpassword');
253 253
 ?>
254 254
 <form id="passwordform" class="section">
255
-	<h2 class="inlineblock"><?php p($l->t('Password'));?></h2>
255
+	<h2 class="inlineblock"><?php p($l->t('Password')); ?></h2>
256 256
 	<div id="password-error-msg" class="msg success inlineblock" style="display: none;">Saved</div>
257 257
 	<br>
258 258
 	<label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label>
259 259
 	<input type="password" id="pass1" name="oldpassword"
260
-		placeholder="<?php p($l->t('Current password'));?>"
260
+		placeholder="<?php p($l->t('Current password')); ?>"
261 261
 		autocomplete="off" autocapitalize="none" autocorrect="off" />
262 262
 	<div class="personal-show-container">
263
-		<label for="pass2" class="hidden-visually"><?php p($l->t('New password'));?>: </label>
263
+		<label for="pass2" class="hidden-visually"><?php p($l->t('New password')); ?>: </label>
264 264
 		<input type="password" id="pass2" name="newpassword"
265 265
 			placeholder="<?php p($l->t('New password')); ?>"
266 266
 			data-typetoggle="#personal-show"
@@ -278,8 +278,8 @@  discard block
 block discarded – undo
278 278
 <?php
279 279
 if ($_['loginPortalUrl']) {
280 280
 ?>
281
-	<form id="passwordportal" class="section" action="<?php p($_['loginPortalUrl'] . 'password-change'); ?>" method="GET">
282
-	<h2 class="inlineblock"><?php p($l->t('Password'));?></h2>
281
+	<form id="passwordportal" class="section" action="<?php p($_['loginPortalUrl'].'password-change'); ?>" method="GET">
282
+	<h2 class="inlineblock"><?php p($l->t('Password')); ?></h2>
283 283
 		<br>
284 284
 		<input id="passwordbutton" type="submit" value="<?php p($l->t('Change your password from the Portal')); ?>" />
285 285
 	</form>
@@ -289,44 +289,44 @@  discard block
 block discarded – undo
289 289
 
290 290
 <form id="language" class="section">
291 291
 	<h2>
292
-		<label for="languageinput"><?php p($l->t('Language'));?></label>
292
+		<label for="languageinput"><?php p($l->t('Language')); ?></label>
293 293
 	</h2>
294
-	<select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>">
295
-		<option value="<?php p($_['activelanguage']['code']);?>">
296
-			<?php p($_['activelanguage']['name']);?>
294
+	<select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language')); ?>">
295
+		<option value="<?php p($_['activelanguage']['code']); ?>">
296
+			<?php p($_['activelanguage']['name']); ?>
297 297
 		</option>
298
-		<?php foreach($_['commonlanguages'] as $language):?>
299
-			<option value="<?php p($language['code']);?>">
300
-				<?php p($language['name']);?>
298
+		<?php foreach ($_['commonlanguages'] as $language):?>
299
+			<option value="<?php p($language['code']); ?>">
300
+				<?php p($language['name']); ?>
301 301
 			</option>
302
-		<?php endforeach;?>
302
+		<?php endforeach; ?>
303 303
 		<optgroup label="––––––––––"></optgroup>
304
-		<?php foreach($_['languages'] as $language):?>
305
-			<option value="<?php p($language['code']);?>">
306
-				<?php p($language['name']);?>
304
+		<?php foreach ($_['languages'] as $language):?>
305
+			<option value="<?php p($language['code']); ?>">
306
+				<?php p($language['name']); ?>
307 307
 			</option>
308
-		<?php endforeach;?>
308
+		<?php endforeach; ?>
309 309
 	</select>
310 310
 	<a href="https://www.transifex.com/nextcloud/nextcloud/"
311 311
 		target="_blank" rel="noreferrer">
312
-		<em><?php p($l->t('Help translate'));?></em>
312
+		<em><?php p($l->t('Help translate')); ?></em>
313 313
 	</a>
314 314
 </form>
315 315
 
316 316
 
317 317
 <div id="clientsbox" class="section clientsbox">
318
-	<h2><?php p($l->t('Get the apps to sync your files'));?></h2>
318
+	<h2><?php p($l->t('Get the apps to sync your files')); ?></h2>
319 319
 	<a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank">
320 320
 		<img src="<?php print_unescaped(image_path('core', 'desktopapp.svg')); ?>"
321
-			 alt="<?php p($l->t('Desktop client'));?>" />
321
+			 alt="<?php p($l->t('Desktop client')); ?>" />
322 322
 	</a>
323 323
 	<a href="<?php p($_['clients']['android']); ?>" rel="noreferrer" target="_blank">
324 324
 		<img src="<?php print_unescaped(image_path('core', 'googleplay.png')); ?>"
325
-			 alt="<?php p($l->t('Android app'));?>" />
325
+			 alt="<?php p($l->t('Android app')); ?>" />
326 326
 	</a>
327 327
 	<a href="<?php p($_['clients']['ios']); ?>" rel="noreferrer" target="_blank">
328 328
 		<img src="<?php print_unescaped(image_path('core', 'appstore.svg')); ?>"
329
-			 alt="<?php p($l->t('iOS app'));?>" />
329
+			 alt="<?php p($l->t('iOS app')); ?>" />
330 330
 	</a>
331 331
 
332 332
 		<p>
@@ -342,19 +342,19 @@  discard block
 block discarded – undo
342 342
 				$l->t('If you want to support the project {contributeopen}join development{linkclose} or {contributeopen}spread the word{linkclose}!'))); ?>
343 343
 		</p>
344 344
 
345
-	<?php if(OC_APP::isEnabled('firstrunwizard')) {?>
346
-		<p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again'));?></a></p>
345
+	<?php if (OC_APP::isEnabled('firstrunwizard')) {?>
346
+		<p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again')); ?></a></p>
347 347
 	<?php }?>
348 348
 </div>
349 349
 
350 350
 <div id="sessions" class="section">
351
-	<h2><?php p($l->t('Sessions'));?></h2>
352
-	<p class="settings-hint hidden-when-empty"><?php p($l->t('Web, desktop and mobile clients currently logged in to your account.'));?></p>
351
+	<h2><?php p($l->t('Sessions')); ?></h2>
352
+	<p class="settings-hint hidden-when-empty"><?php p($l->t('Web, desktop and mobile clients currently logged in to your account.')); ?></p>
353 353
 	<table class="icon-loading">
354 354
 		<thead class="token-list-header">
355 355
 			<tr>
356
-				<th><?php p($l->t('Device'));?></th>
357
-				<th><?php p($l->t('Last activity'));?></th>
356
+				<th><?php p($l->t('Device')); ?></th>
357
+				<th><?php p($l->t('Last activity')); ?></th>
358 358
 				<th></th>
359 359
 			</tr>
360 360
 		</thead>
@@ -364,13 +364,13 @@  discard block
 block discarded – undo
364 364
 </div>
365 365
 
366 366
 <div id="apppasswords" class="section">
367
-	<h2><?php p($l->t('App passwords'));?></h2>
368
-	<p class="settings-hint"><?php p($l->t('Here you can generate individual passwords for apps so you don’t have to give out your password. You can revoke them individually too.'));?></p>
367
+	<h2><?php p($l->t('App passwords')); ?></h2>
368
+	<p class="settings-hint"><?php p($l->t('Here you can generate individual passwords for apps so you don’t have to give out your password. You can revoke them individually too.')); ?></p>
369 369
 	<table class="icon-loading">
370 370
 		<thead class="hidden-when-empty">
371 371
 			<tr>
372
-				<th><?php p($l->t('Name'));?></th>
373
-				<th><?php p($l->t('Last activity'));?></th>
372
+				<th><?php p($l->t('Name')); ?></th>
373
+				<th><?php p($l->t('Last activity')); ?></th>
374 374
 				<th></th>
375 375
 			</tr>
376 376
 		</thead>
@@ -399,14 +399,14 @@  discard block
 block discarded – undo
399 399
 	</div>
400 400
 </div>
401 401
 
402
-<?php foreach($_['forms'] as $form) {
402
+<?php foreach ($_['forms'] as $form) {
403 403
 	if (isset($form['form'])) {?>
404
-	<div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div>
404
+	<div id="<?php isset($form['anchor']) ? p($form['anchor']) : p(''); ?>"><?php print_unescaped($form['form']); ?></div>
405 405
 	<?php }
406 406
 };?>
407 407
 
408 408
 <div class="section">
409
-	<h2><?php p($l->t('Version'));?></h2>
409
+	<h2><?php p($l->t('Version')); ?></h2>
410 410
 	<p><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" target="_blank"><?php p($theme->getTitle()); ?></a> <?php p(OC_Util::getHumanVersion()) ?></p>
411 411
 	<p><?php include('settings.development.notice.php'); ?></p>
412 412
 </div>
Please login to merge, or discard this patch.