Orbit/app/views/admin/users_new_interface/_user_basic.html.erb

120 lines
4.7 KiB
Plaintext
Raw Normal View History

2012-10-15 05:54:29 +00:00
<%#= devise_error_messages! %>
<div class="map-block back">
<h4><span><%=t(:sys_basic_form)%></span></h4>
<div class="form-horizontal">
<div class="controls-block" >
<div class="control-group language-swich">
<%= f.label t("users.first_name"),{:class=>"control-label", :func=>"field_label"} %>
<div class="controls">
<div class="tabbable">
<div class="tab-content">
<% @site_valid_locales.each_with_index do |locale, i| %>
<div class="tab-pane fade <%= locale %> user-attribute_values-first_name <%= ( i == 0 ) ? "in active" : '' %>">
<%= f.fields_for :first_name_translations do |f| %>
<%= f.text_field locale, :func=>'input_unit', :value => (@user.first_name_translations[locale] rescue nil) %>
<% end %>
</div>
<% end %>
</div>
<ul class="nav nav-pills">
<% @site_valid_locales.each_with_index do |locale, i| %>
<li <%= ( i == 0 ) ? "class=active" : '' %> for="<%= locale %>">
<a data-toggle="tab" href=".user-attribute_values-first_name.<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<% end %>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="controls-block" >
<div class="control-group language-swich">
<%= f.label t("users.last_name"),{:class=>"control-label", :func=>"field_label"} %>
<div class="controls">
<div class="tabbable">
<div class="tab-content">
<% @site_valid_locales.each_with_index do |locale, i| %>
<div class="tab-pane fade <%= locale %> user-attribute_values-last_name <%= ( i == 0 ) ? "in active" : '' %>">
<%= f.fields_for :last_name_translations do |f| %>
<%= f.text_field locale, :func=>'input_unit', :value => (@user.last_name_translations[locale] rescue nil) %>
<% end %>
2012-10-15 06:07:53 +00:00
</div>
<% end %>
</div>
<ul class="nav nav-pills">
<% @site_valid_locales.each_with_index do |locale, i| %>
<li <%= ( i == 0 ) ? "class=active" : '' %> for="<%= locale %>">
<a data-toggle="tab" href=".user-attribute_values-last_name.<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<% end %>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.email"),:class=>"control-label" %>
<div class="controls">
<%= f.email_field :email %>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.sid"),:class=>"control-label" %>
<div class="controls">
<%= f.text_field :sid %>
<span>( <%= t("users.sid_note")%> )</span>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.office_tel"),:class=>"control-label" %>
<div class="controls">
<%= f.text_field :office_tel %>
<span>( <%= t("users.office_tel_note")%> )</span>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.avatar"),:class=>"control-label" %>
<div class="controls">
<%= f.file_field :avatar %>
<% if @user.avatar.file %>
<%= f.check_box :remove_avatar %>
<%= t('delete.file') %>
<% end %>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.sex"),:class=>"control-label" %>
<div class="controls">
<label func="input_unit" for="0" class=" radio inline">
<%= f.radio_button :sex, "male" %><%= t('users.male')%>
</label>
<label func="input_unit" for="1" class=" radio inline">
<%= f.radio_button :sex, "female" %><%= t('users.female')%>
</label>
<label func="input_unit" for="2" class=" radio inline">
<%= f.radio_button :sex, "unknown" %><%= t('users.unknown')%>
</label>
</div>
</div>
</div>
2012-10-15 06:07:53 +00:00
</div>