2013-02-05 14:16:51 -05:00
|
|
|
<div id="simple-container">
|
|
|
|
<%if flash[:error]%>
|
|
|
|
<div class='alert alert-error'>
|
2013-02-25 11:42:20 -05:00
|
|
|
<%=flash[:error]%>
|
2013-02-05 14:16:51 -05:00
|
|
|
</div>
|
|
|
|
<%end%>
|
|
|
|
<% if @user.present? and @user.errors.any? %>
|
|
|
|
<div class='alert alert-error'>
|
|
|
|
<% @user.errors.full_messages.each do |msg| %>
|
|
|
|
<li><%= msg %></li>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%if flash[:success]%>
|
|
|
|
<p>
|
2013-03-20 16:55:56 -04:00
|
|
|
<%= flash[:success] %>
|
|
|
|
<%- if @requires_approval %>
|
|
|
|
<%= t 'login.not_approved' %>
|
|
|
|
<% else %>
|
2014-07-23 12:32:06 -04:00
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<a class="btn" href="/"><%= t('password_reset.continue', site_name: SiteSetting.title) %></a>
|
|
|
|
<%= render partial: 'auto_redirect_home' %>
|
2013-03-20 16:55:56 -04:00
|
|
|
<% end %>
|
2013-02-05 14:16:51 -05:00
|
|
|
</p>
|
|
|
|
<% else %>
|
|
|
|
<%if @user.present? %>
|
2014-01-21 12:42:20 -05:00
|
|
|
<h3>
|
|
|
|
<% if @user.has_password? %>
|
|
|
|
<%= t 'password_reset.choose_new' %>
|
|
|
|
<% else %>
|
|
|
|
<%= t 'password_reset.choose' %>
|
|
|
|
<% end %>
|
|
|
|
</h3>
|
2013-02-05 14:16:51 -05:00
|
|
|
|
|
|
|
<%=form_tag({}, method: :put) do %>
|
|
|
|
<p>
|
|
|
|
<input id="user_password" name="password" size="30" type="password">
|
2014-09-09 20:37:39 -04:00
|
|
|
<label><%= t('js.user.password.instructions', count: SiteSetting.min_password_length) %></label>
|
2013-02-05 14:16:51 -05:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-01-21 12:42:20 -05:00
|
|
|
<%=submit_tag( @user.has_password? ? t('password_reset.update') : t('password_reset.save'), class: 'btn')%>
|
2013-02-05 14:16:51 -05:00
|
|
|
</p>
|
|
|
|
<%end%>
|
|
|
|
<%end%>
|
|
|
|
<%end%>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
document.getElementById('user_password').focus()
|
|
|
|
</script>
|