diff --git a/administration/views.py b/administration/views.py index 3ab94f7..239f4d3 100644 --- a/administration/views.py +++ b/administration/views.py @@ -352,8 +352,9 @@ def view_administration_users_change_password(request, user_id): if form.is_valid(): user.set_password(form.cleaned_data['password1']) user.save() - set_message(request, u'ตั้งรหัสผ่านใหม่เรียบร้อย') - return redirect('view_administration_users_edit', (user.id)) + + messages.success(request, 'ตั้งรหัสผ่านใหม่เรียบร้อย') + return redirect('view_administration_users') else: form = UserChangePasswordForm() diff --git a/templates/page_administration/manage_users_change_password.html b/templates/page_administration/manage_users_change_password.html index 221c6b0..a65935e 100644 --- a/templates/page_administration/manage_users_change_password.html +++ b/templates/page_administration/manage_users_change_password.html @@ -21,6 +21,8 @@

ตั้งรหัสผ่านใหม่

กลับไปหน้ารายชื่อผู้ใช้ »
{% else %}
+ {% csrf_token %} +