<% include ../partials/header %>

<!--NAVIGATION BAR FOR ADMIN-->
<% include ../partials/userNav %>
    
<!--SHOW project EDIT FORM-->
<div class="container my-5">
  <div class="row">
    <div class="col-md-6 offset-md-3">
      <div class="card transparent-container">
        <div class="card-header text-center login-card-header">
          <h4 class="h3-login login-h4">Update Projects</h4>
          <hr class="hr-login">
       <form action="/user/1/project/update/<%=project._id%>" method="POST">
          <div class="form-group">
            <label for="name" class="form-control-label">Edit Title</label>
            <input name="project[name]" type="text" class="form-control" value="<%=project.name%>">
          </div>

          <div class="form-group">
            <label for="mentor" class="form-control-label">Edit mentor</label>
            <input name="project[mentor]" type="text" class="form-control" value="<%=project.mentor%>">
          </div>
          
          <div class="form-group">
            <label for="domain" class="form-control-label">Edit domain</label>
            <input name="project[domain]" type="text" class="form-control" value="<%=project.domain%>">
          </div>
          <div class="form-group">
            <label for="period" class="form-control-label">Edit domain</label>
            <input name="project[period]" type="number" class="form-control" value="<%=project.period%>">
          </div>
          <div class="form-group">
            <label for="description">Edit Description</label>
            <textarea name="project[description]" cols="30" rows="10" class="form-control"><%=project.description%></textarea>
          </div>
          
          <button class="addc-btn">Update</button>
        </form>
    </div>
  </div>
</div>
</div>
</div>

<script src="https://cdn.ckeditor.com/4.9.2/standard/ckeditor.js"></script>
<script>
  CKEDITOR.replace('project[description]');
</script>
<% include ../partials/footer %>