Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add missing template for demo users

Roland Geider2575146ad51c
diff --git a/manager/templates/user/demo.html b/manager/templates/user/demo.html
new file mode 100644
index 000000000..d484fa34d
--- /dev/null
+++ b/manager/templates/user/demo.html
@@ -0,0 +1,51 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load staticfiles %}
+{% load manager_extras %}
+
+
+{% block title %}{% trans "Demo account" %}{% endblock %}
+
+{% block content %}
+<h2>{% trans "Demo account" %}</h2>
+
+<p>{% blocktrans %}
+Create a temporary user by filling in the form below.
+{% endblocktrans %}</p>
+
+<p>{% blocktrans %}
+You are welcome to use this before registering,
+what you can do and see with this temporary user is exactly the same a regular
+user would (create PDFs, enter data, etc.). The only difference is that temporary
+users get a set of sample data (workout, random weight log, etc.) to get a better
+feeling about what this site can do and, obviously, are deleted after a while.
+{% endblocktrans %}</p>
+
+{% if user.is_authenticated %}
+<p><strong>{% blocktrans %}It seems you are already logged in. This won't be very
+useful for you but hey, who am I to judge!</strong>{% endblocktrans %}</p>
+{% endif %}
+
+
+<form action="{{form_action}}"
+ method="post"
+ class="ym-form">
+{% csrf_token %}
+{{ form.non_field_errors }}
+<table>
+ {% for current_field in form %}
+ {% yaml_form_field current_field %}
+ {% endfor %}
+ <tr>
+ <td colspan="2">
+ <input type="submit" value="{% trans 'Create demo user' %}" id="form-save">
+ </td>
+ </tr>
+</table>
+</form>
+{% endblock %}
+
+{% block sidebar %}
+<h3>{% trans "Don't want to register?" %}</h3>
+<p>{% trans "No problem, simply download the software and run it locally" %}</p>
+{% endblock %}