<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>Eas-e-Library</title>
    <meta name="description" content="Eas-e-Library">
    <meta name="keywords" content="Eas-e-Library, Easy Library, e-library, Library, Library Management System, Online Library, Digital Library, Books">
    <link rel="stylesheet" type="text/css" href="/css/style.css">
</head>

<body>
    <header>
        <!--Nav-bar-->
        <h1 class="logo"><a href="/#home" class="brand-link">Eas-e-Library</a></h1>
        <input type="checkbox" id="nav-toggle" class="nav-toggle">
        <nav class="top-navbar">
            <ul class="menu">
                <li class="main-list"><a href="/#about"><label>About Us </label></a></li>
                <li class="main-list"><a href="/#contact"><label>Contact Us</label></a></li>
                <li class="main-list"><a href="/#location"><label>Location</label></a></li>
                <li class="main-list "><a href="/#modal" class="modal-trigger"><label>Sign in </label> </a></li>
            </ul>
        </nav>
        <label for="nav-toggle" class="nav-toggle-label">
		      <span></span>
		    </label>
    </header>


    <div class="signup-page">
        <section>
            <section class="modal-header">
                <h2 class="modal-title">
                    <div style="text-align: center;">Sign up</div>
                </h2>
            </section>
            <div class="form-container">
                <form action="staffsignup" method="POST">
                    <% if(typeof errors != 'undefined'){ %>
                        <div class="modal" id="modal" style="display: table;" onclick="document.getElementById('modal').style.display='none';">
                            <div class="modal-dialog">
                                <section class="modal-content">
                                    <section class="modal-header">
                                        <h2 class="modal-title">Error</h2>
                                        <a href="#" class="modal-close">&times;</a>
                                    </section>
                                    <div class="modal-body" style="font-size:xx-large; text-align: center;">
                                        <% errors.forEach(function(error){ %>
                                            <%= error.msg %>
                                                <%}); %>
                                    </div>
                                </section>
                            </div>
                        </div>
                        <%} %>
                            <div class="signin-input">
                                <span>Name: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="text" name="member_name" id="member_name" required="required" value="<%= typeof member_name!='undefined' ? member_name : '' %>"/></span>
                            </div>
                            <div class="signin-input">
                                <span>Email: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="text" name="member_email" id="member_email" required="required" value="<%= typeof member_email!='undefined' ? member_email : '' %>" /></span>
                            </div>
                            <div class="signin-input">
                                <span>Address: &nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="text" name="member_address" id="member_address" required="required" value="<%= typeof member_address!='undefined' ? member_address : '' %>" /></span>
                            </div>
                            <div class="signin-input gender-input" id="gender" name="gender">
                                <span>Gender:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="member_gender" id="member_gender" value="male">Male
                            <input type="radio" name="member_gender" id="member_gender" value="female">Female
                            <input type="radio" name="member_gender" id="member_gender" value="other" required>Other

                        </span>
                            </div>
                            <div class="signin-input">
                                <span>Choose Password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="password" name="member_passwd" id="member_passwd" required="required" placeholder="Choose strong one." value="<%= typeof member_passwd!='undefined' ? member_passwd : '' %>" /></span>
                            </div>
                            <div class="signin-input">
                                <span>Confirm Password:&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="password" name="member_passwd2" id="member_passwd2" required="required"  value="<%= typeof member_passwd2!='undefined' ? member_passwd2 : '' %>" /></span>
                            </div>
                            <div class="signin-input">
                                <span>Citizenship Number:&nbsp;
                            <input type="text" name="member_citizen_number" id="member_citizen_number" required="required" value="<%= typeof member_citizen_number!='undefined' ? member_citizen_number : '' %>" /></span>
                            </div>
                            <div class="signin-input">
                                <span>Citizenship:&nbsp;&nbsp;&nbsp;
                            <input type="file" name="member_citizenship" id="member_citizenship" required="required"  value="<%= typeof member_citizenship!='undefined' ? member_citizenship : '' %>" /></span>
                            </div>
                            <div>
                                <p><input type="checkbox" name="accept-terms" id="new-accept-terms" required="required">I hereby accept the <a href="#" style="display: inline;">terms and conditions</a> of the library.</p>
                            </div>
                            <div style="text-align: center;">
                                <input type="submit" value="Submit" class="submit-signin" id="new-submit">
                            </div>
                </form>
            </div>
        </section>
        <hr>
        <p style="text-align:center;">Already have an account? <a href="/staffs/staffsignin" style="display: inline;">Sign In </a>instead.</p>
    </div>

</body>

</html>