Aller au contenu. | Aller à la navigation

Outils personnels

Navigation
Vous êtes ici : Accueil / Aide pour les responsables / Homepage pour non connectés / Code pour custominer la portlet login dans portal_view_customization

Code pour custominer la portlet login dans portal_view_customization

<tal:block condition="view/show"
           i18n:domain="plone">

<dl class="portlet portletLogin"
    tal:condition="view/available">

    <dt class="portletHeader">
        <span class="portletTopLeft"></span>
        <a href="#"
           class="tile"
           tal:attributes="href view/login_form"
           i18n:translate="box_sign_in">Log in</a>
        <span class="portletTopRight"></span>
    </dt>

    <dd class="portletItem odd"
        tal:define="ac_name view/login_name;
                    ac_password view/login_password">
        <form action="login_form"
              id="loginform"
              method="post"
              tal:attributes="action view/login_form">

            <div>
                <input type="hidden" name="form.submitted" value="1" />
                <input type="hidden" name="came_from" value=""
                       tal:attributes="value context/@@plone_context_state/current_page_url" />
                <input type="hidden" name="js_enabled" id="js_enabled" value="0" />
                <input type="hidden" name="cookies_enabled" id="cookies_enabled" value="" />
                <input type="hidden" name="login_name" id="login_name" value="" />
                <input type="hidden" name="pwd_empty" id="pwd_empty" value="0" />
            </div>

            <div class="field"
                 tal:define="use_email_as_login context/portal_properties/site_properties/use_email_as_login|nothing;">

              <tal:loginname condition="not:use_email_as_login">
                <label for=""
                       tal:attributes="for ac_name"
                       i18n:translate="label_login_name">Login Name</label>
                <br />
                <input type="text"
                       size="10"
                       alt="Login Name"
                       tal:attributes="name ac_name; id ac_name;
                                       value python:request.get(ac_name, '');"
                       i18n:attributes="alt label_login_name;"/>
              </tal:loginname>
              <tal:email condition="use_email_as_login">
                <label for=""
                       tal:attributes="for ac_name"
                       i18n:translate="label_email">E-mail</label>
                <br />
                <input type="text"
                       size="10"
                       alt="E-mail"
                       tal:attributes="name ac_name; id ac_name;
                                       value python:request.get(ac_name, '');"
                       i18n:attributes="alt label_email;"/>
              </tal:email>
            </div>

            <div class="field">
                <label for=""
                       tal:attributes="for ac_password"
                       i18n:translate="label_password">Password</label>
                <br />
                <input type="password"
                       size="10"
                       alt="Password"
                       tal:attributes="name ac_password; id ac_password;"
                       i18n:attributes="alt label_password;"/>
            </div>

            <div i18n:translate="enable_cookies_message_before_login"
                 class="cookiesMessage portalMessage"
                 style="display:none">
                Cookies are not enabled. You must enable cookies before you
                can log in.
            </div>

            <div class="formControls">

                <input class="context"
                       type="submit"
                       name="submit"
                       value="Log in"
                       alt="Log in"
                       i18n:attributes="value label_log_in; alt label_log_in;"/>
            </div>
        </form>
    </dd>

<!--  
  <dd class="portletItem even" tal:condition="view/can_request_password">
        <a href="mail_password_form"
           class="tile"
           tal:attributes="href view/mail_password_form">
           <tal:block replace="structure context/info_icon.png"/>
           <span tal:omit-tag="" i18n:translate="box_forgot_password_option">Forgot your password?</span>
        </a>
    </dd>
-->

    <dd class="portletItem even" tal:condition="view/can_request_password">
       
           <tal:block replace="structure context/info_icon.png"/>
           <span tal:omit-tag="">Problème de connexion élève? <a href="./comment-se-connecter-comme-eleve-au-site-du-college-de-saussure">Voir ici</a></span>
      
    </dd>

    <dd class="portletItem lastItem" tal:condition="view/can_register">
        <a href=""
           class="tile"
           tal:attributes="href view/join_action">
            <tal:block replace="structure context/user.png"/>
            <span tal:omit-tag="" i18n:translate="box_new_user_option">New user?</span>
        </a>
        <span class="portletBottomLeft"></span>
        <span class="portletBottomRight"></span>
    </dd>
</dl>

<dl class="portlet portletLogin"
    tal:condition="not:view/available">

    <dt class="portletHeader">
        <a href="#"
           class="tile"
           i18n:translate="box_sign_in">Log in</a>
    </dt>

    <dd class="portletItem"
        i18n:translate="login_portlet_disabled">
        Cookie authentication is disabled.
        Login portlet not available.
    </dd>

</dl>

</tal:block>