summaryrefslogtreecommitdiffstats
path: root/apps/settings/templates
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /apps/settings/templates
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz
nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/settings/templates')
-rw-r--r--apps/settings/templates/help.php10
-rw-r--r--apps/settings/templates/settings-vue.php9
-rw-r--r--apps/settings/templates/settings/additional.php2
-rw-r--r--apps/settings/templates/settings/admin/additional-mail.php24
-rw-r--r--apps/settings/templates/settings/admin/overview.php6
-rw-r--r--apps/settings/templates/settings/admin/security.php23
-rw-r--r--apps/settings/templates/settings/admin/server.php38
-rw-r--r--apps/settings/templates/settings/admin/sharing.php124
-rw-r--r--apps/settings/templates/settings/frame.php15
-rw-r--r--apps/settings/templates/settings/personal/personal.info.php96
-rw-r--r--apps/settings/templates/settings/personal/security/password.php4
-rw-r--r--apps/settings/templates/settings/personal/security/twofactor.php7
12 files changed, 237 insertions, 121 deletions
diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php
index 0eccf78cc90..045f45d5d8a 100644
--- a/apps/settings/templates/help.php
+++ b/apps/settings/templates/help.php
@@ -4,14 +4,18 @@
<div id="app-navigation">
<ul>
<li>
- <a class="icon-user <?php if ($_['mode'] === 'user') { p('active'); } ?>"
+ <a class="icon-user <?php if ($_['mode'] === 'user') {
+ p('active');
+} ?>"
href="<?php print_unescaped($_['urlUserDocs']); ?>">
<?php p($l->t('User documentation')); ?>
</a>
</li>
- <?php if($_['admin']) { ?>
+ <?php if ($_['admin']) { ?>
<li>
- <a class="icon-user-admin <?php if ($_['mode'] === 'admin') { p('active'); } ?>"
+ <a class="icon-user-admin <?php if ($_['mode'] === 'admin') {
+ p('active');
+} ?>"
href="<?php print_unescaped($_['urlAdminDocs']); ?>">
<?php p($l->t('Administrator documentation')); ?>
</a>
diff --git a/apps/settings/templates/settings-vue.php b/apps/settings/templates/settings-vue.php
index f04d577fdae..8db9dc6286b 100644
--- a/apps/settings/templates/settings-vue.php
+++ b/apps/settings/templates/settings-vue.php
@@ -25,7 +25,8 @@ script('settings', 'vue-settings-apps-users-management');
style('settings', 'settings');
// Do we have some data to inject ?
-if(is_array($_['serverData'])) {
-?>
-<span id="serverData" data-server="<?php p(json_encode($_['serverData']));?>"></span>
-<?php } ?>
+if (is_array($_['serverData'])) {
+ ?>
+<span id="serverData" data-server="<?php p(json_encode($_['serverData'])); ?>"></span>
+<?php
+} ?>
diff --git a/apps/settings/templates/settings/additional.php b/apps/settings/templates/settings/additional.php
index 3af78adde71..ac6b91e8d76 100644
--- a/apps/settings/templates/settings/additional.php
+++ b/apps/settings/templates/settings/additional.php
@@ -26,7 +26,7 @@
?>
-<?php foreach($_['forms'] as $form) {
+<?php foreach ($_['forms'] as $form) {
if (isset($form['form'])) {?>
<div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div>
<?php }
diff --git a/apps/settings/templates/settings/admin/additional-mail.php b/apps/settings/templates/settings/admin/additional-mail.php
index 609aa3222d5..06a45332855 100644
--- a/apps/settings/templates/settings/admin/additional-mail.php
+++ b/apps/settings/templates/settings/admin/additional-mail.php
@@ -76,11 +76,15 @@ $mail_sendmailmode = [
</select>
<label id="mail_smtpsecure_label" for="mail_smtpsecure"
- <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>>
+ <?php if ($_['mail_smtpmode'] !== 'smtp') {
+ print_unescaped(' class="hidden"');
+ } ?>>
<?php p($l->t('Encryption')); ?>
</label>
<select name="mail_smtpsecure" id="mail_smtpsecure"
- <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>>
+ <?php if ($_['mail_smtpmode'] !== 'smtp') {
+ print_unescaped(' class="hidden"');
+ } ?>>
<?php foreach ($mail_smtpsecure as $secure => $name):
$selected = '';
if ($secure == $_['mail_smtpsecure']):
@@ -108,7 +112,9 @@ $mail_sendmailmode = [
value="<?php p($_['mail_domain']) ?>" />
</p>
- <p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>>
+ <p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] !== 'smtp') {
+ print_unescaped(' class="hidden"');
+ } ?>>
<label for="mail_smtpauthtype"><?php p($l->t('Authentication method')); ?></label>
<select name="mail_smtpauthtype" id="mail_smtpauthtype">
<?php foreach ($mail_smtpauthtype as $authtype => $name):
@@ -121,11 +127,15 @@ $mail_sendmailmode = [
</select>
<input type="checkbox" name="mail_smtpauth" id="mail_smtpauth" class="checkbox" value="1"
- <?php if ($_['mail_smtpauth']) print_unescaped('checked="checked"'); ?> />
+ <?php if ($_['mail_smtpauth']) {
+ print_unescaped('checked="checked"');
+ } ?> />
<label for="mail_smtpauth"><?php p($l->t('Authentication required')); ?></label>
</p>
- <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>>
+ <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] !== 'smtp') {
+ print_unescaped(' class="hidden"');
+ } ?>>
<label for="mail_smtphost"><?php p($l->t('Server address')); ?></label>
<input type="text" name="mail_smtphost" id="mail_smtphost" placeholder="smtp.example.com"
value="<?php p($_['mail_smtphost']) ?>" />
@@ -135,7 +145,9 @@ $mail_sendmailmode = [
</p>
</form>
<form class="mail_settings" id="mail_credentials_settings">
- <p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] !== 'smtp') print_unescaped(' class="hidden"'); ?>>
+ <p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] !== 'smtp') {
+ print_unescaped(' class="hidden"');
+ } ?>>
<label for="mail_smtpname"><?php p($l->t('Credentials')); ?></label>
<input type="text" name="mail_smtpname" id="mail_smtpname" placeholder="<?php p($l->t('SMTP Username'))?>"
value="<?php p($_['mail_smtpname']) ?>" />
diff --git a/apps/settings/templates/settings/admin/overview.php b/apps/settings/templates/settings/admin/overview.php
index 9eb6fc1c1f5..a9f5ad0d77f 100644
--- a/apps/settings/templates/settings/admin/overview.php
+++ b/apps/settings/templates/settings/admin/overview.php
@@ -45,7 +45,11 @@
<span class="icon loading"></span><span class="message"><?php p($l->t('Checking for system and security issues.'));?></span>
</div>
- <div id="postsetupchecks" data-check-wellknown="<?php if($_['checkForWorkingWellKnownSetup']) { p('true'); } else { p('false'); } ?>">
+ <div id="postsetupchecks" data-check-wellknown="<?php if ($_['checkForWorkingWellKnownSetup']) {
+ p('true');
+} else {
+ p('false');
+} ?>">
<ul class="errors hidden"></ul>
<ul class="warnings hidden"></ul>
<ul class="info hidden"></ul>
diff --git a/apps/settings/templates/settings/admin/security.php b/apps/settings/templates/settings/admin/security.php
index 0e32399f325..f0689b948af 100644
--- a/apps/settings/templates/settings/admin/security.php
+++ b/apps/settings/templates/settings/admin/security.php
@@ -43,7 +43,9 @@ script('settings', 'vue-settings-admin-security');
<p id="enable">
<input type="checkbox"
id="enableEncryption" class="checkbox"
- value="1" <?php if ($_['encryptionEnabled']) print_unescaped('checked="checked" disabled="disabled"'); ?> />
+ value="1" <?php if ($_['encryptionEnabled']) {
+ print_unescaped('checked="checked" disabled="disabled"');
+} ?> />
<label
for="enableEncryption"><?php p($l->t('Enable server-side encryption')); ?> <span id="startmigration_msg" class="msg"></span> </label><br/>
</p>
@@ -62,8 +64,12 @@ script('settings', 'vue-settings-admin-security');
value="<?php p($l->t("Enable encryption")); ?>" /></p>
</div>
- <div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) p('hidden'); ?>">
- <div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) p('hidden'); ?>">
+ <div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) {
+ p('hidden');
+} ?>">
+ <div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) {
+ p('hidden');
+} ?>">
<?php
if (empty($_['encryptionModules'])) {
p($l->t('No encryption module loaded, please enable an encryption module in the app menu.'));
@@ -75,8 +81,8 @@ script('settings', 'vue-settings-admin-security');
name="default_encryption_module"
value="<?php p($id) ?>"
<?php if ($module['default']) {
- p('checked');
- } ?>>
+ p('checked');
+ } ?>>
<label
for="<?php p($id) ?>"><?php p($module['displayName']) ?></label>
<br/>
@@ -84,7 +90,9 @@ script('settings', 'vue-settings-admin-security');
</fieldset>
<?php } ?>
</div>
- <div id="migrationWarning" class="<?php if ($_['encryptionReady']) p('hidden'); ?>">
+ <div id="migrationWarning" class="<?php if ($_['encryptionReady']) {
+ p('hidden');
+ } ?>">
<?php
if ($_['encryptionReady'] === false && $_['externalBackendsEnabled'] === true) {
p($l->t('You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please enable the "Default encryption module" and run \'occ encryption:migrate\''));
@@ -92,7 +100,8 @@ script('settings', 'vue-settings-admin-security');
p($l->t('You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one.')); ?>
<input type="submit" name="startmigration" id="startmigration"
value="<?php p($l->t('Start migration')); ?>"/>
- <?php } ?>
+ <?php
+ } ?>
</div>
</div>
</div>
diff --git a/apps/settings/templates/settings/admin/server.php b/apps/settings/templates/settings/admin/server.php
index bde4423f67f..c848ef5c494 100644
--- a/apps/settings/templates/settings/admin/server.php
+++ b/apps/settings/templates/settings/admin/server.php
@@ -30,19 +30,19 @@
<h2 class="inlineblock"><?php p($l->t('Background jobs'));?></h2>
<p class="cronlog inlineblock">
<?php if ($_['lastcron'] !== false) {
- $relative_time = relative_modified_date($_['lastcron']);
- $maxAgeRelativeTime = relative_modified_date($_['cronMaxAge']);
+ $relative_time = relative_modified_date($_['lastcron']);
+ $maxAgeRelativeTime = relative_modified_date($_['cronMaxAge']);
- $formatter = \OC::$server->getDateTimeFormatter();
- $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long');
- $maxAgeAbsoluteTime = $formatter->formatDateTime($_['cronMaxAge'], 'long', 'long');
- if (time() - $_['lastcron'] > 600) { ?>
+ $formatter = \OC::$server->getDateTimeFormatter();
+ $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long');
+ $maxAgeAbsoluteTime = $formatter->formatDateTime($_['cronMaxAge'], 'long', 'long');
+ if (time() - $_['lastcron'] > 600) { ?>
<span class="status error"></span>
<span class="crondate" title="<?php p($absolute_time);?>">
<?php p($l->t("Last job execution ran %s. Something seems wrong.", [$relative_time]));?>
</span>
<?php } elseif (time() - $_['cronMaxAge'] > 12*3600) {
- if ($_['backgroundjobs_mode'] === 'cron') { ?>
+ if ($_['backgroundjobs_mode'] === 'cron') { ?>
<span class="status warning"></span>
<span class="crondate" title="<?php p($maxAgeAbsoluteTime);?>">
<?php p($l->t("Some jobs haven’t been executed since %s. Please consider increasing the execution frequency.", [$maxAgeRelativeTime]));?>
@@ -53,13 +53,13 @@
<?php p($l->t("Some jobs didn’t execute since %s. Please consider switching to system cron.", [$maxAgeRelativeTime]));?>
</span>
<?php }
- } else { ?>
+ } else { ?>
<span class="status success"></span>
<span class="crondate" title="<?php p($absolute_time);?>">
<?php p($l->t("Last job ran %s.", [$relative_time]));?>
</span>
<?php }
- } else { ?>
+} else { ?>
<span class="status error"></span>
<?php p($l->t("Background job didn’t run yet!"));
} ?>
@@ -75,33 +75,33 @@
<p>
<input type="radio" name="mode" value="ajax" class="radio"
id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") {
- print_unescaped('checked="checked"');
- } ?>>
+ print_unescaped('checked="checked"');
+ } ?>>
<label for="backgroundjobs_ajax">AJAX</label><br/>
<em><?php p($l->t("Execute one task with each page loaded")); ?></em>
</p>
<p>
<input type="radio" name="mode" value="webcron" class="radio"
id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] === "webcron") {
- print_unescaped('checked="checked"');
- } ?>>
+ print_unescaped('checked="checked"');
+ } ?>>
<label for="backgroundjobs_webcron">Webcron</label><br/>
<em><?php p($l->t("cron.php is registered at a webcron service to call cron.php every 5 minutes over HTTP.")); ?></em>
</p>
<p>
<input type="radio" name="mode" value="cron" class="radio"
id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] === "cron") {
- print_unescaped('checked="checked"');
- }
+ print_unescaped('checked="checked"');
+ }
if (!$_['cli_based_cron_possible']) {
print_unescaped('disabled');
}?>>
<label for="backgroundjobs_cron">Cron</label><br/>
<em><?php p($l->t("Use system cron service to call the cron.php file every 5 minutes.")); ?>
- <?php if($_['cli_based_cron_possible']) {
- p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']]));
- } else {
- print_unescaped(str_replace(
+ <?php if ($_['cli_based_cron_possible']) {
+ p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']]));
+ } else {
+ print_unescaped(str_replace(
['{linkstart}', '{linkend}'],
['<a href="http://php.net/manual/en/book.posix.php">', ' ↗</a>'],
$l->t('To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.')
diff --git a/apps/settings/templates/settings/admin/sharing.php b/apps/settings/templates/settings/admin/sharing.php
index 0cfbb3e8492..bd75b04eedb 100644
--- a/apps/settings/templates/settings/admin/sharing.php
+++ b/apps/settings/templates/settings/admin/sharing.php
@@ -34,110 +34,172 @@
<p class="settings-hint"><?php p($l->t('As admin you can fine-tune the sharing behavior. Please see the documentation for more information.'));?></p>
<p id="enable">
<input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled" class="checkbox"
- value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['shareAPIEnabled'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/>
</p>
- <p id="internalShareSettings" class="indent <?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
+ <p id="internalShareSettings" class="indent <?php if ($_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+} ?>">
<input type="checkbox" name="shareapi_default_internal_expire_date" id="shareapiDefaultInternalExpireDate" class="checkbox"
- value="1" <?php if ($_['shareDefaultInternalExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['shareDefaultInternalExpireDateSet'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="shareapiDefaultInternalExpireDate"><?php p($l->t('Set default expiration date for shares'));?></label><br/>
</p>
- <p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
+ <p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+}?>">
<?php p($l->t('Expire after ')); ?>
<input type="text" name='shareapi_internal_expire_after_n_days' id="shareapiInternalExpireAfterNDays" placeholder="<?php p('7')?>"
value='<?php p($_['shareInternalExpireAfterNDays']) ?>' />
<?php p($l->t('days')); ?>
<input type="checkbox" name="shareapi_internal_enforce_expire_date" id="shareapiInternalEnforceExpireDate" class="checkbox"
- value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="shareapiInternalEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
</p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
+ <p class="<?php if ($_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+}?>">
<input type="checkbox" name="shareapi_allow_links" id="allowLinks" class="checkbox"
- value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['allowLinks'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/>
</p>
- <p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
+ <p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+} ?>">
<input type="checkbox" name="shareapi_allow_public_upload" id="allowPublicUpload" class="checkbox"
- value="1" <?php if ($_['allowPublicUpload'] == 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['allowPublicUpload'] == 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="allowPublicUpload"><?php p($l->t('Allow public uploads'));?></label><br/>
<input type="checkbox" name="shareapi_enable_link_password_by_default" id="enableLinkPasswordByDefault" class="checkbox"
- value="1" <?php if ($_['enableLinkPasswordByDefault'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['enableLinkPasswordByDefault'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="enableLinkPasswordByDefault"><?php p($l->t('Always ask for a password'));?></label><br/>
<input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword" class="checkbox"
- value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['enforceLinkPassword']) {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/>
<input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate" class="checkbox"
- value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date for link shares'));?></label><br/>
</p>
- <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
+ <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+}?>">
<?php p($l->t('Expire after ')); ?>
<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
value='<?php p($_['shareExpireAfterNDays']) ?>' />
<?php p($l->t('days')); ?>
<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox"
- value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
</p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
+ <p class="<?php if ($_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+}?>">
<input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" class="checkbox"
- value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['allowResharing'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
</p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
+ <p class="<?php if ($_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+}?>">
<input type="checkbox" name="shareapi_allow_group_sharing" id="allowGroupSharing" class="checkbox"
- value="1" <?php if ($_['allowGroupSharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['allowGroupSharing'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups'));?></label><br />
</p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
+ <p class="<?php if ($_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+}?>">
<input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" class="checkbox"
- value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['onlyShareWithGroupMembers']) {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/>
</p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
+ <p class="<?php if ($_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+}?>">
<input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups" class="checkbox"
- value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> />
+ value="1" <?php if ($_['shareExcludeGroups']) {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/>
</p>
- <p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
+ <p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+} ?>">
<input name="shareapi_exclude_groups_list" type="hidden" id="excludedGroups" value="<?php p($_['shareExcludedGroupsList']) ?>" style="width: 400px" class="noJSAutoUpdate"/>
<br />
<em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em>
</p>
- <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
+ <p class="<?php if ($_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+}?>">
<input type="checkbox" name="shareapi_allow_share_dialog_user_enumeration" value="1" id="shareapi_allow_share_dialog_user_enumeration" class="checkbox"
- <?php if ($_['allowShareDialogUserEnumeration'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ <?php if ($_['allowShareDialogUserEnumeration'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="shareapi_allow_share_dialog_user_enumeration"><?php p($l->t('Allow username autocompletion in share dialog. If this is disabled the full username or email address needs to be entered.'));?></label><br />
</p>
- <p id="shareapi_restrict_user_enumeration_to_group_setting" class="indent <?php if ($_['shareAPIEnabled'] === 'no' || $_['allowShareDialogUserEnumeration'] === 'no') p('hidden');?>">
+ <p id="shareapi_restrict_user_enumeration_to_group_setting" class="indent <?php if ($_['shareAPIEnabled'] === 'no' || $_['allowShareDialogUserEnumeration'] === 'no') {
+ p('hidden');
+}?>">
<input type="checkbox" name="shareapi_restrict_user_enumeration_to_group" value="1" id="shareapi_restrict_user_enumeration_to_group" class="checkbox"
- <?php if ($_['restrictUserEnumerationToGroup'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ <?php if ($_['restrictUserEnumerationToGroup'] === 'yes') {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="shareapi_restrict_user_enumeration_to_group"><?php p($l->t('Restrict username autocompletion to users within the same groups'));?></label><br />
</p>
<p>
<input type="checkbox" id="publicShareDisclaimer" class="checkbox noJSAutoUpdate"
- <?php if ($_['publicShareDisclaimerText'] !== null) print_unescaped('checked="checked"'); ?> />
+ <?php if ($_['publicShareDisclaimerText'] !== null) {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="publicShareDisclaimer"><?php p($l->t('Show disclaimer text on the public link upload page. (Only shown when the file list is hidden.)'));?></label>
<span id="publicShareDisclaimerStatus" class="msg" style="display:none"></span>
<br/>
- <textarea placeholder="<?php p($l->t('This text will be shown on the public link upload page when the file list is hidden.')) ?>" id="publicShareDisclaimerText" <?php if ($_['publicShareDisclaimerText'] === null) { print_unescaped('class="hidden"'); } ?>><?php p($_['publicShareDisclaimerText']) ?></textarea>
+ <textarea placeholder="<?php p($l->t('This text will be shown on the public link upload page when the file list is hidden.')) ?>" id="publicShareDisclaimerText" <?php if ($_['publicShareDisclaimerText'] === null) {
+ print_unescaped('class="hidden"');
+} ?>><?php p($_['publicShareDisclaimerText']) ?></textarea>
</p>
<h3><?php p($l->t('Default share permissions'));?></h3>
<input type="hidden" name="shareapi_default_permissions" id="shareApiDefaultPermissions" class="checkbox"
value="<?php p($_['shareApiDefaultPermissions']) ?>" />
- <p id="shareApiDefaultPermissionsSection" class="indent <?php if ($_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
+ <p id="shareApiDefaultPermissionsSection" class="indent <?php if ($_['shareAPIEnabled'] === 'no') {
+ p('hidden');
+} ?>">
<?php foreach ($_['shareApiDefaultPermissionsCheckboxes'] as $perm): ?>
<input type="checkbox" name="shareapi_default_permission_<?php p($perm['id']) ?>" id="shareapi_default_permission_<?php p($perm['id']) ?>"
- class="noautosave checkbox" value="<?php p($perm['value']) ?>" <?php if (($_['shareApiDefaultPermissions'] & $perm['value']) !== 0) print_unescaped('checked="checked"'); ?> />
+ class="noautosave checkbox" value="<?php p($perm['value']) ?>" <?php if (($_['shareApiDefaultPermissions'] & $perm['value']) !== 0) {
+ print_unescaped('checked="checked"');
+} ?> />
<label for="shareapi_default_permission_<?php p($perm['id']) ?>"><?php p($perm['label']);?></label>
<?php endforeach ?>
</p>
diff --git a/apps/settings/templates/settings/frame.php b/apps/settings/templates/settings/frame.php
index d6658e9c631..5f7186559ab 100644
--- a/apps/settings/templates/settings/frame.php
+++ b/apps/settings/templates/settings/frame.php
@@ -30,17 +30,16 @@ script('files', 'jquery.fileupload');
<div id="app-navigation">
<ul>
- <?php if(!empty($_['forms']['admin'])) { ?>
+ <?php if (!empty($_['forms']['admin'])) { ?>
<li class="app-navigation-caption"><?php p($l->t('Personal')); ?></li>
<?php
}
- foreach($_['forms']['personal'] as $form) {
+ foreach ($_['forms']['personal'] as $form) {
if (isset($form['anchor'])) {
$anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.PersonalSettings.index', ['section' => $form['anchor']]);
$class = 'nav-icon-' . $form['anchor'];
$sectionName = $form['section-name'];
- $active = $form['active'] ? ' class="active"' : '';
- ?>
+ $active = $form['active'] ? ' class="active"' : ''; ?>
<li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?>>
<a href="<?php p($anchor); ?>">
<?php if (!empty($form['icon'])) { ?>
@@ -57,19 +56,17 @@ script('files', 'jquery.fileupload');
?>
<?php
- if(!empty($_['forms']['admin'])) {
+ if (!empty($_['forms']['admin'])) {
?>
<li class="app-navigation-caption"><?php p($l->t('Administration')); ?></li>
<?php
}
- foreach($_['forms']['admin'] as $form) {
+ foreach ($_['forms']['admin'] as $form) {
if (isset($form['anchor'])) {
-
$anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]);
$class = 'nav-icon-' . $form['anchor'];
$sectionName = $form['section-name'];
- $active = $form['active'] ? ' class="active"' : '';
- ?>
+ $active = $form['active'] ? ' class="active"' : ''; ?>
<li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?>>
<a href="<?php p($anchor); ?>">
<?php if (!empty($form['icon'])) { ?>
diff --git a/apps/settings/templates/settings/personal/personal.info.php b/apps/settings/templates/settings/personal/personal.info.php
index ad5f8ac547f..ac95b9eddbf 100644
--- a/apps/settings/templates/settings/personal/personal.info.php
+++ b/apps/settings/templates/settings/personal/personal.info.php
@@ -67,7 +67,7 @@ script('settings', [
</div>
</div>
<span class="icon-checkmark hidden"></span>
- <?php if($_['lookupServerUploadEnabled']) { ?>
+ <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="avatarscope" value="<?php p($_['avatarScope']) ?>">
<?php } ?>
</form>
@@ -92,7 +92,7 @@ script('settings', [
<?php endif ?>
</p>
</div>
- <progress value="<?php p($_['usage_relative']); ?>" max="100"<?php if($_['usage_relative'] > 80): ?> class="warn" <?php endif; ?>></progress>
+ <progress value="<?php p($_['usage_relative']); ?>" max="100"<?php if ($_['usage_relative'] > 80): ?> class="warn" <?php endif; ?>></progress>
</div>
</div>
</div>
@@ -109,15 +109,21 @@ script('settings', [
</div>
</h3>
<input type="text" id="displayname" name="displayname"
- <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?>
+ <?php if (!$_['displayNameChangeSupported']) {
+ print_unescaped('class="hidden"');
+ } ?>
value="<?php p($_['displayName']) ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />
- <?php if(!$_['displayNameChangeSupported']) { ?>
- <span><?php if(isset($_['displayName']) && !empty($_['displayName'])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span>
+ <?php if (!$_['displayNameChangeSupported']) { ?>
+ <span><?php if (isset($_['displayName']) && !empty($_['displayName'])) {
+ p($_['displayName']);
+ } else {
+ p($l->t('No display name set'));
+ } ?></span>
<?php } ?>
<span class="icon-checkmark hidden"></span>
<span class="icon-error hidden" ></span>
- <?php if($_['lookupServerUploadEnabled']) { ?>
+ <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>">
<?php } ?>
</form>
@@ -132,10 +138,12 @@ script('settings', [
</span>
</div>
</h3>
- <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') p('hidden'); ?>">
+ <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') {
+ p('hidden');
+ } ?>">
<img id="verify-email" title="<?php p($_['emailMessage']); ?>" data-status="<?php p($_['emailVerification']) ?>" src="
<?php
- switch($_['emailVerification']) {
+ switch ($_['emailVerification']) {
case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
p(image_path('core', 'actions/verifying.svg'));
break;
@@ -148,18 +156,24 @@ script('settings', [
?>">
</div>
<input type="email" name="email" id="email" value="<?php p($_['email']); ?>"
- <?php if(!$_['displayNameChangeSupported']) { print_unescaped('class="hidden"'); } ?>
+ <?php if (!$_['displayNameChangeSupported']) {
+ print_unescaped('class="hidden"');
+ } ?>
placeholder="<?php p($l->t('Your email address')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />
<span class="icon-checkmark hidden"></span>
<span class="icon-error hidden" ></span>
- <?php if(!$_['displayNameChangeSupported']) { ?>
- <span><?php if(isset($_['email']) && !empty($_['email'])) { p($_['email']); } else { p($l->t('No email address set')); }?></span>
+ <?php if (!$_['displayNameChangeSupported']) { ?>
+ <span><?php if (isset($_['email']) && !empty($_['email'])) {
+ p($_['email']);
+ } else {
+ p($l->t('No email address set'));
+ }?></span>
<?php } ?>
- <?php if($_['displayNameChangeSupported']) { ?>
+ <?php if ($_['displayNameChangeSupported']) { ?>
<em><?php p($l->t('For password reset and notifications')); ?></em>
<?php } ?>
- <?php if($_['lookupServerUploadEnabled']) { ?>
+ <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="emailscope" value="<?php p($_['emailScope']) ?>">
<?php } ?>
</form>
@@ -175,12 +189,14 @@ script('settings', [
</span>
</div>
</h3>
- <input type="tel" id="phone" name="phone" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?>
+ <input type="tel" id="phone" name="phone" <?php if (!$_['lookupServerUploadEnabled']) {
+ print_unescaped('disabled="1"');
+ } ?>
value="<?php p($_['phone']) ?>"
placeholder="<?php p($l->t('Your phone number')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />
<span class="icon-checkmark hidden"></span>
- <?php if($_['lookupServerUploadEnabled']) { ?>
+ <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="phonescope" value="<?php p($_['phoneScope']) ?>">
<?php } ?>
</form>
@@ -197,12 +213,14 @@ script('settings', [
</span>
</div>
</h3>
- <input type="text" id="address" name="address" <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?>
+ <input type="text" id="address" name="address" <?php if (!$_['lookupServerUploadEnabled']) {
+ print_unescaped('disabled="1"');
+ } ?>
placeholder="<?php p($l->t('Your postal address')); ?>"
value="<?php p($_['address']) ?>"
autocomplete="on" autocapitalize="none" autocorrect="off" />
<span class="icon-checkmark hidden"></span>
- <?php if($_['lookupServerUploadEnabled']) { ?>
+ <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="addressscope" value="<?php p($_['addressScope']) ?>">
<?php } ?>
</form>
@@ -219,11 +237,13 @@ script('settings', [
</span>
</div>
</h3>
- <?php if($_['lookupServerUploadEnabled']) { ?>
- <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') p('hidden'); ?>">
+ <?php if ($_['lookupServerUploadEnabled']) { ?>
+ <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') {
+ p('hidden');
+ } ?>">
<img id="verify-website" title="<?php p($_['websiteMessage']); ?>" data-status="<?php p($_['websiteVerification']) ?>" src="
<?php
- switch($_['websiteVerification']) {
+ switch ($_['websiteVerification']) {
case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
p(image_path('core', 'actions/verifying.svg'));
break;
@@ -234,7 +254,9 @@ script('settings', [
p(image_path('core', 'actions/verify.svg'));
}
?>"
- <?php if($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?>
+ <?php if ($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) {
+ print_unescaped(' class="verify-action"');
+ } ?>
>
<div class="verification-dialog popovermenu bubble menu">
<div class="verification-dialog-content">
@@ -248,10 +270,12 @@ script('settings', [
<input type="url" name="website" id="website" value="<?php p($_['website']); ?>"
placeholder="<?php p($l->t('Link https://…')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off"
- <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?>
+ <?php if (!$_['lookupServerUploadEnabled']) {
+ print_unescaped('disabled="1"');
+ } ?>
/>
<span class="icon-checkmark hidden"></span>
- <?php if($_['lookupServerUploadEnabled']) { ?>
+ <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="websitescope" value="<?php p($_['websiteScope']) ?>">
<?php } ?>
</form>
@@ -268,11 +292,13 @@ script('settings', [
</span>
</div>
</h3>
- <?php if($_['lookupServerUploadEnabled']) { ?>
- <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') p('hidden'); ?>">
+ <?php if ($_['lookupServerUploadEnabled']) { ?>
+ <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') {
+ p('hidden');
+ } ?>">
<img id="verify-twitter" title="<?php p($_['twitterMessage']); ?>" data-status="<?php p($_['twitterVerification']) ?>" src="
<?php
- switch($_['twitterVerification']) {
+ switch ($_['twitterVerification']) {
case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
p(image_path('core', 'actions/verifying.svg'));
break;
@@ -283,7 +309,9 @@ script('settings', [
p(image_path('core', 'actions/verify.svg'));
}
?>"
- <?php if($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) print_unescaped(' class="verify-action"') ?>
+ <?php if ($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) {
+ print_unescaped(' class="verify-action"');
+ } ?>
>
<div class="verification-dialog popovermenu bubble menu">
<div class="verification-dialog-content">
@@ -297,10 +325,12 @@ script('settings', [
<input type="text" name="twitter" id="twitter" value="<?php p($_['twitter']); ?>"
placeholder="<?php p($l->t('Twitter handle @…')); ?>"
autocomplete="on" autocapitalize="none" autocorrect="off"
- <?php if(!$_['lookupServerUploadEnabled']) print_unescaped('disabled="1"'); ?>
+ <?php if (!$_['lookupServerUploadEnabled']) {
+ print_unescaped('disabled="1"');
+ } ?>
/>
<span class="icon-checkmark hidden"></span>
- <?php if($_['lookupServerUploadEnabled']) { ?>
+ <?php if ($_['lookupServerUploadEnabled']) { ?>
<input type="hidden" id="twitterscope" value="<?php p($_['twitterScope']) ?>">
<?php } ?>
</form>
@@ -319,13 +349,13 @@ script('settings', [
<option value="<?php p($_['activelanguage']['code']);?>">
<?php p($_['activelanguage']['name']);?>
</option>
- <?php foreach($_['commonlanguages'] as $language):?>
+ <?php foreach ($_['commonlanguages'] as $language):?>
<option value="<?php p($language['code']);?>">
<?php p($language['name']);?>
</option>
<?php endforeach;?>
<optgroup label="––––––––––"></optgroup>
- <?php foreach($_['languages'] as $language):?>
+ <?php foreach ($_['languages'] as $language):?>
<option value="<?php p($language['code']);?>">
<?php p($language['name']);?>
</option>
@@ -349,7 +379,7 @@ script('settings', [
<?php p($l->t($_['activelocale']['name']));?>
</option>
<optgroup label="––––––––––"></optgroup>
- <?php foreach($_['localesForLanguage'] as $locale):?>
+ <?php foreach ($_['localesForLanguage'] as $locale):?>
<option value="<?php p($locale['code']);?>">
<?php p($l->t($locale['name']));?>
</option>
@@ -358,7 +388,7 @@ script('settings', [
<option value="<?php p($_['activelocale']['code']);?>">
<?php p($l->t($_['activelocale']['name']));?>
</option>
- <?php foreach($_['locales'] as $locale):?>
+ <?php foreach ($_['locales'] as $locale):?>
<option value="<?php p($locale['code']);?>">
<?php p($l->t($locale['name']));?>
</option>
diff --git a/apps/settings/templates/settings/personal/security/password.php b/apps/settings/templates/settings/personal/security/password.php
index 23959f7d9c2..7edd9e20126 100644
--- a/apps/settings/templates/settings/personal/security/password.php
+++ b/apps/settings/templates/settings/personal/security/password.php
@@ -27,12 +27,12 @@ script('settings', [
'vue-settings-personal-security',
]);
-if($_['passwordChangeSupported']) {
+if ($_['passwordChangeSupported']) {
script('settings', 'security_password');
}
?>
-<?php if($_['passwordChangeSupported']) { ?>
+<?php if ($_['passwordChangeSupported']) { ?>
<div id="security-password" class="section">
<h2 class="inlineblock"><?php p($l->t('Password'));?></h2>
<span id="password-error-msg" class="msg success hidden">Saved</span>
diff --git a/apps/settings/templates/settings/personal/security/twofactor.php b/apps/settings/templates/settings/personal/security/twofactor.php
index f5e5b7025c2..127833b4bbc 100644
--- a/apps/settings/templates/settings/personal/security/twofactor.php
+++ b/apps/settings/templates/settings/personal/security/twofactor.php
@@ -41,19 +41,16 @@ declare(strict_types=1);
if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
if ($_['themedark']) {
$icon = $provider->getLightIcon();
- }
- else {
+ } else {
$icon = $provider->getDarkIcon();
}
//fallback icon if the 2factor provider doesn't provide an icon.
} else {
if ($_['themedark']) {
$icon = image_path('core', 'actions/password-white.svg');
- }
- else {
+ } else {
$icon = image_path('core', 'actions/password.svg');
}
-
}
/** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */
$settings = $data['settings'];