source: OpenWorkouts-current/ow/templates/add_manual_workout.pt @ 5ec3a0b

currentfeature/docs
Last change on this file since 5ec3a0b was 5ec3a0b, checked in by borja <borja@…>, 5 years ago

Imported sources from the old python2-only repository:

  • Modified the code so it is python 3.6 compatible
  • Fixed deprecation warnings, pyramid 1.10.x supported now
  • Fixed deprecation warnings about some libraries, like pyramid-simpleform
  • Added pytest-pycodestyle and pytest-flakes for automatic checks on the source code files when running tests.
  • Added default pytest.ini setup to enforce some default parameters when running tests.
  • Cleaned up the code a bit, catched up with tests coverage.
  • Property mode set to 100644
File size: 3.0 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml"
2      xml:lang="en"
3      xmlns:tal="http://xml.zope.org/namespaces/tal"
4      xmlns:metal="http://xml.zope.org/namespaces/metal"
5      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6      i18n:domain="OpenWorkouts"
7      metal:use-macro="load: base.pt"
8      tal:attributes="lang request.locale_name">
9
10  <metal:head-title metal:fill-slot="head-title">
11    <tal:t i18n:translate="">Add workout manually</tal:t>
12  </metal:head-title>
13
14  <metal:title metal:fill-slot="title">
15    <tal:t i18n:translate="">Add workout Manually</tal:t>
16  </metal:title>
17
18  <metal:css metal:fill-slot="css">
19    <link rel="stylesheet"
20          href="${request.static_url('ow:static/components/EasyAutocomplete/easy-autocomplete.min.css')}" />
21  </metal:css>
22
23  <metal:content metal:fill-slot="content">
24    <div id="add_workout">
25      ${form.begin()}
26      ${form.csrf_token()}
27
28      <fieldset>
29        ${form.errorlist('sport')}
30        <label for="sport" i18n:translate="">Sport/Activity:</label>
31        ${form.text('sport')}
32        ${form.errorlist('title')}
33        <label for="title" i18n:translate="">Title:</label>
34        ${form.text('title')}
35      </fieldset>
36
37      <fieldset>
38        ${form.errorlist('start_date')}
39        <label for="start_date" i18n:translate="">Start date (dd/mm/yyyy):
40        </label>
41        ${form.text('start_date', size=10)}
42        ${form.errorlist('start_time')}
43        <label for="start_time" i18n:translate="">Start time (HH:MM):</label>
44        ${form.text('start_time', size=5)}
45
46        <br /> <hr />  <!-- o_O! -->
47
48        ${form.errorlist('duration_hours')}
49        <label for="duration_hours" i18n:translate="">Hours:</label>
50        ${form.text('duration_hours', size=3)}
51
52        ${form.errorlist('duration_minutes')}
53        <label for="duration_minutes" i18n:translate="">Minutes:</label>
54        ${form.text('duration_minutes', size=3)}
55
56        ${form.errorlist('duration_seconds')}
57        <label for="duration_seconds" i18n:translate="">Seconds:</label>
58        ${form.text('duration_seconds', size=3)}
59
60        ${form.errorlist('distance')}
61        <label for="distance" i18n:translate="">Distance (Km):</label>
62        ${form.text('distance', size=4)}
63      </fieldset>
64
65      <fieldset>
66        ${form.errorlist('notes')}
67        <label for="notes" i18n:translate="">Notes:</label>
68        ${form.textarea('notes', rows=10, cols=50)}
69      </fieldset>
70
71      ${form.submit("submit", "Save")}
72      <a href="" tal:attributes="href request.resource_url(request.root)"
73         i18n:translate="">Cancel</a>
74
75      ${form.end()}
76    </div>
77
78  </metal:content>
79
80
81  <metal:body-js metal:fill-slot="body-js">
82    <script src="${request.static_url('ow:static/components/EasyAutocomplete/jquery.easy-autocomplete.min.js')}"></script>
83    <script type="text/javascript">
84      $(document).ready(function() {
85          var options = {
86              data: ${request.root.sports_json},
87          };
88          $("#sport").easyAutocomplete(options);
89      });
90    </script>
91  </metal:body-js>
92
93
94</html>
Note: See TracBrowser for help on using the repository browser.