<div class="modal-header">
    <h5 class="modal-title" id="exampleModalLabel">#<%= team.id %> -
        <%= team.Name %>
    </h5>
    <button type="button" class="close" data-dismiss="modal"
            aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>
<form method="post" class="editTeam">
    <div class="modal-body">
        <input type="hidden" name="id" value="<%= team.id %>">
        <div class="form-group">
            <label for="directorate">Directorate</label>
            <select class="custom-select form-control" name="directorate" id="directorate"
                    required>
                <option class="hidden" selected disabled value="">Select The Directorate</option>
                <% directorates.forEach(directorate =>{ %>
                <option <% if(directorate.id === team.Directorate.id){ %>selected <%}%> value="<%=directorate.id%>"><%=directorate.Name%></option>
                <%}) %>
            </select>
        </div>
        <div class="form-group">
            <label for="Name">Name</label>
            <input type="text" id="Name" class="form-control" name="name" value="<%= team.Name %>">
        </div>
        <div class="form-group">
            <label for="dname">Display Name</label>
            <input type="text" id="dname" class="form-control" name="dname" value="<%= team.DisplayName %>" required>
        </div>
        <div class="form-group">
            <label for="description">Description</label>
            <textarea class="custom-control-input" type="checkbox" name="description" id="description"><%= team.Description %></textarea>
        </div>
        <div class="custom-control custom-checkbox">
            <input class="custom-control-input" type="checkbox" name="visible" id="visible" value="visible"
                   <% if (team.isVisible){ %>checked
                    <% } %>
            >
            <label for="visible" class="custom-control-label">Accepts Recruitment</label>
        </div>

    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-secondary"
                data-dismiss="modal">Cancel
        </button>
        <input type="submit" value="Save"
               class="btn btn-outline-success">
    </div>
</form>