From ead4437aae663aa8293313e48c87e349151e336a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 26 Jul 2019 09:47:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/managements/update_user.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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();