Set officer positions to use the name of the user being modified
Was originally current_user
This commit is contained in:
parent
fa7a5de1cb
commit
c2c70fc659
2 changed files with 6 additions and 3 deletions
|
@ -224,10 +224,14 @@ def officer_positions(user_id):
|
||||||
|
|
||||||
form = OfficerForm(request.form)
|
form = OfficerForm(request.form)
|
||||||
|
|
||||||
|
u = User.query.filter_by(id=user_id).first()
|
||||||
|
if u is None:
|
||||||
|
flash("Invalid user")
|
||||||
|
return redirect(url_for("admin.users"))
|
||||||
position_list = Officer.query.filter_by(user_id=user_id).order_by(Officer.term_end).all()
|
position_list = Officer.query.filter_by(user_id=user_id).order_by(Officer.term_end).all()
|
||||||
|
|
||||||
return render_template("admin/officers.html", form=form,
|
return render_template("admin/officers.html", form=form,
|
||||||
position_list=position_list, user_id=user_id)
|
position_list=position_list, user_id=user_id, user=u)
|
||||||
|
|
||||||
@bp.route("/officer/get/<string:pos_id>")
|
@bp.route("/officer/get/<string:pos_id>")
|
||||||
@login_required
|
@login_required
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
||||||
|
|
||||||
<h1>Officer Positions for {{ current_user.first_name}} {{ current_user.last_name
|
<h1>Officer Positions for {{ user.first_name}} {{ user.last_name }}</h1>
|
||||||
}}</h1>
|
|
||||||
<p>Update Photo: <a href="{{ url_for('admin.upload_photo')
|
<p>Update Photo: <a href="{{ url_for('admin.upload_photo')
|
||||||
}}">Here</a>
|
}}">Here</a>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
|
|
Loading…
Add table
Reference in a new issue