{% extends "templates/web.html" %}

{% block style %}
<style>
	{% include "templates/includes/login/login.css" %}
</style>
{% endblock %}

{% block page_content %}
<!-- {{ for_test }} -->
<section class='for-login'>
	<div class="login-content page-card" style="margin-top: 20px;">
		<form class="form-signin form-login" role="form">
			<div class="page-card-head">
				<span class="indicator blue" data-text="{{ _("Sign In") }}"></span>
			</div>

			<input type="text" id="login_email"
				class="form-control" placeholder="{{ 
					_('Email address or Mobile number') 
					if frappe.utils.cint(frappe.db.get_value('System Settings', 'System Settings', 'allow_login_using_mobile_number')) 
					else _('Email address') }}"
				required autofocus>


			<input type="password" id="login_password"
				class="form-control" placeholder="{{ _('Password') }}" required>

			<button class="btn btn-sm btn-primary btn-block btn-login" type="submit">
				{{ _("Sign in") }}</button>

			{% if ldap_settings.enabled %}
			<button class="btn btn-sm btn-default btn-block btn-login btn-ldap-login">
				{{ _("Login with LDAP") }}</button>
			{% endif %}
		</form>
	</div>
	<div class='form-footer'>

			<div class='social-logins'>
			{%- if social_login -%}
				<h6>{{ _("Or login with") }}</h6>

				<p class="text-center" style="margin-top: 15px">
				{%- if facebook_login is defined %}
				<a href="{{ facebook_login }}"
					class="btn btn-default btn-xs btn-social btn-facebook">
					<i class="fa fa-facebook-official"></i> {{ _("Facebook") }}</a>
				{%- endif -%}

				{%- if google_login is defined %}
				<a href="{{ google_login }}" class="btn btn-default btn-xs btn-social btn-google">
					<i class="fa fa-google-plus"></i> {{ _("Google") }}</a>
				{%- endif -%}

				{%- if github_login is defined %}
				<a href="{{ github_login }}" class="btn btn-default btn-xs btn-social btn-github">
					<i class="fa fa-github"></i> {{ _("GitHub") }}</a>
				{%- endif -%}

				{%- if frappe_login is defined %}
				<a href="{{ frappe_login }}" class="btn btn-default btn-xs btn-social">
					<img style='width: 16px; height: 16px;'
						src="/assets/frappe/images/favicon.png"> {{ _("Frappe") }}</a>
				{%- endif -%}
				</p>
			{%- endif -%}
			</div>

	{%- if not disable_signup -%}
		<p class="text-center">
			<a href="#signup" style="margin-top: -2px;">{{ _("Don't have an account? Sign up") }}</a>
		</p>
	{%- endif -%}
	<p class="text-center">
		<a href="#forgot">{{ _("Forgot Password?") }}</a></p>
	</div>
</section>
<section class='for-signup'>
	<div class="login-content page-card" style="margin-top: 20px;">
	<form class="form-signin form-signup hide" role="form">
		<div class="page-card-head">
			<span class="indicator blue" data-text="{{ _("Sign Up") }}"></span>
		</div>
		<input type="text" id="signup_fullname"
			class="form-control" placeholder="{{ _('Full Name') }}" required autofocus>
		<input type="email" id="signup_email"
			class="form-control" placeholder="{{ _('Email address') }}" required>
		<button class="btn btn-sm btn-primary btn-block btn-signup" type="submit">{{ _("Sign up") }}</button>
	</form>
	</div>
	<div class='form-footer'>
		<a href="#login" class="blue">{{ _("Have an account? Login") }}</a>
	</div>
</section>

<section class='for-forgot'>
	<div class="login-content page-card" style="margin-top: 20px;">
	<form class="form-signin form-forgot hide" role="form">
		<div class="page-card-head">
			<span class="indicator blue" data-text="{{ _("Forgot Password") }}"></span></div>
		<input type="email" id="forgot_email"
			class="form-control" placeholder="{{ _('Email address') }}" required autofocus>
		<button class="btn btn-sm btn-primary btn-block btn-forgot" type="submit">{{ _("Send Password") }}</button>
	</form>
	</div>
	<div class='form-footer'>
		<a href="#login">{{ _("Back to Login") }}</a>
	</div>
</section>
{% endblock %}

{% block script %}
	<script>{% include "templates/includes/login/login.js" %}</script>
{% endblock %}

{% block sidebar %}{% endblock %}
