<% if @organization %> <% content_for :title do %><%= @organization.name %><% end %> <% end %> <% content_for :js do %> <%= javascript_include_tag 'common', 'common_vendor', 'sessions' %> <% end %>
<%= render :partial => 'shared/logo', locals: { organization: @organization } %>
<%= form_tag CartoDB.url(self, 'create_session', keep_base_url: true), class: "js-Loading-form" do %> <% if @flash_login_error %>

<%= raw @flash_login_error %>

<% end %> <% if @organization.nil? || @organization.auth_username_password_enabled %>
<%= text_field_tag :email, CartoDB.extract_subdomain(request), :title => "Email or username", placeholder: "邮件地址或用户名", class: "CDB-Size-medium #{@organization.present? ? 'Sessions-input' : 'Sessions-navy-input'} topBorderRadius", autofocus: true %> <% if @login_error %>
!
<% end %>
<%= password_field_tag :password, "", placeholder: "密码", class: "CDB-Size-medium #{@organization.present? ? 'Sessions-input' : 'Sessions-navy-input'} bottomBorderRadius" %> <% if @login_error %>
!
<% end %>
<%= link_to '忘记密码?', forget_password_url(organization_name: @organization.try(:name)) %>

<% end %> <% end %> <% if @oauth_configs.any? %>

OR LOG IN WITH:

<% @oauth_configs.each do |config| %> <%= render partial: config.button_template, locals: { config: config } %> <% end %>
<% end %> <% if @user_login_url %>

Not a member of the <%= @organization.name %> organization? Try the general login instead.

<% elsif @organization.try(:auth_username_password_enabled) %>

Please, remember to use an email address belonging to this organization to login to your account.

<% end %>
<% if organization_signup_url.present? && !cartodb_com_hosted? %> <% end %>