diff --git a/app/views/managements/update_user.html.erb b/app/views/managements/update_user.html.erb index af1c59c0..d288c7fb 100644 --- a/app/views/managements/update_user.html.erb +++ b/app/views/managements/update_user.html.erb @@ -193,9 +193,10 @@ <% if User.current.admin? %> - name="admin" value="<%= @user.admin? ? "1" : "0" %>" id="person_admin" class="magic-checkbox" style="float:left; margin-top: 8px;"> + id="person_admin" class="magic-checkbox" style="float:left; margin-top: 8px;"> + "> <% end %> @@ -636,9 +637,9 @@ <% if User.current.admin? %> var admin_check = document.getElementById('person_admin').checked; if (admin_check) { - document.getElementById('person_admin').value = "1"; + document.getElementById('user_admin').value = "1"; } else { - document.getElementById('person_admin').value = "0"; + document.getElementById('user_admin').value = "0"; } <% end %> my_account_form_submit();