Add {{root}} to form actions

This commit is contained in:
Drew DeVault 2015-09-06 17:59:29 -04:00
parent da0dd066d3
commit 1b14980dc5
8 changed files with 19 additions and 8 deletions

View File

@ -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.

View File

@ -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

View File

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

View File

@ -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>

View File

@ -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" />

View File

@ -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>

View File

@ -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>

View File

@ -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")}}" />