<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" encoding="utf-8" indent="yes"/>

    <!-- Parameters -->
    <xsl:param name="PAGE_TITLE">Georgia Housing Report Sign In</xsl:param>
    <xsl:param name="FORM_NAME">signIn</xsl:param>
    <xsl:param name="BTN_SUBMIT"/>
    <xsl:param name="INVALID_SIGNIN"/>

    <xsl:template match="/">
        <xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html></xsl:text>
        <html lang="en">
            <head>
        
                <meta charset="utf-8"/>
                <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
                <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

                <title>
                    <xsl:value-of select="$APPLICATION_NAME"/>
                </title>
                
                <link href="css/themes/Spacelab/bootstrap.min.css?version={$VERSION}"   rel="stylesheet" media="screen"/>
                <link href="css/bootstrap-icons.min.css?version={$VERSION}"             rel="stylesheet" media="screen"/>
                <link href="css/signIn.css?version={$VERSION}"                          rel="stylesheet" media="screen"/>

                <script src="js/jquery-3.2.0.min.js?version={$VERSION}"/>        
                <script src="js/bootstrap.bundle.min.js?version={$VERSION}"/>   
                <script src="js/signIn.js?version={$VERSION}"/>   

            </head>
            
            <body>
                <div class="container">
                    
                    <div class="card">
                        
                        <div class="card-header bg-primary text-white text-center h6 p-2">
                            <xsl:copy-of select="$PAGE_TITLE"/>
                        </div>
                        
                        <form action="{$BTN_SUBMIT}" name="{$FORM_NAME}" method="post" id="{$FORM_NAME}">
                            
                            <input type="hidden" name="action" value="Users.login"/>
                            <input type="hidden" name="step"   value="authenticate"/>
                            
                            <xsl:if test="$INVALID_SIGNIN = 'TRUE'">
                                <div class="alert alert-danger">
                                    <xsl:text>Invalid Sign In</xsl:text>
                                </div>
                            </xsl:if>
                            
                            <div class="form-group">
                                <div class="input-group">
                                    <span class="input-group-text">
                                        <i class="bi bi-person-fill" aria-hidden="true"></i>
                                    </span> 
                                    <input type="text" id="user_name" name="user_name" class="form-control form-control-sm" placeholder="Username" maxlength="128" autofocus="autofocus" autocomplete="no"/>
                                </div> 
                            </div>
                            
                            <div class="form-group">
                                <div class="input-group">
                                    <span class="input-group-text">
                                        <i class="bi bi-lock-fill" aria-hidden="true"></i>
                                    </span>
                                    <input id="user_password" name="user_password" type="password" class="form-control form-control-sm" placeholder="Password" maxlength="128"/>
                                </div> 
                            </div> 
                            
                        </form>

                        <div class="d-grid gap-2 col-11 mx-auto pb-3">
                            <button class="btn btn-primary btn-sm btnSignIn">Sign In</button>
                            <!--<a href="main.php?action=resetpassword" class="btn btn-secondary btn-sm btnForgot">Forgot Password</a>-->
                        </div>
                        
                    </div>
                    
                </div>
                
                <!-- Footer --> 

                <footer id="footer"> 

                    <div class="col text-center mt-3">
                        <small class="text-muted pb-0">Unauthorized Access is Prohibitted</small>
                    </div>
          
                </footer>
                
            </body>
            
        </html>
        
    </xsl:template>
    
</xsl:stylesheet>