mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
community breadcrumb
This commit is contained in:
parent
396a5bae4c
commit
9d7c3976c2
2 changed files with 11 additions and 4 deletions
|
@ -121,12 +121,12 @@ def reset_password_request():
|
|||
if form.validate_on_submit():
|
||||
if form.email.data.lower().startswith('postmaster@') or form.email.data.lower().startswith('abuse@') or \
|
||||
form.email.data.lower().startswith('noc@'):
|
||||
flash(_('Sorry, you cannot use that email address'), 'error')
|
||||
flash(_('Sorry, you cannot use that email address.'), 'error')
|
||||
else:
|
||||
user = User.query.filter_by(email=form.email.data).first()
|
||||
if user:
|
||||
send_password_reset_email(user)
|
||||
flash(_('Check your email for the instructions to reset your password'))
|
||||
flash(_('Check your email for a link to reset your password.'))
|
||||
return redirect(url_for('auth.login'))
|
||||
else:
|
||||
flash(_('No account with that email address exists'), 'warning')
|
||||
|
@ -145,7 +145,7 @@ def reset_password(token):
|
|||
if form.validate_on_submit():
|
||||
user.set_password(form.password.data)
|
||||
db.session.commit()
|
||||
flash(_('Your password has been reset.'))
|
||||
flash(_('Your password has been reset. Please use it to log in with user name of %(name)s.', name=user.user_name))
|
||||
return redirect(url_for('auth.login'))
|
||||
return render_template('auth/reset_password.html', form=form)
|
||||
|
||||
|
|
|
@ -16,8 +16,15 @@
|
|||
</div>
|
||||
<img class="community_icon_big bump_up rounded-circle" src="{{ community.icon_image() }}" />
|
||||
<h1 class="mt-2">{{ community.title }}</h1>
|
||||
{% elif community.icon_image() != '' %}
|
||||
{% elif community.icon_id %}
|
||||
<div class="row">
|
||||
<nav aria-label="breadcrumb" id="breadcrumb_nav" title="Navigation">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
|
||||
<li class="breadcrumb-item"><a href="/communities">{{ _('Communities') }}</a></li>
|
||||
<li class="breadcrumb-item active">{{ community.title|shorten }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<div class="col-2">
|
||||
<img class="community_icon_big rounded-circle" src="{{ community.icon_image() }}" />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue