<!DOCTYPE html>
<html>
<%- include('../includes/head.ejs') %>
<!-- include another file's content -->

<body>
  <%- include('../includes/containers-start.ejs') %>
  <%- include('../includes/navbar.ejs') %>
  <div class="intros"><%= pageIntro %></div>
  <div id='em-signup-form-wrap'>
    <div id='em-signup-form'>
      <h2>Enter Details:</h2>
      <form id="prospect-form" onsubmit="refineInputs()" action="/subs" method="POST">
        <label for="name">Name:</label>
        <input type="text" name="name" placeholder="Name*" required="required" pattern="[a-zA-Z ]+"
          oninvalid="setCustomValidity('Invalid Name')" oninput="setCustomValidity('')">
        <!-- middleware will call req.body.name -->
        <label for="email">Email Address:</label>
        <input type="text" name="email" placeholder="Email*" required="required"
          pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" oninvalid="setCustomValidity('Invalid Email')"
          oninput="setCustomValidity('')">
        <input type="hidden" name="tag" value="indexForm">
        <button type="submit" class='btn-std'>Add Subscriber</button>
      </form>
      <script src="/js/refine-form-inputs.js"></script>
    </div>
  </div>
  <%- include('../includes/containers-end.ejs') %>
</body>

</html>