<% include ../partials/header %>

<div class="container">
  <div class="row">
    <div style="width: 30%; min-width: 260px; margin: 40px auto; box-shadow: 0px 0px 5px #cccccc; padding: 20px;">
      <form action="/stores/<%= store._id %>/?_method=PUT" method="POST">
        <legend style="text-align: center; padding: 10px 20px 0px 20px; font-size: 2em;  line-height: 1; color: gray"><i class="fas fa-2x fa-hand-holding-usd"></i></legend>
        <legend style="text-align: center; padding: 10px 20px 20px 20px; font-size: 2em;  line-height: 1;">Επεξεργασία πρατηρίου</legend>
        <div class="form-group">
          <label for="brand">Εταιρεία</label>
          <select class="form-control" name="brand">
            <option value="'AVIN'">AVIN</option>
            <option value="'bp'">bp</option>
            <option value="'Coral'">Coral</option>
            <option value="'Coral Gas'">Coral GAS</option>
            <option value="'EKO'">EKO</option>
            <option value="'ELIN'">ELIN</option>
            <option value="'ETEKA'">ETEKA</option>
            <option value="'CYCLON'">CYCLON</option>
            <option value="'melco oil'">melco oil</option>
            <option value="'revoil'">revoil</option>
            <option value="'Shell'">Shell</option>
          </select>
        </div>
        <div class="form-group">
          <label for="name">Επωνυμία</label>
          <input class="form-control" type="text" name="name" value="<%= store.name %>" placeholder="Δικαιούχος">
        </div>
        <div class="form-group">
          <label for="location">Διεύθυνση</label>
          <input class="form-control" type="text" name="location" value="<%= store.location %>" placeholder="">
        </div>
        <div class="form-group">
          <label for="phone">Τηλέφωνο</label>
          <input class="form-control" type="text" name="phone" value="<%= store.phone %>" placeholder="">
        </div>
        <div class="form-group">
          <label for="email">Email</label>
          <input class="form-control" type="email" name="email" value="<%= store.email %>" placeholder="">
        </div>
        <div class="form-group">
          <button class="btn btn-large btn-primary btn-block" type="submit" name="button">Ενημέρωση</button> <!-- BE CAREFUL - type="submit" -->
        </div>
      </form>
      <a href="javascript:history.go(-1)">Πίσω</a>
    </div>
  </div>
</div>

<script type="text/javascript">
  $("select").val("'<%= store.brand %>'");
</script>

<% include ../partials/footer %>
