testing, testing

This commit is contained in:
Michael Becker 2024-08-04 23:14:58 -04:00
parent 6e703ea3d5
commit ac22624ce6

View File

@ -81,11 +81,49 @@ public abstract class MochaWebApplication : WebApplication
body > form > div.uwt-panel > div.uwt-content > div:first-child
{
background-image: url('" + app.Oms.GetAttachmentUrl(loginHeaderImage) + @"');
width: 256px;
height: 256px;
margin-left: auto;
margin-right: auto;
background-size: cover;
}
body > form > div.uwt-panel {
width: 600px;
margin-left: auto;
margin-right: auto;
margin-top: 128px;
}
h1
{
font-weight: lighter;
}
.uwt-copyright-text
{
padding: 32px;
text-align: center;
}
"));
}
}
protected override void CreateChildControls()
protected override void OnInit(RenderEventArgs e)
{
base.OnInit(e);
if (e.Request.Form.ContainsKey("username") && e.Request.Form.ContainsKey("password"))
{
if (e.Request.Form["username"] == "mocha")
{
if (e.Request.Form["password"] == "testing")
{
e.Response.Redirect("~/d/home.htmld");
}
}
}
}
protected override void CreateChildControls()
{
base.CreateChildControls();
@ -104,7 +142,7 @@ body > form > div.uwt-panel > div.uwt-content > div:first-child
new FormView.FormViewItem("User _name", new TextBox() { Name = "username" }),
new FormView.FormViewItem("_Password", new TextBox(TextBoxType.Password) { Name = "password" } )
}));
panel.FooterControls.Add(new Button("_Log In") { UseSubmitBehavior = true });
panel.FooterControls.Add(new Button("_Log In") { ThemeColorPreset = ThemeColorPreset.Primary, UseSubmitBehavior = true });
Controls.Add(panel);
Literal footer = new Literal("<div class=\"uwt-copyright-text\">Powered by Mocha<br />&#169; 2024 MBS Business Solutions</div>");