<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      lang="en"
      metal:use-macro="context/main_template/macros/master"
      i18n:domain="plone">

<body>

<tal:block tal:condition="exists: context/portal_skins | nothing"
           tal:replace="nothing">

    <tal:block tal:condition="context/portal_skins/updateSkinCookie | nothing"
       tal:define="dummy context/setupCurrentSkin" />

</tal:block>

<metal:main fill-slot="main"
     tal:define="errors options/state/getErrors;">

    <h1 class="documentFirstHeading"
        i18n:translate="heading_welcome">Welcome!</h1>

    <div class="documentDescription">
        <span i18n:translate="description_logged_in">
            This is the first time that you've logged in to
            <span tal:content="context/portal_properties/title" tal:omit-tag="" i18n:name="here">here</span>.
        </span>

        <span i18n:translate="description_change_initial_password">
        Before you start exploring, you need to change your original password.
        This ensures that the password you received via email cannot be used in a malicious manner.
        </span>
    </div>

    <div id="content-core">
        <p i18n:translate="description_use_form_to_change_password">
            Please use the form below to change your password.
        </p>

        <form tal:attributes="action python:context.absolute_url()+'/'+template.id"
              class="enableAutoFocus"
              name="change_password"
              method="post">

            <fieldset>
            <legend i18n:translate="legend_password_details">Password Details</legend>

            <input type="hidden" name="form.submitted" value="1" />
            <input type="hidden" name="initial_login" value="1" />
            <input type="hidden"
                   name="came_from"
                   value=""
                   tal:define="came_from request/came_from|nothing"
                   tal:condition="came_from"
                   tal:attributes="value came_from"
                   />

            <input tal:replace="structure context/@@authenticator/authenticator" />

            <div class="field"
                 tal:define="error python:errors.get('password', None);"
                 tal:attributes="class python:test(error, 'field error', 'field')">

                    <label for="password"
                           i18n:translate="label_new_password">New password</label>

                    <div class="formHelp" i18n:translate="help_new_password">
                    Enter your new password. Minimum 5 characters.
                    </div>

                    <div tal:content="error">Validation error output</div>

                    <input type="password"
                           name="password"
                           id="password"
                           size="10"
                           />
            </div>

            <div class="field"
                 tal:define="error python:errors.get('confirm', None);"
                 tal:attributes="class python:test(error, 'field error', 'field')">

                <label for="confirm"
                       i18n:translate="label_confirm_password">Confirm password</label>

                <div class="formHelp" i18n:translate="help_confirm_password">
                    Re-enter the password. Make sure the passwords are identical.
                </div>

                <div tal:content="error">Validation error output</div>

                <input type="password"
                       name="confirm"
                       id="confirm"
                       size="10"
                       />
            </div>

            <div class="formControls">
                <input class="standalone"
                       type="submit"
                       name="submit"
                       value="Change Password"
                       i18n:attributes="value label_change_password;" />
            </div>

            </fieldset>

        </form>
    </div>
</metal:main>

</body>
</html>

