<html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="here/main_template/macros/master">
  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  </head>

  <body>
    <div metal:fill-slot="main_no_tabs" i18n:domain="cmf_default">
      <div tal:define="purl here/portal_url;
                  mtool here/portal_membership;
                  member mtool/getAuthenticatedMember;
                 ">
        <div tal:condition="python: not( mtool.checkPermission( 'Set own properties'
                                                        , here ) )">
          <span id="dummy_for_redirect" tal:define="aurl here/absolute_url;
                      rurl string:${purl}/login_form?came_from=${aurl};
                      response request/RESPONSE;
                      redirect python:response.redirect( rurl )" />
        </div>
        <!-- not Set own properties -->
        <div class="config">
          <h1 i18n:translate="">Member Preferences</h1>
          <span tal:condition="request/msg|nothing" tal:replace="request/msg" />
          <p i18n:translate=""><span i18n:name="link"><a href="password_form" i18n:translate="">Click here</a></span> to change your password.</p>
          <form action="personalize" method="post" tal:attributes="action string:${purl}/personalize">
            <table class="TwoColumnForm" cellspacing="0">
              <tr>
                <th i18n:translate="">Name</th>
                <td>
                  <input type="text" name="name" value="" tal:attributes="value python:member.getProperty('name', None)" />
                </td>
              </tr>
              <tr>
                <th i18n:translate="">Given Name</th>
                <td>
                  <input type="text" name="given_name" tal:attributes="value python:member.getProperty('given_name', None)" />
                </td>
              </tr>
              <tr>
                <th i18n:translate="">Email address</th>
                <td>
                  <input type="text" name="email" value="" tal:attributes="value python:member.getProperty('email', None)" />
                </td>
              </tr>
              <tr>
                <td><br /></td>
                <td>
                  <br />
                  <input type="submit" value="Change" i18n:attributes="value" />
                </td>
              </tr>
            </table>
          </form>
        </div>
        <!-- class="Desktop" -->
      </div>
      <!-- tal:define="mtool" -->
    </div>
    <!-- metal:fill-slot="main" -->
  </body>

</html>