[5ec3a0b] | 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"> |
---|
[208da8b] | 19 | <link rel="stylesheet" href="${request.static_url('ow:static/components/EasyAutocomplete/easy-autocomplete.min.css')}" /> |
---|
| 20 | <link rel="stylesheet" href="${request.static_url('ow:static/components/pickadate/themes/default.css')}" /> |
---|
| 21 | <link rel="stylesheet" href="${request.static_url('ow:static/components/pickadate/themes/default.date.css')}" /> |
---|
[5ec3a0b] | 22 | </metal:css> |
---|
| 23 | |
---|
| 24 | <metal:content metal:fill-slot="content"> |
---|
[01674ff] | 25 | |
---|
[208da8b] | 26 | <div class="add_workout ow-forms"> |
---|
[01674ff] | 27 | <a href="" class="back" |
---|
| 28 | tal:attributes="href request.resource_url(context)" |
---|
| 29 | i18n:translate="">Back</a> |
---|
| 30 | <h2 i18n:translate="">Add a new workout</h2> |
---|
[208da8b] | 31 | ${form.begin()} |
---|
| 32 | ${form.csrf_token()} |
---|
| 33 | |
---|
| 34 | <fieldset> |
---|
[01674ff] | 35 | <p> |
---|
| 36 | <label for="sport" i18n:translate="">Sport/Activity</label> |
---|
| 37 | ${form.errorlist('sport')} |
---|
| 38 | ${form.text('sport')} |
---|
| 39 | </p> |
---|
| 40 | <p> |
---|
| 41 | <label for="title" i18n:translate="">Title</label> |
---|
| 42 | ${form.errorlist('title')} |
---|
| 43 | ${form.text('title')} |
---|
| 44 | </p> |
---|
| 45 | <div class="input-container ly-flex ly-2 has-gap"> |
---|
| 46 | <div> |
---|
| 47 | <label for="start_date" i18n:translate="">Start date (dd/mm/yyyy)</label> |
---|
| 48 | ${form.errorlist('start_date')} |
---|
| 49 | ${form.text('start_date', size=10, **{'class': "date"})} |
---|
| 50 | </div> |
---|
| 51 | <div> |
---|
| 52 | <label for="start_time" i18n:translate="">Start time (HH:MM)</label> |
---|
| 53 | ${form.errorlist('start_time')} |
---|
| 54 | ${form.text('start_time', size=5, **{'class': "time"})} |
---|
| 55 | </div> |
---|
| 56 | </div> |
---|
| 57 | |
---|
| 58 | <div class="input-container ly-flex ly-3 has-gap"> |
---|
| 59 | <div> |
---|
| 60 | <label for="duration_hours" i18n:translate="">Hours</label> |
---|
| 61 | ${form.errorlist('duration_hours')} |
---|
| 62 | ${form.text('duration_hours', size=3, **{'class': "number"})} |
---|
[208da8b] | 63 | </div> |
---|
[01674ff] | 64 | <div> |
---|
| 65 | <label for="duration_minutes" i18n:translate="">Minutes</label> |
---|
| 66 | ${form.errorlist('duration_minutes')} |
---|
| 67 | ${form.text('duration_minutes', size=3, **{'class': "number"})} |
---|
[208da8b] | 68 | </div> |
---|
[01674ff] | 69 | <div> |
---|
| 70 | <label for="duration_seconds" i18n:translate="">Seconds</label> |
---|
| 71 | ${form.errorlist('duration_seconds')} |
---|
| 72 | ${form.text('duration_seconds', size=3, **{'class': "number"})} |
---|
| 73 | </div> |
---|
| 74 | </div> |
---|
| 75 | |
---|
| 76 | <p> |
---|
| 77 | <label for="distance" i18n:translate="">Distance (Km):</label> |
---|
| 78 | ${form.errorlist('distance')} |
---|
| 79 | ${form.text('distance', size=4, **{'class': "number"})} |
---|
| 80 | </p> |
---|
| 81 | <div> |
---|
| 82 | <label for="notes" i18n:translate="">Notes:</label> |
---|
| 83 | ${form.errorlist('notes')} |
---|
| 84 | ${form.textarea('notes', rows=10, cols=50)} |
---|
| 85 | </div> |
---|
[5ec3a0b] | 86 | </fieldset> |
---|
| 87 | |
---|
[01674ff] | 88 | ${form.submit("submit", "Save", **{'class':"button button-normal"})} |
---|
[5ec3a0b] | 89 | |
---|
| 90 | ${form.end()} |
---|
| 91 | </div> |
---|
| 92 | |
---|
| 93 | </metal:content> |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | <metal:body-js metal:fill-slot="body-js"> |
---|
[208da8b] | 97 | <script src="${request.static_url('ow:static/components/EasyAutocomplete/jquery.easy-autocomplete.min.js')}"></script> |
---|
| 98 | <script src="${request.static_url('ow:static/components/pickadate/picker.js')}"></script> |
---|
| 99 | <script src="${request.static_url('ow:static/components/pickadate/picker.date.js')}"></script> |
---|
| 100 | |
---|
| 101 | <script type="text/javascript"> |
---|
| 102 | $(document).ready(function() { |
---|
| 103 | var options = { |
---|
| 104 | data: ${request.root.sports_json}, |
---|
| 105 | }; |
---|
| 106 | $("#sport").easyAutocomplete(options); |
---|
| 107 | $('#start_date').pickadate({ |
---|
| 108 | format: 'dd/mm/yyyy', |
---|
| 109 | formatSubmit: 'dd/mm/yyyy', |
---|
| 110 | }); |
---|
| 111 | }); |
---|
| 112 | </script> |
---|
[5ec3a0b] | 113 | </metal:body-js> |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | </html> |
---|