@{
    ViewBag.Title = "Login";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@model GreenTree.Nachtragsmanagement.Web.Models.Login.LoginModel

<link rel="stylesheet" type="text/css" href="~/Content/login.css" />

<div class="outerCenterWrapper">
	<img src="@Url.Content("~/Content/Images/logo.png")" alt="Schweerbau Logo" />
	<h2>Nachtragsmanagement 2.0</h2>
	<div class="innerCenterWrapper">
		<h4>Anmeldung</h4>
		@using (Html.BeginForm())
		{
			<div class="fieldContainer">
				<img src="~/Content/Images/user-32.png" />
				@Html.DevExpress().TextBoxFor(m => m.Username, s =>
			    {
				    s.Properties.NullText = "Benutzer";
				    s.ControlStyle.CssClass += "devExNearFullWidth devExFontLarge devExFloatLeft";
			    }).GetHtml()
			</div>
			<div class="fieldContainer">
				<img src="~/Content/Images/password-32.png" />
				@Html.DevExpress().TextBoxFor(m => m.Password, s =>
				{
					s.Properties.NullText = "Passwort";
					s.Properties.Password = true;
					s.ControlStyle.CssClass += "devExNearFullWidth devExFontLarge devExFloatLeft";
				}).GetHtml()
			</div>
			@Html.DevExpress().CheckBoxFor(m => m.IsPermanent, s =>
			{
				s.Text = "Anmeldung speichern";
				s.ControlStyle.CssClass += "devExCenter";
			}).GetHtml()
			<br />
			if (ViewData["LoginFailed"] != null && (bool)ViewData["LoginFailed"] == true)
			{
				<span style="color: indianred">Benutzername oder Passwort falsch.</span>
				<br />
				<br />
			}
			@Html.DevExpress().Button(s =>
		    {
			    s.Name = "devButtonLogin";
			    s.UseSubmitBehavior = true;
			    s.Text = "Login";
				s.Width = new Unit(100, UnitType.Percentage);
				s.ControlStyle.CssClass += "devExFontLarge";
		    }).GetHtml()
		}
	</div>
</div>