<% include ../partials/header.ejs %>

    <!-- MAIN CONTENT -->
    <div class="container">
      <div class="row">
        <div class="col-md-offset-3 col-md-6">
          <h1><%= title %></h1>
            <form class="form" method="post">
              <div class="form-group">
                <label for="TitleTextField">Title</label>
                <input type="text" class="form-control" id="TitleTextField"
                placeholder="Survey Title" name="title" required>
              </div>
              <div class="form-group">
                <label for="OwnerTextField">Owner</label>
                <input type="text" class="form-control" id="OwnerTextField"
                placeholder="Survey Owner" name="owner" value="<%= displayName %>" disabled required>
              </div>
              <div class="form-group">
                <label for="QuestionsTextArea">Questions</label>
                <textarea type="text" class="form-control"
                    id="QuestionsTextArea"
                    placeholder="Enter some questions, separated by commas"
                    name="questions" 
                    required>
                </textarea>
              </div>
              <div class="form-group">
                <label for="ActiveCheckBox">Active</label>
                <input type="checkbox" class="form-control" id="ActiveCheckBox"
                name="active" >
              </div>
              <div class="form-group">
                <label for="StartDatePicker">Start Date</label>
                <input type="date" class="form-control" id="StartDatePicker" name="startdate"
                  value="<%= moment().format('YYYY-MM-DD') %>" min="2020-01-01" max="2099-12-31" required>
              </div>
              <div class="form-group">
                <label for="EndDatePicker">End Date</label>
                <input type="date" class="form-control" id="EndDatePicker" name="enddate"
                  value="<%= moment().format('YYYY-MM-DD') %>" min="2020-01-01" max="2099-12-31" required>
              </div>
              <button type="submit" class="btn btn-primary"><i class="fa fa-check-square-o"></i> Submit</button>
              <a href="/surveys" class="btn btn-warning"><i class="fa fa-undo"></i> Cancel</a>
            </form>
        </div>
      </div>
    </div>

<% include ../partials/footer.ejs %>
