Guest User

Untitled

a guest
Nov 6th, 2024
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.20 KB | None | 0 0
  1. {% extends "layout.html" %}
  2.  
  3. {% block title %} {{ title }} {% endblock title %}
  4.  
  5. <!-- render flask wtf forms with bootstrap -->
  6. {% from "_render_form.html" import render_form %}
  7.  
  8. {% block content %}
  9. <!-- modify for donations   -->
  10.  
  11.  
  12. <div class="container-fluid">
  13.     <div class="row">
  14.          <!--
  15.          validate makes sure you have the correct route most of the time you can just leave it blank.
  16.         -->
  17.         <form validate="" id="login" method="POST">
  18.             <!--
  19.             ms-auto setting the left and right margins of the element to auto
  20.             text-center centers the elements with text
  21.             -->
  22.             <div class="col-lg-5 card text-white bg-dark rounded mx-auto mt-5">
  23.                 <div class="card-body">
  24.                     <h5 class="card-title">Please Donate</h5>
  25.                     <!-- Make the secret key work -->
  26.                     {{ form.csrf_token }}
  27.                         <!-- email form function -->
  28.                         {{ render_form(form.email, placeholder=form.email.label.text) }}
  29.                         <!-- donation counter form -->
  30.                         <div class="form-group mb-3">
  31.                             <label for="exampleInputDonation1" class="form-label"> Donate <span class="text-danger">*</span> </label>
  32.                             <input type="number" name="number" step=".01" min=.5 class="form-control" placeholder="Please Donate" value="{{ request.form['number'] }}" id="exampleInputDonation1">                      
  33.                             <!-- error from donation counter form -->
  34.                             {% if error %}
  35.                                 <p style="color: red;">{{ error }}</p>
  36.                             {% endif %}                            
  37.                         </div>
  38.                     <div class="d-flex justify-content-center align-items-center mb-3">
  39.                         <button type="submit" class="btn btn-success btn-lg"> Please Donate</button>
  40.                     </div>  
  41.                 </div>    
  42.  
  43.                 </div>
  44.             </div> <!--col div-->
  45.         </form>
  46.     </div> <!--row div-->            
  47. </div>
  48.  
  49.  
  50.  
  51. {% endblock content %}
  52.  
Advertisement
Add Comment
Please, Sign In to add comment