summaryrefslogtreecommitdiff
path: root/src/application/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/application/views')
-rw-r--r--src/application/views/form_login.php2
-rw-r--r--src/application/views/view_user.php10
2 files changed, 9 insertions, 3 deletions
diff --git a/src/application/views/form_login.php b/src/application/views/form_login.php
index acef1ff..87ee516 100644
--- a/src/application/views/form_login.php
+++ b/src/application/views/form_login.php
@@ -35,7 +35,7 @@ if (($_formError = RequestUtils::getAndClearFormError("login")) !== null) {
<div class="form-group">
<button class="btn btn-primary" type="submit"><?= __("Log in") ?></button>
- <a href="?_action=pwreset"><?= __("I forgot my password") ?></a>
+ <a class="btn btn-link" href="?_action=pwreset"><?= __("I forgot my password") ?></a>
</div>
<div class="form-group">
diff --git a/src/application/views/view_user.php b/src/application/views/view_user.php
index aba0f2f..d3ebe04 100644
--- a/src/application/views/view_user.php
+++ b/src/application/views/view_user.php
@@ -20,6 +20,8 @@ else
$dateJoined = DateTime::createFromImmutable($user->created);
$dateJoined->setTime(0, 0, 0, 0);
+
+$emailPending = $isOwnProfile && $user->pendingEmail !== null;
?>
<div class="clearfix page-header margin-top-0">
@@ -93,7 +95,7 @@ if (($_formError = RequestUtils::getAndClearFormError("update_profile")) !== nul
<div class="form-group">
<label for="i_name"><?= __("Username:") ?></label>
<?php if ($lastNameChangeTooRecent): ?>
- <input required class="form-control" type="text" id="i_name" value="<?= htmlentities($user->name) ?>" disabled>
+ <input class="form-control" type="text" id="i_name" value="<?= htmlentities($user->name) ?>" disabled>
<small class="text-danger"><strong><?= __("You can only change your username every 30 days!") ?></strong></small>
<?php else: ?>
<input required class="form-control" type="text" name="name" id="i_name" value="<?= htmlentities($user->name) ?>">
@@ -101,7 +103,11 @@ if (($_formError = RequestUtils::getAndClearFormError("update_profile")) !== nul
</div>
<div class="form-group">
<label for="i_email"><?= __("Email address:") ?></label>
- <input required class="form-control" type="email" id="i_email" value="<?= htmlentities($user->email) ?>" disabled>
+ <?php if ($emailPending): ?>
+ <input class="form-control" type="email" id="i_email" value="<?= htmlentities($user->email) ?>" disabled>
+ <?php else: ?>
+ <input required class="form-control" type="email" id="i_email" name="email" value="<?= htmlentities($user->email) ?>">
+ <?php endif; ?>
</div>
<div class="form-group">
<label><?= __("Profile picture:") ?></label>