点击打开编辑资料,显示保存的性别

This commit is contained in:
cxt 2015-09-10 15:01:59 +08:00
parent 50aa22c5e5
commit 5f0aac9265
1 changed files with 12 additions and 0 deletions

View File

@ -213,6 +213,7 @@
<% occupation1 = User.current.user_extensions.occupation %>
<% occupation = User.current.user_extensions.occupation %>
<% title = User.current.user_extensions.technical_title %>
<% gender = User.current.user_extensions.gender %>
<% language = User.current.language %>
<% else %>
<% province = "湖南省" %>
@ -510,6 +511,13 @@
}
}
}
function init_gender(pField, gender) {
for (var i=0; i<pField.options.length; i++) {
if (pField.options[i].value == gender) {
pField.selectedIndex = i;
}
}
}
$(function(){
//学校
$("#province").attr("href", "#WOpenWindow")
@ -527,6 +535,10 @@
var occupation1 = "<%= "#{occupation}" %>"
init_identity_and_title(document.getElementById('userIdentity'), identity, document.getElementById('userTechnical_title'), title, language);
//sex
var gender = "<%= "#{gender}" %>"
init_gender(document.getElementById('gender'), gender);
$("#userIdentity").change();
<% if( !@act.nil? && @act == 'password') %>
$("#users_tb_2").click();