增加修改昵称功能以及昵称是否重复的判断
This commit is contained in:
parent
218fb3f831
commit
3546355f70
|
@ -54,6 +54,7 @@ class MyController < ApplicationController
|
||||||
@user.safe_attributes = params[:user]
|
@user.safe_attributes = params[:user]
|
||||||
@user.pref.attributes = params[:pref]
|
@user.pref.attributes = params[:pref]
|
||||||
@user.pref[:no_self_notified] = (params[:no_self_notified] == '1')
|
@user.pref[:no_self_notified] = (params[:no_self_notified] == '1')
|
||||||
|
@user.login = params[:login]
|
||||||
unless @user.user_extensions.nil?
|
unless @user.user_extensions.nil?
|
||||||
if @user.user_extensions.identity == 2
|
if @user.user_extensions.identity == 2
|
||||||
@user.firstname = params[:enterprise_name]
|
@user.firstname = params[:enterprise_name]
|
||||||
|
|
|
@ -55,20 +55,25 @@
|
||||||
<legend onclick="toggleFieldset(this);">
|
<legend onclick="toggleFieldset(this);">
|
||||||
<%= l(:label_information_plural) %>
|
<%= l(:label_information_plural) %>
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
|
<!-- 昵称 -->
|
||||||
|
<p style="width:630px;padding-left: 26px;">
|
||||||
|
<%= f.text_field :login, :required => true, :name => "login"%>
|
||||||
|
<span class='font_lighter'><%= l(:label_max_number) %></span>
|
||||||
|
<br/>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span id='name' style='display:none'>
|
<span id='name' style='display:none'>
|
||||||
<p style="width:630px;padding-left: 26px;">
|
|
||||||
<%= f.text_field :login, :required => true %>
|
<p style="width:530px;padding-left: 26px;">
|
||||||
<span class='font_lighter'><%= l(:label_max_number) %></span>
|
<%= f.text_field :lastname, :required => true %>
|
||||||
</p>
|
<span class='font_lighter'><%= l(:field_lastname_eg) %></span>
|
||||||
<p style="width:530px;padding-left: 26px;">
|
</p>
|
||||||
<%= f.text_field :lastname, :required => true %>
|
<p style="width:530px;padding-left: 26px;">
|
||||||
<span class='font_lighter'><%= l(:field_lastname_eg) %></span>
|
<%= f.text_field :firstname, :required => true %>
|
||||||
</p>
|
<span class='font_lighter'><%= l(:field_firstname_eg) %></span>
|
||||||
<p style="width:530px;padding-left: 26px;">
|
</p>
|
||||||
<%= f.text_field :firstname, :required => true %>
|
|
||||||
<span class='font_lighter'><%= l(:field_firstname_eg) %></span>
|
|
||||||
</p>
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span id='enterprise' style='display:none'>
|
<span id='enterprise' style='display:none'>
|
||||||
|
|
Loading…
Reference in New Issue