Remove references to / and polish some things

This commit is contained in:
Drew DeVault 2015-09-06 16:14:52 -04:00
parent 6a6cddc5b4
commit 010b2d666a
6 changed files with 11 additions and 5 deletions

View File

@ -93,7 +93,7 @@ def login():
login_user(user)
if user.admin:
return redirect("/admin")
return redirect("/")
return redirect("/panel")
@html.route("/logout")
@loginrequired

View File

@ -68,6 +68,7 @@
var handler = StripeCheckout.configure({
name: your_name,
email: window.email,
key: window.stripe_key,
image: window.avatar,
locale: 'auto',

View File

@ -80,7 +80,7 @@
<div class="col-md-6 well">
<h4>Add Project</h4>
<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="create-project">
<div class="form-group">
<input class="form-control" type="text" placeholder="Project name" name="name" />
</div>

View File

@ -7,6 +7,9 @@ window.your_name = "{{ _cfg("your-name") }}";
window.bitcoin = "{{ _cfg("enable-bitcoin") }}" === "yes";
window.default_amount = {{ _cfg("default-amount") }};
window.default_type = "{{ _cfg("default-type") }}";
{% if user %}
window.email = "{{user.email}}";
{% endif %}
</script>
<script src="//checkout.stripe.com/checkout.js"></script>
<script src="static/index.js"></script>
@ -32,7 +35,7 @@ window.default_type = "{{ _cfg("default-type") }}";
</noscript>
<div class="container text-center hidden" id="thanks">
{% 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="password-reset" method="POST">
<p>Set a password now if you want to manage your donations later:</p>
<input type="password" placeholder="Password" name="password" />
<input type="hidden" name="token" id="reset-token" />
@ -138,12 +141,14 @@ window.default_type = "{{ _cfg("default-type") }}";
</div>
<hr />
<div class="container text-center">
{% if not user %}
<p>
<small class="text-muted">
Been here before? <a href="login">Log in</a> to view your donation
history, edit recurring donations, and so on.
</small>
</p>
{% endif %}
<p>
<small class="text-muted">
Powered by <a href="https://github.com/SirCmpwn/fosspay">fosspay</a>.

View File

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

View File

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