Completed
Pull Request — master (#5277)
by Morris
22:25
created
settings/templates/personal.php 1 patch
Spacing   +60 added lines, -60 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>
@@ -252,19 +252,19 @@  discard block
 block discarded – undo
252 252
 <?php endif; ?>
253 253
 
254 254
 <?php
255
-if($_['passwordChangeSupported']) {
255
+if ($_['passwordChangeSupported']) {
256 256
 	script('jquery-showpassword');
257 257
 ?>
258 258
 <form id="passwordform" class="section">
259
-	<h2 class="inlineblock"><?php p($l->t('Password'));?></h2>
259
+	<h2 class="inlineblock"><?php p($l->t('Password')); ?></h2>
260 260
 	<div id="password-error-msg" class="msg success inlineblock" style="display: none;">Saved</div>
261 261
 	<br>
262 262
 	<label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label>
263 263
 	<input type="password" id="pass1" name="oldpassword"
264
-		placeholder="<?php p($l->t('Current password'));?>"
264
+		placeholder="<?php p($l->t('Current password')); ?>"
265 265
 		autocomplete="off" autocapitalize="none" autocorrect="off" />
266 266
 	<div class="personal-show-container">
267
-		<label for="pass2" class="hidden-visually"><?php p($l->t('New password'));?>: </label>
267
+		<label for="pass2" class="hidden-visually"><?php p($l->t('New password')); ?>: </label>
268 268
 		<input type="password" id="pass2" name="newpassword"
269 269
 			placeholder="<?php p($l->t('New password')); ?>"
270 270
 			data-typetoggle="#personal-show"
@@ -280,44 +280,44 @@  discard block
 block discarded – undo
280 280
 
281 281
 <form id="language" class="section">
282 282
 	<h2>
283
-		<label for="languageinput"><?php p($l->t('Language'));?></label>
283
+		<label for="languageinput"><?php p($l->t('Language')); ?></label>
284 284
 	</h2>
285
-	<select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>">
286
-		<option value="<?php p($_['activelanguage']['code']);?>">
287
-			<?php p($_['activelanguage']['name']);?>
285
+	<select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language')); ?>">
286
+		<option value="<?php p($_['activelanguage']['code']); ?>">
287
+			<?php p($_['activelanguage']['name']); ?>
288 288
 		</option>
289
-		<?php foreach($_['commonlanguages'] as $language):?>
290
-			<option value="<?php p($language['code']);?>">
291
-				<?php p($language['name']);?>
289
+		<?php foreach ($_['commonlanguages'] as $language):?>
290
+			<option value="<?php p($language['code']); ?>">
291
+				<?php p($language['name']); ?>
292 292
 			</option>
293
-		<?php endforeach;?>
293
+		<?php endforeach; ?>
294 294
 		<optgroup label="––––––––––"></optgroup>
295
-		<?php foreach($_['languages'] as $language):?>
296
-			<option value="<?php p($language['code']);?>">
297
-				<?php p($language['name']);?>
295
+		<?php foreach ($_['languages'] as $language):?>
296
+			<option value="<?php p($language['code']); ?>">
297
+				<?php p($language['name']); ?>
298 298
 			</option>
299
-		<?php endforeach;?>
299
+		<?php endforeach; ?>
300 300
 	</select>
301 301
 	<a href="https://www.transifex.com/nextcloud/nextcloud/"
302 302
 		target="_blank" rel="noreferrer">
303
-		<em><?php p($l->t('Help translate'));?></em>
303
+		<em><?php p($l->t('Help translate')); ?></em>
304 304
 	</a>
305 305
 </form>
306 306
 
307 307
 
308 308
 <div id="clientsbox" class="section clientsbox">
309
-	<h2><?php p($l->t('Get the apps to sync your files'));?></h2>
309
+	<h2><?php p($l->t('Get the apps to sync your files')); ?></h2>
310 310
 	<a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank">
311 311
 		<img src="<?php print_unescaped(image_path('core', 'desktopapp.svg')); ?>"
312
-			 alt="<?php p($l->t('Desktop client'));?>" />
312
+			 alt="<?php p($l->t('Desktop client')); ?>" />
313 313
 	</a>
314 314
 	<a href="<?php p($_['clients']['android']); ?>" rel="noreferrer" target="_blank">
315 315
 		<img src="<?php print_unescaped(image_path('core', 'googleplay.png')); ?>"
316
-			 alt="<?php p($l->t('Android app'));?>" />
316
+			 alt="<?php p($l->t('Android app')); ?>" />
317 317
 	</a>
318 318
 	<a href="<?php p($_['clients']['ios']); ?>" rel="noreferrer" target="_blank">
319 319
 		<img src="<?php print_unescaped(image_path('core', 'appstore.svg')); ?>"
320
-			 alt="<?php p($l->t('iOS app'));?>" />
320
+			 alt="<?php p($l->t('iOS app')); ?>" />
321 321
 	</a>
322 322
 
323 323
 		<p>
@@ -333,19 +333,19 @@  discard block
 block discarded – undo
333 333
 				$l->t('If you want to support the project {contributeopen}join development{linkclose} or {contributeopen}spread the word{linkclose}!'))); ?>
334 334
 		</p>
335 335
 
336
-	<?php if(OC_APP::isEnabled('firstrunwizard')) {?>
337
-		<p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again'));?></a></p>
336
+	<?php if (OC_APP::isEnabled('firstrunwizard')) {?>
337
+		<p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again')); ?></a></p>
338 338
 	<?php }?>
339 339
 </div>
340 340
 
341 341
 <div id="security" class="section">
342
-	<h2><?php p($l->t('Security'));?></h2>
343
-	<p class="settings-hint hidden-when-empty"><?php p($l->t('Web, desktop, mobile clients and app specific passwords that currently have access to your account.'));?></p>
342
+	<h2><?php p($l->t('Security')); ?></h2>
343
+	<p class="settings-hint hidden-when-empty"><?php p($l->t('Web, desktop, mobile clients and app specific passwords that currently have access to your account.')); ?></p>
344 344
 	<table class="icon-loading">
345 345
 		<thead class="token-list-header">
346 346
 			<tr>
347
-				<th><?php p($l->t('Device'));?></th>
348
-				<th><?php p($l->t('Last activity'));?></th>
347
+				<th><?php p($l->t('Device')); ?></th>
348
+				<th><?php p($l->t('Last activity')); ?></th>
349 349
 				<th></th>
350 350
 			</tr>
351 351
 		</thead>
@@ -353,8 +353,8 @@  discard block
 block discarded – undo
353 353
 		</tbody>
354 354
 	</table>
355 355
 
356
-	<h3><?php p($l->t('App passwords'));?></h3>
357
-	<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>
356
+	<h3><?php p($l->t('App passwords')); ?></h3>
357
+	<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>
358 358
 	<div id="app-password-form">
359 359
 		<input id="app-password-name" type="text" placeholder="<?php p($l->t('App name')); ?>">
360 360
 		<button id="add-app-password" class="button"><?php p($l->t('Create new app password')); ?></button>
@@ -377,14 +377,14 @@  discard block
 block discarded – undo
377 377
 	</div>
378 378
 </div>
379 379
 
380
-<?php foreach($_['forms'] as $form) {
380
+<?php foreach ($_['forms'] as $form) {
381 381
 	if (isset($form['form'])) {?>
382
-	<div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div>
382
+	<div id="<?php isset($form['anchor']) ? p($form['anchor']) : p(''); ?>"><?php print_unescaped($form['form']); ?></div>
383 383
 	<?php }
384 384
 };?>
385 385
 
386 386
 <div class="section">
387
-	<h2><?php p($l->t('Version'));?></h2>
387
+	<h2><?php p($l->t('Version')); ?></h2>
388 388
 	<p><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" target="_blank"><?php p($theme->getTitle()); ?></a> <?php p(OC_Util::getHumanVersion()) ?></p>
389 389
 	<p><?php include('settings.development.notice.php'); ?></p>
390 390
 </div>
Please login to merge, or discard this patch.