<commit_before>- auth_mode = get_vmdb_config[:authentication][:mode]

%span#badge
  %img{:src => "#{current_tenant.logo? ? '/upload/custom_logo.png' : image_path("login-screen-logo.png")}"}

.container
  .row
    .col-md-12
      #brand
        %img{:src => image_path("brand.svg"), :alt => "ManageIQ"}

    .col-md-6.col-lg-5.login
      .form-horizontal#login_div
        = render(:partial => "layouts/spinner",
                 :locals  => {:login => true})

        #invalid_sso_credentials_flash{:style => "display: none"}
          #flash_text_div{:title => _("Click to remove message")}
            .alert.alert-danger
              %span.pficon.pficon-error-circle-o
              %strong= _("Invalid Single Sign-On credentials")
        = render :partial => "layouts/flash_msg"

        - if ext_auth?(:saml_enabled)
          .form-group
            %label.col-md-3.control-label
            .col-md-9
              = link_to(_("Login to Corporate System"), {:action => "initiate_saml_login",
                                                         :button => "saml_login"},
                        :id                   => "saml_login",
                        :class                => "btn btn-primary form-control",
                        :alt                  => "Login",
                        :title                => _("Login to Corporate System"),
                        :remote               => true,
                        "data-method"         => :post,
                        "data-miq_sparkle_on" => true,
                        "data-submit"         => 'login_div')

              %div#saml-login.text-center
                %hr#saml-login
                &nbsp;
                = _('Or')
                &nbsp;
                %hr#saml-login

        .form-group
          %label.col-md-3.control-label= _('Username')
          .col-md-9
            = text_field_tag('user_name', @user_name,
                             :class => "form-control",
                             :placeholder => _('Username'),
                             :onkeypress => "if (miqEnterPressed(event)) miqAjaxAuth();")
            = javascript_tag(javascript_focus('user_name'))

        .form-group
          %label.col-md-3.control-label= _('Password')
          .col-md-9
            = password_field_tag('user_password',
              @user_password,
              :onkeypress => "if (miqEnterPressed(event)) miqAjaxAuth();",
              :autocomplete => "off",
              :placeholder => (auth_mode == "httpd" ? _('Password or Password+One-Time-Password') : _('Password')),
              :class => "form-control")

        - if auth_mode == 'database'
          = render :partial => 'login_more'

        -# Fields collected via JS functions, sent up with credentials
        %input{:type => "hidden", :id => "browser_name", :name => "browser_name"}
        %input{:type => "hidden", :id => "browser_version", :name => "browser_version"}
        %input{:type => "hidden", :id => "browser_os", :name => "browser_os"}
        %input{:type => "hidden", :id => "user_TZO", :name => "user_TZO"}

        .form-group
          .col-xs-8.col-md-offset-3.col-md-6
            - if auth_mode == "database"
              #back_button{:style => "display: none"}
                = link_to(_("Back"), {:action => "authenticate",
                                      :button => "back"},
                          :remote       => true,
                          "data-method" => :post,
                          :title        => _("Back"))
              #more_button
                = link_to(_("Update password"), {:action => "authenticate",
                                                 :button => "more"},
                          :remote       => true,
                          "data-method" => :post,
                          :title        => _("Update Password"))

          .col-xs-4.col-md-3.submit
            - login_url = url_for(:action => "authenticate",
                                  :button => "login")
            - sso_url = url_for(:action => "kerberos_authenticate",
                                :button => "sso_login")

            = link_to(_("Login"), '',
                      :id                   => "login",
                      :class                => "btn btn-primary",
                      :alt                  => "Login",
                      :title                => _("Login"),
                      :onclick              => "miqAjaxAuth('#{j login_url}'); return false;")

            = link_to(_("SSO Login"), '',
                      :id                    => "sso_login",
                      :class                 => "btn btn-primary",
                      :alt                   => "SSO Login",
                      :title                 => _("SSO Login"),
                      :style                 => "display: none;",
                      :onclick              => "miqAjaxAuthSso('#{j sso_url}'); return false;")

    .col-md-6.col-lg-7.details
      - if get_vmdb_config[:session][:show_login_info]
        %p
          = _('Region:')
          %span
            = (MiqRegion.my_region.description)
        %p
          = _('Zone:')
          %span
            = (MiqServer.my_zone)
        %p
          = _('Appliance:')
          %span
            = (MiqServer.my_server.name)
        %p.message
          - if get_vmdb_config[:server][:use_custom_login_text]
            = (get_vmdb_config[:server][:custom_login_text].to_s)

:javascript
  miqGetTZO();
  miqGetBrowserInfo();<commit_msg>Add missing gettext into login.html<commit_after>- auth_mode = get_vmdb_config[:authentication][:mode]

