<%- include('./partials/header') %>

<div class="container create-product-wrapper">
    <h3> Create New Product </h3>
    <hr>

    <% if(data && data?.status !== 'success') { %>
        <div class="feedback">
            <%= data.message %>
        </div>
    <% } %>

    <form action="/processform" method="POST" class="form">
        <div class="form-group">
            <label for="prod_name">Product Name: </label>
            <input type="text" name="prod_name" id="prod_name" class="form-control">
        </div>

        <div class="form-group">
            <label for="prod_desc">Product Description: </label>
            <textarea name="prod_desc" id="prod_desc" class="form-control"></textarea>
        </div>

        <div class="form-group">
            <label for="prod_price">Product Price: </label>
            <input type="number" min="0.01" name="prod_price" id="prod_price" class="form-control">
        </div>

        <div class="form-group">
            <input type="submit" name="btn_submit" id="btn_submit" class="btn btn-primary" value="Add Product">
        </div>
    </form>
</div>

<%- include('./partials/footer') %>