<!--
#   Copyright © 2021,2022 IsardVDI S.L.
#
#   This file is part of DD
#
#   DD is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or (at your
#   option) any later version.
#
#   DD is distributed in the hope that it will be useful, but WITHOUT ANY
#   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
#   FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
#   details.
#
#   You should have received a copy of the GNU Affero General Public License
#   along with DD. If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Login | DD</title>

    <!-- Bootstrap -->
    <link href="/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- Animate.css -->
    <link href="/vendors/animate.css/animate.min.css" rel="stylesheet">
	<!-- PNotify -->
	<link href="/vendors/pnotify/dist/pnotify.css" media="all" rel="stylesheet" type="text/css" />
	<link href="/vendors/pnotify/dist/pnotify.buttons.css" media="all" rel="stylesheet" type="text/css" />
    <!-- Custom Theme Style -->
    <link href="/build/css/custom.min.css" rel="stylesheet">
    <!-- Isard Style Sheet-->
    <link href="/static/dd.css?2303" rel="stylesheet">
  </head>
    
  <body class="login">
    <div>
      <a class="hiddenanchor" id="signup"></a>
      <a class="hiddenanchor" id="signin"></a>
      <div class="login_wrapper">
        <div class="animate form login_form">
          <section class="login_content">
            <form id="login-form" action="{{ url_for('login') }}" method="POST" novalidate>
              <img src="https://nextcloud.{{ DOMAIN }}/themes/dd/core/img/dd.svg" height="75px">
              <h1></h1>
              <div>
                <input type="text" name="user" class="form-control" placeholder="Username" required="" autofocus />
              </div>
              <div>
                <input type="password" name="password" class="form-control" placeholder="Password" required="" />
              </div>
              <div>
				<button type="submit" class="btn btn-default submit">Login</button>
              </div>
              <div class="clearfix"></div>
              <div class="separator">
                <div class="clearfix"></div>
                <br />
              </div>
            </form>
          </section>
        </div>
      </div>
      {% include 'footer.html' %}
    </div>
  </body>

    <!-- jQuery -->
    <script src="/vendors/jquery/dist/jquery.min.js"></script>
    <!-- PNotify -->
	<script type="text/javascript" src="/vendors/pnotify/dist/pnotify.js"></script>
	<script type="text/javascript" src="/vendors/pnotify/dist/pnotify.confirm.js"></script>
	<script type="text/javascript" src="/vendors/pnotify/dist/pnotify.buttons.js"></script>    
	<script>PNotify.prototype.options.styling = "bootstrap3";</script>

		{% with messages = get_flashed_messages(with_categories=true) %}
		  {% if messages %}
			{% for category, message in messages %}
				<script type="text/javascript">
  				new PNotify({
					title: "{{ nav }}",
					text: "{{ message }}",
					hide: true,
					// icon: 'fa fa-alert-sign',
					opacity: 1,
					type: "error",
					addclass: "pnotify-center"
				});
				</script>			
			{% endfor %}
		  {% endif %}
		{% endwith %}
    <!-- Isard restful ajax calls -->
    <script src="/static/js/restful.js"></script>
</html>
