source: OpenWorkouts-current/ow/templates/edit_profile.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: 2.6 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="">Edit profile</tal:t>
12  </metal:head-title>
13
14  <metal:title metal:fill-slot="title">
15    <tal:t i18n:translate="">Edit profile</tal:t>
16  </metal:title>
17
18  <metal:content metal:fill-slot="content">
19    <div id="add_workout">
20      ${form.begin(multipart=True)}
21      ${form.csrf_token()}
22
23      <fieldset>
24        ${form.errorlist('email')}
25        <label for="email" i18n:translate="">Email address:</label>
26        ${form.text('email')}
27      </fieldset>
28
29      <fieldset>
30        <tal:c tal:condition="getattr(context, 'picture', None)">
31          <tal:t i18n:translate="">Current picture:</tal:t>
32          <img tal:attributes="src request.resource_path(context, 'picture')"
33               width="150" />
34        </tal:c>
35        ${form.errorlist('picture')}
36        <label for="picture" i18n:translate="">
37          Picture (jpg, jpeg, png or gif):</label>
38        ${form.file('picture')}
39      </fieldset>
40
41      <fieldset>
42        ${form.errorlist('firstname')}
43        <label for="firstname" i18n:translate="">First name:</label>
44        ${form.text('firstname')}
45        ${form.errorlist('lastname')}
46        <label for="lastname" i18n:translate="">Last name:</label>
47        ${form.text('lastname')}
48      </fieldset>
49
50      <fieldset>
51        ${form.errorlist('gender')}
52        <label for="gender" i18n:translate="">Gender:</label>
53        ${form.select('gender', ['male', 'female'])}
54
55        ${form.errorlist('birth_date')}
56        <label for="birth_date" i18n:translate="">Birth date:</label>
57        ${form.date('birth_date', date_format='%d/%m/%Y')}
58
59        ${form.errorlist('height')}
60        <label for="height" i18n:translate="">Height (meters):</label>
61        ${form.text('height')}
62
63        ${form.errorlist('weight')}
64        <label for="weight" i18n:translate="">Weight (kg):</label>
65        ${form.text('weight')}
66      </fieldset>
67
68      <fieldset>
69        ${form.errorlist('bio')}
70        <label for="bio" i18n:translate="">Bio/About you:</label>
71        ${form.textarea('bio', rows=10, cols=50)}
72      </fieldset>
73
74      ${form.submit("submit", "Save")}
75      <a href="" tal:attributes="href request.resource_url(context, 'profile')"
76         i18n:translate="">Cancel</a>
77
78      ${form.end()}
79    </div>
80
81  </metal:content>
82
83</html>
Note: See TracBrowser for help on using the repository browser.