<!--

     Licensed to the Apache Software Foundation (ASF) under one or more
     contributor license agreements.  See the NOTICE file distributed with
     this work for additional information regarding copyright ownership.
     The ASF licenses this file to You under the Apache License, Version 2.0
     (the "License"); you may not use this file except in compliance with
     the License.  You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.

-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-type" content="text/html" charset="UTF-8">
<title>Persons archive</title>
</head>
<wicket:head>

<style>
    a {
        text-decoration: none !important;
        cursor: pointer;
    }
</style>

</wicket:head>
<body style="padding: 1.25em 1.45em 1.25em 1.55em">
    <wicket:extend>
        <h1>Persons archive</h1>
        <p style="font-weight: bold;">Simple REST application to create,
            delete and display instances of persons (see class PersonPojo).</p>
        
        <button class="btn btn-primary" id="openNewUser" data-toggle="modal"
            data-target="#dialog-form">Add a person</button>
        <br />
        <br />

        <table class="table" id="personsTable">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Email</th>
                    <th>Password</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <tr>

                </tr>
            </tbody>
        </table>

        <div id="dialog-form" class="modal fade" tabindex="-1" role="dialog"
            title="Create new person">
            <div class="modal-dialog" role="document">
                <form>
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                            <h4 class="modal-title">Create new person</h4>
                        </div>
                        <div class="modal-body">
                            <div style="display: table;">
                                <div style="display: table-row;">
                                    <div style="display: table-cell;">
                                        <label for="name">Name</label>
                                    </div>
                                    <div style="display: table-cell;">
                                        <input type="text" name="name" id="name"
                                            class="text ui-widget-content ui-corner-all" />
                                    </div>
                                </div>
                                <div style="display: table-row;">
                                    <div style="display: table-cell;">
                                        <label for="email">Email</label> <span style="color: red">*</span>
                                    </div>
                                    <div style="display: table-cell;">
                                        <input type="text" name="email" id="email" value=""
                                            class="text ui-widget-content ui-corner-all" />
                                    </div>
                                </div>
                                <div style="display: table-row;">
                                    <div style="display: table-cell; padding-right: 5px">
                                        <label for="password">Password</label>
                                    </div>
                                    <div style="display: table-cell;">
                                        <input type="password" name="password" id="password" value=""
                                            class="text ui-widget-content ui-corner-all" />
                                    </div>
                                </div>
                                <div style="color: red">*The email will be validated.</div>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                data-dismiss="modal">Close</button>
                            <button type="button" class="btn btn-primary"
                                onclick="saveNewPerson()">Save</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </wicket:extend>
</body>
</html>