Untitled

mail@pastecode.io avatar
unknown
plain_text
24 days ago
4.2 kB
0
Indexable
Never
<!DOCTYPE html>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
    integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
    integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
    crossorigin="anonymous"></script>
<html>
    <body style=" width:75%; margin:auto;">
    <nav class="navbar navbar-expand-lg bg-body-tertiary">
        <div class="container-fluid">
            <a class="navbar-brand" href="/">
                <h6 class="display-6">pollvote</h6>
            </a>
            <div id="navbarSupportedContent" style="margin-right: 0%;">
                <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                    <li class="nav-item">
                        <a class="nav-link active" aria-current="page" href="/add_candidates">Current Elections</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/about">About</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/results">Results</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    &nbsp;
    <div class="card" style="width: 90%; margin: auto; padding: 2%;">
        <div class="card-header">
            Admin Page |
            Add Positions and Candidates
        </div>
        <form action="/add_candidates">
            <div class="input-group mb-2">
                <span class="input-group-text">Position</span>
                <input class="form-control" type="text" id="positions" name="positions">
            </div>
         
            <div class="form-group col-md-6">
                <label for="number_candidate">No of Candidates:</label>
                <input type="number" id="number_candidate" name="number_candidate" min="0" step="1" pattern="\d+">
            </div>
            
            {% for j in range(10) %}
                <div class="input-group mb-2">
                    <span class="input-group-text">Candidate{{j+1}} Name </span>
                    <input class="form-control" type="text" id="candidate_name_{{ j }}" name="candidate_name_{{ j }}">   
                </div>
            {% endfor %}
            <div class="input-group mb-2">
                <span class="input-group-text">Brief </span>
                <input class="form-control" type="text" id="prospectus" name="prospectus">   
            </div>


            
            <div class="input-group mb-2">
                <span class="input-group-text">Graduation Year</span>
                <select class="form-select" name="graduationyear" aria-label="graduationyear">
                    <option selected>2025</option>
                    <option>2026</option>
                    <option>2027</option>
                    <option>2028</option>
                </select>

            </div>
            <div class="col-8">
                
                <button type="submit" class="btn btn-primary">ADD CANDIDATE</button>
            </div>
        </form>
    </div>




    &nbsp;

    <div class="card" style="width: 90%; margin: auto; padding: 2%">
        <div class="card-header">
            Existing Candidates
        </div>
        <table class="table">
            <thead>
                <tr>
                    <th scope="col">Position</th>
                    <th scope="col">Candidate</th>
                    <th scope="col">Graduation Year</th>
                    <th scope="col">Manifesto</th>
                </tr>
            </thead>
            <tbody>
                {% for details in all_candidates %}
                <tr>
                    <td>{{ details[0] }}</td>
                    <td>{{ details[1] }} </td>
                    <td>{{ details[3] }}</td>
                    <td>{{ details[2] }}</td>
                </tr>
                {% endfor %}
            </tbody>

        </table>
    </div>
    
    </body>
    </html>
Leave a Comment