conga/luci/plone-custom main_template portlet_ ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-09-18 19:56:35
Modified files:
luci/plone-custom: main_template portlet_login
Added files:
luci/plone-custom: failsafe_login_form login_failed login_form
login_success
Log message:
generate appropriate warning messages when the admin password is incorrect and when the luci server has not been initialized
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/failsafe_login_form.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/login_failed.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/login_form.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/login_success.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/main_template.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/portlet_login.diff?cvsroot=cluster&r1=1.4&r2=1.5
luci/plone-custom/failsafe_login_form +16 -5
@@ -16,7 +16,9 @@ ztutils modules/ZTUtils; errors options/state/getErrors;"> -<h1 i18n:translate="heading_sign_in">Log in</h1> +<tal:block tal:condition="python:here.siteIsSetup()"> + +<h1 i18n:translate="heading_sign_in">Please log in</h1> <p i18n:translate="description_sign_in"> To access this part of the site, you need to log in with your user name and password.
@@ -31,9 +33,11 @@ While cookie authentication is disabled, cookie-based login is not available. </div> -<div style="margin-top:1em" - tal:condition="python:not auth and (login_name == 'admin' or ac_name == 'admin')" > -If you have forgotten your password, you can reset the password by logging in to the server as root and running the command <code>luci_admin password</code>. +<div style="margin-top:1em;margin-bottom:1em" + tal:define="ac_name auth/name_cookie|python:login_name" + tal:condition="python:ac_name == 'admin'"> + If you have forgotten your password, you can reset the password by logging in to the server as root and running the command<br> + <code style="margin-left: +1.5em">luci_admin password</code> </div> <form tal:attributes="action python:context.absolute_url()+'/'+template.id"
@@ -132,7 +136,7 @@ <div class="formControls"> - <input class="context" + <input tabindex="" type="submit" name="submit"
@@ -149,6 +153,13 @@ </fieldset> </form> +</tal:block> + +<div style="margin-top:1em" tal:condition="python: not here.siteIsSetup()"> + The Luci server has not been initialized. To initialize it, log in in to the server as root and run the command<br> + <code style="margin-left:+1.5em">luci_admin init</code> +</div> + </div> </body>
luci/plone-custom/login_failed +7 -4
@@ -16,9 +16,12 @@ may be incorrect. </p> - <p tal:condition="python: login_name == 'admin'"> -If you have forgotten your password, you can reset the password by logging in to the server as root and running the command <code>luci_admin password</code>. - </p> + <div style="margin-top:1em;margin-bottom:1em" + tal:define="ac_name auth/name_cookie|python:login_name" + tal:condition="python:ac_name == 'admin'"> + If you have forgotten your password, you can reset the password by logging in to the server as root and running the command<br> + <code style="margin-left: +1.5em">luci_admin password</code> + </div> <p i18n:translate="description_enable_cookies"> If your user name and password are correct, the problem may be that
@@ -52,4 +55,4 @@ </div> </body> -</html> +</html>
luci/plone-custom/login_form +13 -22
@@ -21,34 +21,21 @@ ac_persist auth/persist_cookie|nothing; login_name python:request.get('login_name', request.get(ac_name, ''));"> -<div tal:omit-tag="" tal:condition="python: not here.siteIsSetup()"> -<h1>This site has not yet been initialized.</h1> -<p>Please login to the server as root and run the command <code>luci_admin init</code> to initialize it. -</div> +<tal:block tal:condition="python: here.siteIsSetup()"> -<div tal:omit-tag="" tal:condition="python: here.siteIsSetup()"> <h1 i18n:translate="heading_sign_in">Please log in</h1> <p i18n:translate="description_sign_in"> To access this part of the site, you need to log in with your user name and password. </p> -<p i18n:translate="description_no_account" - tal:define="join python:[a['url'] for a in actions['user'] if a['id']=='join']" - tal:condition="python: join and checkPermission('Add portal member', here)"> - -If you do not have an account here, head over to the - -<span i18n:name="registration_form"> - <a href="" - tal:define="join python:join.pop(); - join join; - join python:join+test(join.find('?')==-1, '?', '&')+ztu.make_query(came_from=came_from);" - tal:attributes="href join" - i18n:translate="description_no_account_registration_linktext"> - registration form</a></span>. + <div style="margin-top:1em;margin-bottom:1em" + tal:define="ac_name auth/name_cookie|python:login_name" + tal:condition="python:ac_name == 'admin'"> + If you have forgotten your password, you can reset the password by logging in to the server as root and running the command<br> + <code style="margin-left: +1.5em">luci_admin password</code> + </div> -</p> <div id="enable_cookies_message" i18n:translate="enable_cookies_message" class="portalMessage" style="display:none"> Cookies are not enabled. You must <span i18n:name="enable_cookies">
@@ -152,7 +139,7 @@ <div class="formControls"> - <input class="context" + <input tabindex="" type="submit" name="submit"
@@ -169,8 +156,12 @@ </p> </fieldset> - </form> +</tal:block> + +<div style="margin-top:1em" tal:condition="python: not here.siteIsSetup()"> + The Luci server has not been initialized. To initialize it, log in in to the server as root and run the command<br> + <code style="margin-left:+1.5em">luci_admin init</code> </div> </div>
luci/plone-custom/login_success +3 -16
@@ -10,27 +10,13 @@ <body> -<tal:block tal:condition="exists: here/portal_skins | nothing" - tal:replace="nothing"> - <tal:block tal:condition="here/portal_skins/updateSkinCookie | nothing" - tal:define="dummy here/setupCurrentSkin" /> -</tal:block> - <div metal:fill-slot="main"> <div tal:condition="not:isAnon"> - <div tal:define="came_from request/came_from|nothing; + <div tal:define="came_from request/came_from|string:/luci/homebase/; initial_login request/initial_login|nothing; js_enabled python:request.get('js_enabled','1')!='0';"> <h1 i18n:translate="heading_you_are_now_logged_in">You are now logged in</h1> - <br /> - - <p tal:condition="came_from"> - <a href="" - tal:attributes="href came_from" - i18n:translate="label_login_continue"> - Continue</a> - </p> <p tal:condition="python:not came_from"> <a href=""
@@ -71,4 +57,5 @@ </div> </body> -</html> +</html> +
luci/plone-custom/main_template +0 -2
@@ -8,8 +8,6 @@ tal:attributes="lang language; xml:lang language"> - <!-- hello! --> - <head metal:use-macro="here/header/macros/html_header"> <metal:fillbase fill-slot="base">
luci/plone-custom/portlet_login +12 -20
@@ -3,29 +3,22 @@ i18n:domain="plone"> <body tal:define="Iterator python:modules['Products.CMFPlone'].IndexIterator; tabindex python:Iterator(mainSlot=False)"> - <div metal:define-macro="portlet" tal:omit-tag="" tal:define="pageloc python: request.URL.split('/')[-1]; okToShowHere python: not pageloc in ('login_form', 'join_form'); auth nocall:here/acl_users/credentials_cookie_auth|nothing" tal:condition="python: isAnon and okToShowHere"> -portlet login - -<div style="margin-top:1em" - tal:define="ac_name auth/name_cookie|string:__ac_name" - tal:condition="python:isAnon and ac_name == 'admin'" > -If you have forgotten your password, you can reset the password by logging in to the server as root and running the command <code>luci_admin password</code>. -</div> +<tal:block tal:condition="python: here.siteIsSetup()"> <dl class="portlet" id="portlet-login" tal:define="ac_name auth/name_cookie|string:__ac_name; ac_password auth/pw_cookie|string:__ac_password; ac_persist auth/persist_cookie|nothing; - join python:'#'; - canRegister python:False; - canRequestPassword python:False;" + join python:0; + canRegister python:0; + canRequestPassword python:0" tal:condition="python: auth"> <dt class="portletHeader">
@@ -87,7 +80,7 @@ <div class="formControls"> - <input class="context" + <input type="submit" name="submit" value="Log in"
@@ -99,17 +92,11 @@ </form> </dd> - <dd class="portletItem even" tal:condition="canRequestPassword"> - <a href="mail_password_form" - class="tile" - tal:attributes="href string:${portal_url}/mail_password_form"> - <tal:block replace="structure portal/info_icon.gif"/> - <span tal:omit-tag="" i18n:translate="box_forgot_password_option">Forgot your password?</span> - </a> - </dd> </dl> + + <dl class="portlet" id="portlet-login" tal:condition="python: not auth">
@@ -128,7 +115,12 @@ </dd> </dl> +</tal:block> +<div style="margin-top:1em" tal:condition="python: not here.siteIsSetup()"> + The Luci server has not been initialized. To initialize it, log in in to the server as root and run the command<br> + <code style="margin-left:+1.5em">luci_admin init</code> +</div> </div>