patch_file/updatefiles/admin/_user_basic_passwd.html.erb

52 lines
2.2 KiB
Plaintext

<%= form_for @user, :html => { :class=>"form-horizontal main-forms", :id=>"user-forms"} do |f| %>
<%= f.error_messages %>
<div class="attributes">
<div class="attributes-header clearfix">
<h4><%=t(:sys_basic_id_form)%></h4>
</div>
<div class="attributes-body">
<!-- Account -->
<div class="control-group">
<label class="control-label muted" for="account">
<label for="user_name" class="control-label"><%= t("users.user_id")%></label>
</label>
<div class="controls add-input">
<% if current_user.is_admin? && (@user.user_name != "rulingcom" rescue false) %>
<%= f.text_field :user_name, :class=>"input-medium", :id=>"account", :placeholder=>"#{t('users.user_id')}" %>
<span class="help-block"><%= t("users.user_id_note")%></span>
<% else %>
<%= f.text_field :user_name, :class=>"input-medium", :id=>"account", :placeholder=>"#{t('users.user_id')}" %>
<span class="help-block"><%= t("users.user_id_note")%></span>
<% end %>
</div>
</div>
<!-- Password -->
<div class="control-group">
<label class="control-label muted" for="password">
<label for="password" class="control-label"><%= t("users.new_password")%></label>
</label>
<div class="controls add-input">
<input name="foilautofill" style="display: none;" type="password" />
<%= f.password_field :password, :class=>"input-medium", :id=>"password", :autocomplete=>"off" %>
<span class="help-block"><%= t("users.new_password_note")%></span>
</div>
</div>
<!-- Confirm Password -->
<div class="control-group">
<label class="control-label muted" for="confirm_password">
<label for="password_confirmation" class="control-label"><%= t("users.new_password_confirmation")%></label>
</label>
<div class="controls add-input">
<%= f.password_field :password_confirmation, :class=>"input-medium", :id=>"confirm_password" %>
</div>
</div>
<%= f.hidden_field :approved, value: true if current_user.is_admin? %>
<%= f.hidden_field :force_reset_password, value: false %>
</div>
</div>
<% end %>