1.登录增加js提示可以用昵称和邮箱登录

2.修改资料界面增加昵称的修改以及修改昵称的验证
3.修改昵称的描述
This commit is contained in:
sw 2014-05-28 15:05:11 +08:00
parent 8227c5222a
commit e0273d320c
5 changed files with 45 additions and 10 deletions

View File

@ -1,11 +1,33 @@
<%= call_hook :view_account_login_top %>
<script type="text/javascript" language="javascript">
function clearInfo(id, content) {
var text = $('#' + id);
if (text.val() == content) {
$('#' + id).val('');
}
}
function showInfo(id, content) {
var text = $('#' + id);
if (text.val() == '') {
$('#' + id).val(content);
}
}
</script>
<div id="login-form">
<%= form_tag(signin_path) do %>
<%= back_url_hidden_field_tag %>
<table>
<tr>
<td align="right"><label for="username"><%=l(:field_login)%>:</label></td>
<td align="left"><%= text_field_tag 'username', params[:username], :tabindex => '1' %></td>
<td align="right"><label for="username"><%=l(:lable_user_name)%>:</label></td>
<td align="left">
<%= text_field_tag 'username', params[:username], :tabindex => '1' , :value => "#{l(:label_login_prompt)}",
:onfocus => "clearInfo('username','#{l(:label_login_prompt)}')",
:onblur => "showInfo('username','#{l(:label_login_prompt)}')",
:style => "resize: none;font-size: 12px;color: #818283;"%>
</td>
</tr>
<tr>
<td align="right"><label for="password"><%=l(:field_password)%>:</label></td>

View File

@ -302,10 +302,16 @@
<!-- added by bai 增加了身份、性别和地区-->
<span id = 'gender' style = 'display:none'>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_gender) %><span class="required"> &nbsp;</span></strong></td>
<p>
<table><tr>
<td class="info" align="right" style="width: 90px"><strong><%= l(:label_gender) %><span class="required"> &nbsp;</span></strong></td>
<td class="info" style="width: 10px">
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option>
<option value = '1'>#{l(:label_gender_female)}</option>".html_safe %></td></tr></table></p></span>
<option value = '1'>#{l(:label_gender_female)}</option>".html_safe %>
</td>
</tr></table>
</p>
</span>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_location) %><span class="required"> *</span></strong></td>

View File

@ -57,6 +57,10 @@
</legend>
<div>
<span id='name' style='display:none'>
<p style="width:630px;padding-left: 26px;">
<%= f.text_field :login, :required => true %>
<span class='font_lighter'><%= l(:label_max_number) %></span>
</p>
<p style="width:530px;padding-left: 26px;">
<%= f.text_field :lastname, :required => true %>
<span class='font_lighter'><%= l(:field_lastname_eg) %></span>

View File

@ -1332,7 +1332,7 @@ en:
label_tags_user_mail: User E-mail
label_tags_user_name: User Name
label_tags_numbers: Tag numbers
label_max_number: Must be at most 25 characters long.
label_max_number: Open label nickname is displayed on the web site of your,Must be at most 25 characters long.
label_all_revisions: All revisions
label_repository_name: Repository name
label_upassword_info: The password can be shared in the group
@ -1617,6 +1617,7 @@ en:
label_class_hour: period
label_activity_time: publish date
label_login_prompt: Email/NickName
# ajax异步验证
modal_valid_passing: can be used.

View File

@ -284,7 +284,7 @@ zh:
field_is_public: 公开
field_parent: 上级项目
field_is_in_roadmap: 在路线图中显示
field_login: 登录名
field_login: 昵称
field_mail_notification: 邮件通知
field_admin: 管理员
field_last_login_on: 最后登录
@ -598,6 +598,8 @@ zh:
label_my_page_block: 我的工作台模块
label_administration: 管理
label_login: 登录
label_login_prompt: 邮箱/账号
lable_user_name: 登录名
label_logout: 退出
label_help: 帮助
label_reported_issues: 已报告的问题
@ -1495,7 +1497,7 @@ zh:
label_tags_user_mail: 用户邮箱:
label_tags_user_name: 用户名:
label_tags_numbers: Tag统计
label_max_number: 至多25个字符。
label_max_number: 昵称是在网站中显示的您的公开标识,至多25个字符。
label_mail_attention: qq邮箱可能收不到此邮件其他邮箱如果没有收到可能在垃圾邮件中其中gmail与教育网邮箱的激活邮件有时比较慢请耐心等待。
label_all_revisions: 所有版本:
label_upassword_info: 该密码在项目组内可共享