Skip to content

Commit

Permalink
Add donations info alert; improve message and button spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
philipbelesky committed Feb 3, 2017
1 parent 9398e30 commit 3a03e29
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 59 deletions.
105 changes: 58 additions & 47 deletions tabbycat/tournaments/templates/blank_site_start.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,62 +8,73 @@

{% block content %}

<div class="panel panel-default">
<div class="panel-body">
<div class="alert alert-info">
<p>
Tabbycat is free to use for non-profit and non-fundraising tournaments
(although donations are encouraged). If your tournament is run for profit
or for fundraising, please note that there is a
<a href="{% url 'donations' %}">required payment</a>. For more details,
see the <a href="http://tabbycat.readthedocs.io/en/stable/about/licence.html">
Tabbycat licence agreement</a>.
</p>
</div>

<h4>
{% blocktrans trimmed %}
Welcome to your new Tabbycat installation!
{% endblocktrans %}
</h4>
<p>
{% blocktrans trimmed %}
To get started, you'll need to create the first user account. This account
is a "superuser" account: it will be able to edit anything on the site.
Therefore, you should use a strong password.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed %}
You can only create this account once, but if you like, you can change the
username and password after it's created, or add new superusers afterwards.
{% endblocktrans %}
</p>
<div class="panel panel-default">
<div class="panel-body">

<form action="." method="POST" class="form-horizontal">
{% csrf_token %}
<h4>
{% blocktrans trimmed %}
Welcome to your new Tabbycat installation!
{% endblocktrans %}
</h4>
<p>
{% blocktrans trimmed %}
To get started, you'll need to create the first user account. This account
is a "superuser" account: it will be able to edit anything on the site.
Therefore, you should use a strong password.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed %}
You can only create this account once, but if you like, you can change the
username and password after it's created, or add new superusers afterwards.
{% endblocktrans %}
</p>

{% if form.errors %}
<div class="alert alert-danger">
{% blocktrans trimmed %}
Whoops! There was an error with one or more fields.
{% endblocktrans %}
{{ form.non_field_errors }}
</div>
{% endif %}
<form action="." method="POST" class="form-horizontal">
{% csrf_token %}

{% for field in form %}
<div class="form-group">
<label for="{{ field.id_for_label }}" class="col-md-2 control-label">{{ field.label }}</label>
<div class="col-md-6">
{{ field|addcss:"form-control" }}
</div>
{% if field.errors %}
{{ field.errors }}
{% endif %}
</div>
{% endfor %}
{% if form.errors %}
<div class="alert alert-danger">
{% blocktrans trimmed %}
Whoops! There was an error with one or more fields.
{% endblocktrans %}
{{ form.non_field_errors }}
</div>
{% endif %}

{% for field in form %}
<div class="form-group">
<div class="col-md-offset-2 col-md-6 col-sm-4">
<button type="submit" class="btn btn-block btn-success form-control">
{% trans "Create Account" %}
</button>
<label for="{{ field.id_for_label }}" class="col-md-2 control-label">{{ field.label }}</label>
<div class="col-md-6">
{{ field|addcss:"form-control" }}
</div>
{% if field.errors %}
{{ field.errors }}
{% endif %}
</div>
{% endfor %}

<div class="form-group">
<div class="col-md-offset-2 col-md-6 col-sm-4">
<button type="submit" class="btn btn-block btn-success form-control">
{% trans "Create Account" %}
</button>
</div>
</div>

</form>
</div>
</form>
</div>
</div>

{% endblock %}
21 changes: 10 additions & 11 deletions tabbycat/tournaments/templates/create_tournament.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@

<div class="alert alert-info">
<p>
As per <a href="https://github.com/czlee/tabbycat/blob/master/LICENSE.rst">
its license</a> Tabbycat is free to use (although donations are encouraged)
for <strong>non-profit</strong> and <strong>non-fundraising</strong>
tournaments. If your tournament is run for profit or for fundraising note
that there is a <a href="{% url 'donations' %}">required payment</a>.
Tabbycat is free to use for non-profit and non-fundraising tournaments
(although donations are encouraged). If your tournament is run for profit
or for fundraising, please note that there is a
<a href="{% url 'donations' %}">required payment</a>. For more details,
see the <a href="http://tabbycat.readthedocs.io/en/stable/about/licence.html">
Tabbycat licence agreement</a>.
</p>
</div>

Expand Down Expand Up @@ -65,23 +66,21 @@

<div class="panel panel-default">
<div class="panel-body">
<strong>Just trying out Tabbycat?</strong>
<p><strong>Just trying out Tabbycat?</strong>
If you are just learning or playing around with Tabbycat it's easiest
to create a 'demo' tournament that is prepopulated with a fake (but typical)
set of teams, adjudicators, venues, and the like.
This demo tournament can then be easily deleted later on.
</div>
<div class="panel-body">
This demo tournament can then be easily deleted later on.</p>
<div class="row">
<div class="col-md-6">
<div class="col-sm-6">
<form action="{% url 'load-demo' %}" method="POST">
<input type="hidden" name="source" value="demo_simple">
<button type="submit" class="btn btn-primary btn-block">
{% trans "Load Demo Data (for a small/simple tournament)" %}
</button>
</form>
</div>
<div class="col-md-6">
<div class="col-sm-6">
<form action="{% url 'load-demo' %}" method="POST">
<input type="hidden" name="source" value="demo">
<button type="submit" class="btn btn-primary btn-block">
Expand Down
3 changes: 2 additions & 1 deletion tabbycat/tournaments/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ def post(self, request, *args, **kwargs):
in the Edit Database Area before creating another demo.")
else:
management.call_command(importtournament.Command(), source)
messages.success(self.request, "Created new demo tournament")
messages.success(self.request, "Created new demo tournament. You \
can access it below.")
return redirect('tabbycat-index')


Expand Down

0 comments on commit 3a03e29

Please sign in to comment.