diff options
author | Joas Schilling <coding@schilljs.com> | 2020-07-10 11:13:03 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-07-10 11:13:03 +0300 |
commit | f224b89da3928d63ad73eed6b292a0d6b998730a (patch) | |
tree | 5d840f6c3cefd1438c308d77abde76f73ec2c454 /templates | |
parent | 3b42325d5da4aa03dd6af851c4c4f0e78944adc4 (diff) |
CS auto fixes
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin.php | 6 | ||||
-rw-r--r-- | templates/domains.php | 2 | ||||
-rw-r--r-- | templates/email.newuser.disabled_html.php | 1 | ||||
-rw-r--r-- | templates/email.newuser.disabled_plaintext.php | 1 | ||||
-rw-r--r-- | templates/email.newuser_html.php | 1 | ||||
-rw-r--r-- | templates/email.newuser_plaintext.php | 1 | ||||
-rw-r--r-- | templates/email.validate_html.php | 1 | ||||
-rw-r--r-- | templates/email.validate_plaintext.php | 1 | ||||
-rw-r--r-- | templates/form.php | 17 | ||||
-rw-r--r-- | templates/message.php | 5 | ||||
-rw-r--r-- | templates/register.php | 5 |
11 files changed, 27 insertions, 14 deletions
diff --git a/templates/admin.php b/templates/admin.php index e778d93..faf6ff4 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -8,7 +8,7 @@ script('registration', 'settings'); <select id="registered_user_group" name="registered_user_group"> <option value="none" <?php echo $_['current'] === 'none' ? 'selected="selected"' : ''; ?>><?php p($l->t('None')); ?></option> <?php -foreach ( $_['groups'] as $group ) { +foreach ($_['groups'] as $group) { $selected = $_['current'] === $group ? 'selected="selected"' : ''; echo '<option value="'.$group.'" '.$selected.'>'.$group.'</option>'; } @@ -25,7 +25,9 @@ foreach ( $_['groups'] as $group ) { <p> <label for="admin_approval_required"><?php p($l->t('Require admin approval?')); ?> - <input type="checkbox" id="admin_approval_required" name="admin_approval_required" <?php if($_['approval_required'] === "yes" ) echo " checked"; ?>> + <input type="checkbox" id="admin_approval_required" name="admin_approval_required" <?php if ($_['approval_required'] === "yes") { + echo " checked"; +} ?>> </label> </p> </form> diff --git a/templates/domains.php b/templates/domains.php index 08cb3dd..111ed9e 100644 --- a/templates/domains.php +++ b/templates/domains.php @@ -4,7 +4,7 @@ <ul class="error-wide"> <li class='error'><?php p($l->t('Registration is only allowed for the following domains:')); ?> <?php - foreach ($_['domains'] as $domain ){ + foreach ($_['domains'] as $domain) { echo "<p class='hint'>"; p($domain); echo "</p>"; diff --git a/templates/email.newuser.disabled_html.php b/templates/email.newuser.disabled_html.php index 8670e62..4076f46 100644 --- a/templates/email.newuser.disabled_html.php +++ b/templates/email.newuser.disabled_html.php @@ -1,3 +1,4 @@ <?php + echo $l->t('A new user "%s" has created an account on %s and awaits admin approbation', [$_['user'], $_['sitename']]); echo str_replace('{link}', $_['link'], '<br/><br/><a href="{link}">{link}</a>'); diff --git a/templates/email.newuser.disabled_plaintext.php b/templates/email.newuser.disabled_plaintext.php index 3b16a8d..6db76bc 100644 --- a/templates/email.newuser.disabled_plaintext.php +++ b/templates/email.newuser.disabled_plaintext.php @@ -1,3 +1,4 @@ <?php + echo $l->t('A new user "%s" has created an account on %s and awaits admin approbation', [$_['user'], $_['sitename']]); echo "\n\n".$_['link']; diff --git a/templates/email.newuser_html.php b/templates/email.newuser_html.php index c7ab1ee..51865e3 100644 --- a/templates/email.newuser_html.php +++ b/templates/email.newuser_html.php @@ -1,2 +1,3 @@ <?php + echo $l->t('A new user "%s" has created an account on %s', [$_['user'], $_['sitename']]); diff --git a/templates/email.newuser_plaintext.php b/templates/email.newuser_plaintext.php index c7ab1ee..51865e3 100644 --- a/templates/email.newuser_plaintext.php +++ b/templates/email.newuser_plaintext.php @@ -1,2 +1,3 @@ <?php + echo $l->t('A new user "%s" has created an account on %s', [$_['user'], $_['sitename']]); diff --git a/templates/email.validate_html.php b/templates/email.validate_html.php index 30880f7..3f0960c 100644 --- a/templates/email.validate_html.php +++ b/templates/email.validate_html.php @@ -1,3 +1,4 @@ <?php + echo $l->t('To create a new account on %s, just click the following link:', [$_['sitename']]); echo str_replace('{link}', $_['link'], '<br/><br/><a href="{link}">{link}</a>'); diff --git a/templates/email.validate_plaintext.php b/templates/email.validate_plaintext.php index 4a1dbdb..3d07fab 100644 --- a/templates/email.validate_plaintext.php +++ b/templates/email.validate_plaintext.php @@ -1,3 +1,4 @@ <?php + echo $l->t("To create a new account on %s, just click the following link:", [$_['sitename']]); echo "\n\n".$_['link']; diff --git a/templates/form.php b/templates/form.php index 924472e..5253ec9 100644 --- a/templates/form.php +++ b/templates/form.php @@ -1,14 +1,15 @@ <?php \OCP\Util::addStyle('registration', 'style'); \OCP\Util::addScript('registration', 'form'); -if ( \OCP\Util::getVersion()[0] >= 12 ) +if (\OCP\Util::getVersion()[0] >= 12) { \OCP\Util::addStyle('core', 'guest'); -?><form action="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('registration.register.createAccount', array('token'=>$_['token']))) ?>" method="post"> +} +?><form action="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('registration.register.createAccount', ['token'=>$_['token']])) ?>" method="post"> <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" /> <fieldset> - <?php if ( !empty($_['errormsgs']) ) {?> + <?php if (!empty($_['errormsgs'])) {?> <ul class="error"> - <?php foreach ( $_['errormsgs'] as $errormsg ) { ?> + <?php foreach ($_['errormsgs'] as $errormsg) { ?> <li><?php p($errormsg); ?></li> <?php } ?> </ul> @@ -24,16 +25,18 @@ if ( \OCP\Util::getVersion()[0] >= 12 ) </p> <p class="groupmiddle"> - <input type="text" name="username" id="username" value="<?php if (!empty($_['entered_data']['user'])) { p($_['entered_data']['user']); } ?>" placeholder="<?php p($l->t('Username')); ?>" /> + <input type="text" name="username" id="username" value="<?php if (!empty($_['entered_data']['user'])) { + p($_['entered_data']['user']); +} ?>" placeholder="<?php p($l->t('Username')); ?>" /> <label for="username" class="infield"><?php p($l->t('Username')); ?></label> <img id="username-icon" class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/> </p> <p class="groupbottom"> <input type="password" name="password" id="password" placeholder="<?php p($l->t('Password')); ?>"/> - <label for="password" class="infield"><?php p($l->t( 'Password' )); ?></label> + <label for="password" class="infield"><?php p($l->t('Password')); ?></label> <img id="password-icon" class="svg" src="<?php print_unescaped(image_path('', 'actions/password.svg')); ?>" alt=""/> - <?php if ( \OC::$server->getConfig()->getAppValue('core', 'vendor', '') === 'nextcloud' ) { ?> + <?php if (\OC::$server->getConfig()->getAppValue('core', 'vendor', '') === 'nextcloud') { ?> <input id="show" name="show" type="checkbox"> <label id="show-password" style="display: inline;" for="show"></label> <?php } else { ?> diff --git a/templates/message.php b/templates/message.php index 5a7fa31..7c8a315 100644 --- a/templates/message.php +++ b/templates/message.php @@ -1,7 +1,8 @@ <?php \OCP\Util::addStyle('registration', 'style'); -if ( \OCP\Util::getVersion()[0] >= 12 ) - \OCP\Util::addStyle('core', 'guest') +if (\OCP\Util::getVersion()[0] >= 12) { + \OCP\Util::addStyle('core', 'guest'); +} ?> <ul class="msg error-wide nc-theming-main-text"> <li><?php print_unescaped($_['msg'])?></li> diff --git a/templates/register.php b/templates/register.php index 935b884..cccd8ba 100644 --- a/templates/register.php +++ b/templates/register.php @@ -1,7 +1,8 @@ <?php \OCP\Util::addStyle('registration', 'style'); -if ( \OCP\Util::getVersion()[0] >= 12 ) +if (\OCP\Util::getVersion()[0] >= 12) { \OCP\Util::addStyle('core', 'guest'); +} if ($_['entered']): ?> <?php if (empty($_['errormsg'])): ?> <ul class="success"> @@ -17,7 +18,7 @@ if ($_['entered']): ?> </ul> <p class="groupofone"> <input type="email" name="email" id="email" placeholder="<?php p($l->t('Email')); ?>" value="" required autofocus /> - <label for="email" class="infield"><?php p($l->t( 'Email' )); ?></label> + <label for="email" class="infield"><?php p($l->t('Email')); ?></label> <img id="email-icon" class="svg" src="<?php print_unescaped(image_path('', 'actions/mail.svg')); ?>" alt=""/> </p> <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']); ?>" /> |