74 lines
3.5 KiB
Plaintext
74 lines
3.5 KiB
Plaintext
<% content_for :title do %>Reset your password<% end %>
|
|
|
|
<%= javascript_include_tag 'common', 'common_vendor', 'sessions' %>
|
|
|
|
<div class="CDB-Text <%= @organization.present? ? 'Sessions' : 'Sessions-navy' %>" style="<%= @organization.present? ? background : '' %>">
|
|
<div class="Sessions-content">
|
|
<div class="Sessions-inner">
|
|
<div class="u-inner">
|
|
<div class="Sessions-left">
|
|
<div class="Sessions-logoContainer">
|
|
<%= render :partial => 'shared/logo', locals: { organization: @organization } %>
|
|
</div>
|
|
|
|
<div class="Sessions-form">
|
|
<%= form_for @user, url: CartoDB.path(self, 'password_change'), class: "js-Loading-form" do |f| %>
|
|
<% if @password_error %>
|
|
<p class="CDB-Text CDB-Size-huge u-altTextColor u-tSpace--m u-justifyCenter Sessions-description" style="background: #f24440; border-radius: 4px; padding: 5px; color: #fff;">
|
|
<%= raw @password_error %>
|
|
</p>
|
|
<% end %>
|
|
|
|
<%= f.hidden_field :username %>
|
|
<div class="Sessions-fieldsGorup">
|
|
<div class="Sessions-field">
|
|
<%= password_field_tag :old_password, "", autocomplete: "off", placeholder: "Type your current password", class: "CDB-Size-medium #{@organization.present? ? 'Sessions-input' : 'Sessions-navy-input'} bottomBorderRadius" %>
|
|
|
|
<% if @old_password_error %>
|
|
<div class="Sessions-fieldError js-Sessions-fieldError" data-content="<%= @old_password_error %>">!</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="Sessions-field">
|
|
<%= password_field_tag :password, "", autocomplete: "off", placeholder: "Type your new password", class: "CDB-Size-medium #{@organization.present? ? 'Sessions-input' : 'Sessions-navy-input'} bottomBorderRadius" %>
|
|
|
|
<% if @new_password_error %>
|
|
<div class="Sessions-fieldError js-Sessions-fieldError" data-content="<%= @new_password_error %>">!</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="Sessions-field">
|
|
<%= password_field_tag :password_confirmation, "", autocomplete: "off", placeholder: "Retype your new password", class: "CDB-Size-medium #{@organization.present? ? 'Sessions-input' : 'Sessions-navy-input'} bottomBorderRadius" %>
|
|
|
|
<% if @new_password_error %>
|
|
<div class="Sessions-fieldError js-Sessions-fieldError" data-content="<%= @new_password_error %>">!</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="Sessions-field">
|
|
<p>
|
|
<button type="submit" class="Sessions-submitButton u-tupper js-Sessions-button js-Loading">
|
|
<span class="js-Loading-text"><%= 'Save' %></span>
|
|
<%= render :partial => 'shared/loading_animation' %>
|
|
</button>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<% unless cartodb_com_hosted? %>
|
|
<footer class="Sessions-footer">
|
|
<div class="u-inner">
|
|
<div class="Sessions-notloggedin is-active">
|
|
<p class="Sessions-text Sessions-text--footer u-txt-center u-altTextColor">Don't have an account yet? <%= link_to 'Sign up here', "https://carto.com/signup" %></p>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<% end %>
|
|
</div>
|