Skip to content

Commit

Permalink
chore(view): update "merge accounts" template
Browse files Browse the repository at this point in the history
  • Loading branch information
kikkomep committed Jan 16, 2024
1 parent f8287bd commit bb5102c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
5 changes: 4 additions & 1 deletion lifemonitor/auth/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,10 @@ def merge():
)
return profile()
# render the merge page
return render_template("auth/merge.j2", form=form)
return render_template("auth/merge.j2", form=form, identity={
"username": username,
"provider": provider
})


@blueprint.route("/create_apikey", methods=("POST",))
Expand Down
19 changes: 13 additions & 6 deletions lifemonitor/auth/templates/auth/merge.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@
<div class="card-body login-card-body text-center">
<h5 class="login-box-msg text-bold">Merge Account</h5>
<p class="font-weight-light">
If you want to merge another
account into this one, log in to that account here.
That account must have a password set.</p>
Your <b>{{ identity.provider }}</b> identity is already associated
with the existing account under the username <b>{{ identity.username }}</b>.
</p>
<p class="font-weight-light">
If you wish to merge your <b>{{ current_user.username }}</b> account
with your <b>{{ identity.username }}</b> account,
please log in to the later (ensure that it has a password set).
</p>
<form method="POST">
{{ form.hidden_tag() }}
{{ macros.render_custom_field(form.username,caption="identity username",disabled="true")}}
Expand All @@ -42,9 +47,11 @@
<i class="fas fa-exclamation-triangle"></i>
<b class="text-warning font-weight-bold">Warning:</b></span>
<span class="font-weight-bold" style="color: var(--test-aborted)">
all of the content of that account
will be transferred to this account,
and then that account will be deleted!
all content from your current <b class="font-weight-light">{{ current_user.username }}</b> account
will be transferred to the
<b class="font-weight-light">{{ identity.username }}</b> account,
and then the <b class="font-weight-light">{{ current_user.username }}</b>
account will be deleted!
</span>
</div>
</div>
Expand Down

0 comments on commit bb5102c

Please sign in to comment.