diff --git a/routes/__pycache__/contacts.cpython-313.pyc b/routes/__pycache__/contacts.cpython-313.pyc index 3b1a4be..eefd5f6 100644 Binary files a/routes/__pycache__/contacts.cpython-313.pyc and b/routes/__pycache__/contacts.cpython-313.pyc differ diff --git a/routes/contacts.py b/routes/contacts.py index e474c71..9fcc849 100644 --- a/routes/contacts.py +++ b/routes/contacts.py @@ -114,10 +114,14 @@ def new_contact(): is_admin=form.is_admin.data, profile_picture=profile_picture ) - user.set_password('changeme') # Set a default password that must be changed + if form.new_password.data: + user.set_password(form.new_password.data) + else: + flash('Password is required when creating a new user.', 'error') + return render_template('contacts/form.html', form=form, title='New User', total_admins=total_admins) db.session.add(user) db.session.commit() - flash('User created successfully! They will need to set their password on first login.', 'success') + flash('User created successfully!', 'success') return redirect(url_for('contacts.contacts_list')) return render_template('contacts/form.html', form=form, title='New User', total_admins=total_admins) diff --git a/templates/rooms/room_members.html b/templates/rooms/room_members.html index b9b2cda..458361d 100644 --- a/templates/rooms/room_members.html +++ b/templates/rooms/room_members.html @@ -25,7 +25,7 @@
-
Current Members
+
Current members in this room
{% if room.member_permissions %} @@ -102,13 +102,13 @@
-
Add New Member
+
Add New Member/h5>
- +