%span#badge
  %img{:src => "#{current_tenant.logo? ? '/upload/custom_logo.png' : image_path("login-screen-logo.png")}"}

.container
  .row
    .col-md-12
      #brand
        %img{:src => image_path("brand.svg"), :alt => "ManageIQ"}

    .col-md-6.col-lg-5.login
      .form-horizontal#login_div
        = render(:partial => "layouts/spinner",
                 :locals  => {:login => true})

        #invalid_sso_credentials_flash{:style => "display: none"}
          #flash_text_div{:title => _("Click to remove message")}
            .alert.alert-danger
              %span.pficon.pficon-error-circle-o
              %strong= _("Invalid Single Sign-On credentials")
        = render :partial => "layouts/flash_msg"

        - if ext_auth?(:saml_enabled)
          .form-group
            %label.col-md-3.control-label
            .col-md-9
              = link_to(_("Login to Corporate System"), {:action => "initiate_saml_login",
                                                         :button => "saml_login"},
                        :id                   => "saml_login",
                        :class                => "btn btn-primary form-control",
                        :alt                  => _("Login"),
                        :title                => _("Login to Corporate System"),
                        :remote               => true,
                        "data-method"         => :post,
                        "data-miq_sparkle_on" => true,
                        "data-submit"         => 'login_div')

              %div#saml-login.text-center
                %hr#saml-login
                &nbsp;
                = _('Or')
                &nbsp;
                %hr#saml-login

        .form-group
          %label.col-md-3.control-label= _('Username')
          .col-md-9
            = text_field_tag('user_name', @user_name,
                             :class => "form-control",
                             :placeholder => _('Username'),
                             :onkeypress => "if (miqEnterPressed(event)) miqAjaxAuth();")
            = javascript_tag(javascript_focus('user_name'))

        .form-group
          %label.col-md-3.control-label= _('Password')
          .col-md-9
            = password_field_tag('user_password',
              @user_password,
              :onkeypress => "if (miqEnterPressed(event)) miqAjaxAuth();",
              :autocomplete => "off",
              :placeholder => (auth_mode == "httpd" ? _('Password or Password+One-Time-Password') : _('Password')),
              :class => "form-control")

        - if auth_mode == 'database'
          = render :partial => 'login_more'

        -# Fields collected via JS functions, sent up with credentials
        %input{:type => "hidden", :id => "browser_name", :name => "browser_name"}
        %input{:type => "hidden", :id => "browser_version", :name => "browser_version"}
        %input{:type => "hidden", :id => "browser_os", :name => "browser_os"}
        %input{:type => "hidden", :id => "user_TZO", :name => "user_TZO"}

        .form-group
          .col-xs-8.col-md-offset-3.col-md-6
            - if auth_mode == "database"
              #back_button{:style => "display: none"}
                = link_to(_("Back"), {:action => "authenticate",
                                      :button => "back"},
                          :remote       => true,
                          "data-method" => :post,
                          :title        => _("Back"))
              #more_button
                = link_to(_("Update password"), {:action => "authenticate",
                                                 :button => "more"},
                          :remote       => true,
                          "data-method" => :post,
                          :title        => _("Update Password"))

          .col-xs-4.col-md-3.submit
            - login_url = url_for(:action => "authenticate",
                                  :button => "login")
            - sso_url = url_for(:action => "kerberos_authenticate",
                                :button => "sso_login")

            = link_to(_("Login"), '',
                      :id                   => "login",
                      :class                => "btn btn-primary",
                      :alt                  => _("Login"),
                      :title                => _("Login"),
                      :onclick              => "miqAjaxAuth('#{j login_url}'); return false;")

            = link_to(_("SSO Login"), '',
                      :id                    => "sso_login",
                      :class                 => "btn btn-primary",
                      :alt                   => _("SSO Login"),
                      :title                 => _("SSO Login"),
                      :style                 => "display: none;",
                      :onclick              => "miqAjaxAuthSso('#{j sso_url}'); return false;")

    .col-md-6.col-lg-7.details
      - if get_vmdb_config[:session][:show_login_info]
        %p
          = _('Region:')
          %span
            = (MiqRegion.my_region.description)
        %p
          = _('Zone:')
          %span
            = (MiqServer.my_zone)
        %p
          = _('Appliance:')
          %span
            = (MiqServer.my_server.name)
        %p.message
          - if get_vmdb_config[:server][:use_custom_login_text]
            = (get_vmdb_config[:server][:custom_login_text].to_s)

:javascript
  miqGetTZO();
  miqGetBrowserInfo();
{'fraction_non_alphanumeric': 0.14413688076681896, 'fraction_numerical': 0.003045776225029114, 'mean_word_length': 1.2390693943040514, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1193564', 'n_tokens_mistral': 3177, 'n_tokens_neox': 3016, 'n_words': 519}