Add {{root}} to form actions

master
Drew DeVault 9 years ago
parent da0dd066d3
commit 1b14980dc5
  1. 2
      README.md
  2. 11
      config.ini.example
  3. 4
      requirements.txt
  4. 2
      templates/admin.html
  5. 2
      templates/index.html
  6. 2
      templates/login.html
  7. 2
      templates/panel.html
  8. 2
      templates/setup.html

@ -90,7 +90,7 @@ host this on).
Copy config.ini.example to config.ini and edit it to your liking. Then, you can Copy config.ini.example to config.ini and edit it to your liking. Then, you can
run this command to try the site in development mode: run this command to try the site in development mode:
python app.py python3 app.py
[Click here](http://localhost:5000) to visit your donation site and further [Click here](http://localhost:5000) to visit your donation site and further
instructions will be provided there. instructions will be provided there.

@ -1,5 +1,8 @@
[dev] [dev]
# Change this to the actual location of your site # Change this to the actual location of your site
# You can include a path in the domain if it's a subdirectory
# i.e. domain=drewdevault.com/donate
# omit the trailing slash
protocol=http protocol=http
domain=localhost:5000 domain=localhost:5000
# Change this value to something random and secret # Change this value to something random and secret
@ -17,13 +20,17 @@ smtp-password=password
smtp-from=donate@you.com smtp-from=donate@you.com
# Your information # Your information
your_name=Joe Bloe your-name=Joe Bloe
your_email=joe@bloe.com your-email=joe@bloe.com
# ^ you should have a gravatar that works with this email # ^ you should have a gravatar that works with this email
# SQL connection string # SQL connection string
connection-string=postgresql://postgres@localhost/fosspay connection-string=postgresql://postgres@localhost/fosspay
# Stripe API info: https://dashboard.stripe.com/account/apikeys
stripe-secret=
stripe-publish=
# Click here first: https://dashboard.stripe.com/account/bitcoin/enable # Click here first: https://dashboard.stripe.com/account/bitcoin/enable
enable-bitcoin=no enable-bitcoin=no

@ -2,5 +2,9 @@ stripe
Flask Flask
Jinja2 Jinja2
Flask-Misaka Flask-Misaka
Flask-Login
psycopg2
bcrypt
gunicorn gunicorn
sqlalchemy-utils sqlalchemy-utils
pystache

@ -80,7 +80,7 @@
<div class="col-md-6 well"> <div class="col-md-6 well">
<h4>Add Project</h4> <h4>Add Project</h4>
<p>Donors will not be given a choice of project unless you have at least 2.</p> <p>Donors will not be given a choice of project unless you have at least 2.</p>
<form method="POST" action="create-project"> <form method="POST" action="{{root}}/create-project">
<div class="form-group"> <div class="form-group">
<input class="form-control" type="text" placeholder="Project name" name="name" /> <input class="form-control" type="text" placeholder="Project name" name="name" />
</div> </div>

@ -35,7 +35,7 @@ window.email = "{{user.email}}";
</noscript> </noscript>
<div class="container text-center hidden" id="thanks"> <div class="container text-center hidden" id="thanks">
{% include "post-donation-message.html" %} {% include "post-donation-message.html" %}
<form id="new-donor-password" class="hidden" action="password-reset" method="POST"> <form id="new-donor-password" class="hidden" action="{{root}}/password-reset" method="POST">
<p>Set a password now if you want to manage your donations later:</p> <p>Set a password now if you want to manage your donations later:</p>
<input type="password" placeholder="Password" name="password" /> <input type="password" placeholder="Password" name="password" />
<input type="hidden" name="token" id="reset-token" /> <input type="hidden" name="token" id="reset-token" />

@ -16,7 +16,7 @@
</p> </p>
</div> </div>
{% endif %} {% endif %}
<form action="login" method="POST"> <form action="{{root}}/login" method="POST">
<div class="form-group"> <div class="form-group">
<input class="form-control" type="text" name="email" placeholder="your@email.com" /> <input class="form-control" type="text" name="email" placeholder="your@email.com" />
</div> </div>

@ -25,7 +25,7 @@
{% for donation in recurring(user) %} {% for donation in recurring(user) %}
<tr> <tr>
<td> <td>
<form method="DELETE" action="cancel/{{ donation.id }}"> <form method="DELETE" action="{{root}}/cancel/{{ donation.id }}">
<button type="submit" class="btn btn-danger btn-sm">Cancel</button> <button type="submit" class="btn btn-danger btn-sm">Cancel</button>
</form> </form>
</td> </td>

@ -59,7 +59,7 @@
<h2>Admin Account</h2> <h2>Admin Account</h2>
<p>Enter your details for the admin account:</p> <p>Enter your details for the admin account:</p>
<form class="form" action="setup" method="POST"> <form class="form" action="{{root}}/setup" method="POST">
<div class="form-group"> <div class="form-group">
<input type="text" class="form-control" name="email" <input type="text" class="form-control" name="email"
placeholder="Email" value="{{_cfg("your-email")}}" /> placeholder="Email" value="{{_cfg("your-email")}}" />

Loading…
Cancel
Save