mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 06:33:38 +08:00
47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
<div id="simple-container">
|
|
<%if flash[:error]%>
|
|
<div class='alert alert-error'>
|
|
<%=flash[:error]%>
|
|
</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]%>
|
|
<div class='alert alert-success'>
|
|
<%=flash[:success]%>
|
|
</div>
|
|
<p>
|
|
<%- if @requires_approval %>
|
|
<%= t 'login.not_approved' %>
|
|
<% else %>
|
|
<%= raw t 'activation.please_continue', link: link_to(SiteSetting.title, root_path) %>
|
|
<% end %>
|
|
|
|
|
|
</p>
|
|
<% else %>
|
|
<%if @user.present? %>
|
|
<h3><%= t 'password_reset.choose_new' %></h3>
|
|
|
|
<%=form_tag({}, method: :put) do %>
|
|
<p>
|
|
<input id="user_password" name="password" size="30" type="password">
|
|
</p>
|
|
<p>
|
|
<%=submit_tag(t('password_reset.update'), class: 'btn')%>
|
|
</p>
|
|
<%end%>
|
|
<%end%>
|
|
<%end%>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
document.getElementById('user_password').focus()
|
|
</script>
|