<!DOCTYPE html>
<html lang="en">
<head>
  <%- include ('../partials/head') -%>
  <script type="text/javascript" src="/src/js/utilitiesContact.js"></script>
  <script type="text/javascript" src="/src/js/loginUtilities.js"></script>
  <link rel="stylesheet" type="text/css" href="/src/css/generalStyle.css">
</head>
<body>

<header>
  <%if(user=='Usuari'){%>
      <%- include ('../partials/header') -%>
  <%} else {%>
      <%- include ('../partials/loggedUserHeader') -%>
  <%}%>
</header>

<main>
  <div class="jumbotron">
    <h1 class="text-center"><%= strings['contacte']['formulari'][lang] %></h1>
    <div class="container">
      <br>
      <div class="row">
        <div class="col"></div>
        <div class="col-8">
          <div id="alertInfo"></div>
          <form id="contactForm" method="POST" action="/sendContact">
            <div class="row">
              <div class="col mb-2">
                <label for="inputName" class="input-label"><%= strings['general']['nom'][lang] %></label>
                <input type="text" id="inputName" class="form-control" name="name" maxlength="50" required>
              </div>
              <div class="col mb-2">
                <label for="inputSurname" class="input-label"><%= strings['general']['cognom'][lang] %></label>
                <input type="text" id="inputSurname" class="form-control" name="surname" maxlength="50" required>
              </div>
            </div>
            <div class="mb-2">
              <label for="inputMail" class="input-label"><%= strings['general']['correu'][lang] %></label>
              <input type="email" id="inputMail" class="form-control" name="mail" maxlength="100" required>
            </div>
            <div class="mb-2">
              <label for="inputDesc" class="input-label"><%= strings['contacte']['consulta'][lang] %></label>
              <textarea id="inputDesc" rows="5" class="form-control" name="desc" required></textarea>
            </div>
            <div class="mb-3">
              <button  class="btn btn-success float-right"><%= strings['afegir']['envia'][lang] %></button>
            </div>
          </form>
        </div>
        <div class="col"></div>
      </div>
    </div>
  <div>
</main>
<%- include ('../partials/footer') -%>
</body>
</html>
