journalduhacker/app/views/login/set_new_password.html.erb
joshua stein 9f5e04bbba use _path for most things instead of _url
Instead of hard-coding the scheme and host everywhere, use _path
methods to show relative URLs.

Except that our previous setting of
Rails.application.routes.default_url_options in
config.after_initialize made this moot because Rails inserts that
host into all _path helpers for some reason.  So revert that
setting.

But then anything that wants an absolute URL doesn't know the
hostname and the root_url helper throws an exception.  So make a
Rails.application.root_url shortcut to pass the per-app settings in
Rails.application to root_url.

Now we can just use _path helpers most places but still use _url
ones where we need them, such as in RSS views and e-mail templates.
2015-01-02 17:02:55 -06:00

29 lines
673 B
Plaintext

<div class="box wide">
<div class="legend">
Set New Password
</div>
<%= form_tag set_new_password_path, { :autocomplete => "off" } do %>
<%= error_messages_for(@reset_user) %>
<%= hidden_field_tag "token", params[:token] %>
<p>
<%= label_tag :username, "Username:" %>
<%= @reset_user.username %>
<br />
<%= label_tag :password, "New Password:" %>
<%= password_field_tag :password, "", :size => 30 %>
<br />
<%= label_tag :password_confirmation, "(Again):" %>
<%= password_field_tag :password_confirmation, "", :size => 30 %>
<br />
<p>
<%= submit_tag "Set New Password" %>
</p>
<% end %>
</div>