<!--
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->

<div class="my-light-login login-layout login-backgroud">
  <div class="main-container ">
    <div class="main-content row">
      <div class="col-sm-10 col-sm-offset-1">
        <div class="login-container mylogin-body">
          <div class="login-box box box-solid">
            <div class="box-header">
              <div class="box-title">
                <h4 class="header blue lighter bigger"><i class="ace-icon fa fa-coffee green"></i> Sign in </h4>
              </div>
            </div>
            <div class="box-body">
              <div class="alert alert-danger animated fadeIn" ng-if="error">{{error}}</div>
              <form name="login_form" ng-submit="login()">
                <div class="form-group">
                                    <span class="width-100 input-icon input-icon-right">
                                        <input id="username" class="form-control" ng-model="username" type="text"
                                               autofocus="autofocus" ng-required placeholder="Username" auto-fill-sync/>
                                        <i class="ace-icon fa fa-user"></i>
                                    </span>
                </div>
                <div class="form-group">
                                    <span class="width-100 input-icon input-icon-right">
                                        <input id="password" class="form-control" ng-model="password" type="password"
                                               ng-required placeholder="Password" auto-fill-sync/>
                                        <i class="ace-icon fa fa-lock"></i>
                                    </span>
                </div>
                <div class="space"></div>
                <div class="form-group">
                  <a href="http://kylin.apache.org/community/" target="_blank" class="text-muted">Login Issue?</a>
                  <button class="pull-right btn btn-sm btn-primary" type="submit" ng-disabled="login_form.$invalid">
                    <i class="ace-icon fa fa-key"></i>
                    <span class="bigger-110">{{loading? 'Logging In...': 'Log In'}}</span>
                  </button>
                </div>
                <div class="space-4"></div>
              </form>
            </div>
            <div class="box-footer" ng-if="authn">
              <div>
                <a class="btn btn-sm btn-default" ng-click="redirectLoginEntry(authn)" style="width: 100%;">
                  <i class="ace-icon fa fa-sign-in"></i>
                  <span class="bigger-110">{{authn.label}}</span>
                </a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
