flo-greeting-cards/views/write.ejs

61 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% include partials/header.ejs %>
<div class="container">
<div class="form-header">
<% if (Object.keys(errors).length === 0) { %>
<h2>Please write a review about your experience here:</h2>
<% } else { %>
<h2 class="errors-heading">Oops, please correct the following:</h2>
<ul class="errors-list">
<% Object.values(errors).forEach(error => { %>
<li><%= error.msg %></li>
<% }) %>
</ul>
<% } %>
</div>
<% if(data.card_id) { %>
<div class="form-group" id="pdfignore">
<label for="_to">To: </label>
<input type="text" name="_to" class="form-control stick_text" id="_to" placeholder="Name of the receiver">
<label for="_from">From: </label>
<input type="text" name="_from" id="_from" class="form-control stick_text" placeholder="Name of the sender">
<label for="_bdata">Your message:</label>
<textarea id="_bdata" class="form-control stick_text" placeholder="Your message here"name="_bdata"></textarea>
<input type="hidden" id="_cardid" name="_cardid" value="<%=data.card_id%>" >
<br>
<button type="submit" class="btn btn-primary" id="bc-btn">Submit</button>
</div>
<div id="pdfcontent">
<div class="card mb-3 text-center">
<div class="card-body">
<h5 class="card-title">Dear <span id="span_from">Alice</span></h5>
<p class="card-text"><i>Happy birthday to you.</i></p>
<p class="card-text"><small class="text-muted">From <span id="span_to">Bob</span></small></p>
</div>
<div class="text-center">
<img src="/images/<%=data.card_id%>.jpg" alt="Card image cap">
</div>
<div class="card-body">
<p class="card-text"><span id="span_user_msg">Youre Beautiful Inside and Out! Hope your Birthday is a Spectacular One, You Deserve It! Happy Birthday!</span></p>
<p class="card-text">
<img src="/images/FLO_teal.png" alt="FLO logo" width="50" height="50">
<p><small class="text-muted">--- FLO Blockchian---</small></p>
</p>
</div>
</div>
</div>
<%}%>
</div> <!-- container-->
<% include partials/footer.ejs %>