|
|
@ -190,6 +190,14 @@
|
|
|
|
<input type="checkbox" <%= @user.business? ? "checked" : "" %> name="business" value="<%= @user.business? ? "1" : "0" %>" id="person_business" class="magic-checkbox" style="float:left; margin-top: 8px;">
|
|
|
|
<input type="checkbox" <%= @user.business? ? "checked" : "" %> name="business" value="<%= @user.business? ? "1" : "0" %>" id="person_business" class="magic-checkbox" style="float:left; margin-top: 8px;">
|
|
|
|
<label for="person_business"></label>
|
|
|
|
<label for="person_business"></label>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<% if User.current.admin? %>
|
|
|
|
|
|
|
|
<label class="panel-form-label fl mr18">管理员:</label>
|
|
|
|
|
|
|
|
<span class="fl">
|
|
|
|
|
|
|
|
<input type="checkbox" <%= @user.admin? ? "checked" : "" %> name="admin" value="<%= @user.admin? ? "1" : "0" %>" id="person_admin" class="magic-checkbox" style="float:left; margin-top: 8px;">
|
|
|
|
|
|
|
|
<label for="person_admin"></label>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<li class="clearfix mb10 hascontont">
|
|
|
|
<li class="clearfix mb10 hascontont">
|
|
|
|
<label class="panel-form-label fl mr18">职业:</label>
|
|
|
|
<label class="panel-form-label fl mr18">职业:</label>
|
|
|
@ -625,7 +633,14 @@
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
document.getElementById('person_business').value = "0";
|
|
|
|
document.getElementById('person_business').value = "0";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
<% if User.current.admin? %>
|
|
|
|
|
|
|
|
var admin_check = document.getElementById('person_admin').checked;
|
|
|
|
|
|
|
|
if (admin_check) {
|
|
|
|
|
|
|
|
document.getElementById('person_admin').value = "1";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
document.getElementById('person_admin').value = "0";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
my_account_form_submit();
|
|
|
|
my_account_form_submit();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
function my_account_form_submit(){
|
|
|
|
function my_account_form_submit(){
|
|
|
|