All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/plone-custom failsafe_login_form.cp ...
Date: 18 Sep 2006 21:09:55 -0000	[thread overview]
Message-ID: <20060918210955.9190.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2006-09-18 21:09:53

Added files:
	luci/plone-custom: failsafe_login_form.cpt login_form.cpt 
	                   portlet_login.cpt 
Removed files:
	luci/plone-custom: failsafe_login_form join_form_validate 
	                   logged_out login_form portlet_login 

Log message:
	these need to be controller page templates

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/failsafe_login_form.cpt.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/login_form.cpt.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/portlet_login.cpt.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/failsafe_login_form.diff?cvsroot=cluster&r1=1.4&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/join_form_validate.diff?cvsroot=cluster&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/logged_out.diff?cvsroot=cluster&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/login_form.diff?cvsroot=cluster&r1=1.4&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/portlet_login.diff?cvsroot=cluster&r1=1.5&r2=NONE

/cvs/cluster/conga/luci/plone-custom/failsafe_login_form.cpt,v  -->  standard output
revision 1.1
--- conga/luci/plone-custom/failsafe_login_form.cpt
+++ -	2006-09-18 21:09:53.896648000 +0000
@@ -0,0 +1,166 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
+      i18n:domain="plone">
+<head>
+  <title i18n:translate="heading_sign_in">Please log in</title>
+</head>
+
+<body>
+
+<div tal:define="checkPermission nocall:here/portal_membership/checkPermission;
+                 actions python:context.portal_actions.listFilteredActionsFor(context);
+                 Iterator python:modules['Products.CMFPlone'].IndexIterator;
+                 tabindex python:Iterator(pos=30000);
+                 auth nocall:here/acl_users/credentials_cookie_auth|nothing;
+                 came_from request/came_from|request/HTTP_REFERER|nothing;
+                 came_from python:test(here.portal_url.isURLInPortal(came_from), came_from, None);
+                 ztutils modules/ZTUtils;
+                 errors options/state/getErrors;">
+
+<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.
+</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">
+  <a href="enabling_cookies" i18n:translate="label_enable_cookies">enable cookies</a></span> before you can log in.
+</div>
+
+<div tal:condition="python: not auth" i18n:translate="login_form_disabled">
+    While cookie authentication is disabled, cookie-based login is not available.
+</div>
+
+<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"
+      method="post"
+      id="login_form"
+      tal:condition="python:auth">
+
+    <fieldset tal:define="ac_name auth/name_cookie|string:__ac_name;
+                          ac_password auth/pw_cookie|string:__ac_password;
+                          ac_persist auth/persist_cookie|nothing">
+
+        <legend i18n:translate="legend_account_details">Account details</legend>
+
+        <input type="hidden"
+            name="came_from"
+            value=""
+	    tal:attributes="value came_from" />
+
+        <input type="hidden" name="form.submitted" value="1" />
+        <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 class="field"
+             tal:define="error python:errors.get(ac_name, None);
+                         value python:request.get('login_name', request.get(ac_name, None));"
+             tal:attributes="class python:test(error, 'field error', 'field')">
+
+            <label i18n:translate="label_login_name"
+                   tal:attributes="for ac_name">Login Name</label>
+
+            <div i18n:translate="help_login_name_caps"
+                 class="formHelp">
+                Login names are case sensitive, make sure the caps lock key is not enabled.
+            </div>
+
+            <div tal:content="error">Validation error output</div>
+
+            <input type="text"
+                   size="15"
+                   tabindex=""
+                   tal:attributes="name ac_name;
+                                   id ac_name;
+                                   value value;
+                                   tabindex tabindex/next;"
+                   />
+
+        </div>
+
+        <div class="field"
+             tal:define="error python:errors.get(ac_password, None);"
+             tal:attributes="class python:test(error, 'field error', 'field')">
+
+            <label i18n:translate="label_password"
+                   tal:attributes="for ac_password">Password</label>
+
+            <div class="formHelp">
+                <div i18n:translate="help_capslock_password">
+                    Case sensitive, make sure caps lock is not enabled.
+                </div>
+            </div>
+
+            <div tal:content="error">Validation error output</div>
+
+            <input type="password"
+                   size="15"
+                   tabindex=""
+                   tal:attributes="name ac_password;
+                                   id ac_password;
+                                   tabindex tabindex/next;"
+                   />
+        </div>
+
+        <div class="field" tal:condition="ac_persist">
+
+            <input type="checkbox"
+                   class="noborder formRememberName"
+                   value="1"
+                   checked="checked"
+                   id="cb_remember"
+                   tabindex=""
+                   tal:attributes="name ac_persist;
+                                   tabindex tabindex/next;
+                                   checked python:request.get(ac_name, '') and 'checked' or None;"
+                   />
+
+            <label for="cb_remember" i18n:translate="label_remember_my_name">Remember my name.</label>
+
+            <div i18n:translate="help_remember_my_name"
+                 class="formHelp">
+                Check this to have your user name filled in automatically when you log in later.
+            </div>
+
+        </div>
+
+        <div class="formControls">
+
+            <input
+                   tabindex=""
+                   type="submit"
+                   name="submit"
+                   value="Log in"
+                   i18n:attributes="value label_log_in;"
+                   tal:attributes="tabindex tabindex/next;" />
+
+        </div>
+
+        <p i18n:translate="remember_to_log_out">
+            Please log out or exit your browser when you're done.
+        </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>
+
+</body>
+</html>
/cvs/cluster/conga/luci/plone-custom/login_form.cpt,v  -->  standard output
revision 1.1
--- conga/luci/plone-custom/login_form.cpt
+++ -	2006-09-18 21:09:54.358310000 +0000
@@ -0,0 +1,169 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
+      metal:use-macro="here/main_template/macros/master"
+      i18n:domain="plone">
+
+<head>
+    <script type="text/javascript" metal:fill-slot="javascript_head_slot">
+    </script>
+    <metal:block fill-slot="top_slot"
+                 tal:define="dummy python:request.set('disable_border',1)" />
+</head>
+
+<body>
+
+<div metal:fill-slot="main"
+     tal:define="auth nocall:here/acl_users/credentials_cookie_auth|nothing;
+                 came_from request/came_from|request/HTTP_REFERER|nothing;
+                 came_from python:test(utool.isURLInPortal(came_from), came_from, None);
+		 errors options/state/getErrors;
+		 ac_name auth/name_cookie|string:__ac_name;
+		 ac_password auth/pw_cookie|string:__ac_password;
+		 ac_persist auth/persist_cookie|nothing;
+		 login_name python:request.get('login_name', request.get(ac_name, ''));">
+
+<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.
+</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>
+
+
+<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">
+  <a href="enabling_cookies" i18n:translate="label_enable_cookies">enable cookies</a></span> before you can log in.
+</div>
+
+<div tal:condition="python: not auth" i18n:translate="login_form_disabled">
+    While cookie authentication is disabled, cookie-based login is not available.
+</div>
+
+<form tal:attributes="action python:context.absolute_url()+'/'+template.id"
+      method="post"
+      id="login_form"
+      tal:condition="python:auth">
+
+    <fieldset>
+
+        <legend i18n:translate="legend_account_details">Account details</legend>
+
+        <input type="hidden"
+            name="came_from"
+            value=""
+        tal:attributes="value came_from" />
+
+        <input type="hidden" name="form.submitted" value="1" />
+        <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 class="field"
+             tal:define="error python:errors.get(ac_name, None);"
+             tal:attributes="class python:test(error, 'field error', 'field')">
+
+            <label i18n:translate="label_login_name"
+                   tal:attributes="for ac_name">Login Name</label>
+
+            <div i18n:translate="help_login_name_caps"
+                 class="formHelp">
+            Login names are case sensitive, make sure the caps lock key is not enabled.
+            </div>
+
+            <div tal:content="error">Validation error output</div>
+
+            <input type="text"
+                   size="15"
+                   tabindex=""
+                   tal:attributes="name ac_name;
+                                   id ac_name;
+                                   value login_name;
+                                   tabindex tabindex/next;"
+                   />
+
+    </div>
+
+    <div class="field"
+             tal:define="error python:errors.get(ac_password, None);"
+             tal:attributes="class python:test(error, 'field error', 'field')">
+
+            <label i18n:translate="label_password"
+                   tal:attributes="for ac_password">Password</label>
+
+            <div class="formHelp">
+                <div i18n:translate="help_capslock_password">
+                    Case sensitive, make sure caps lock is not enabled.
+                </div>
+            </div>
+
+            <div tal:content="error">Validation error output</div>
+
+            <input type="password"
+                   size="15"
+                   tabindex=""
+                   tal:attributes="name ac_password;
+                                   id ac_password;
+                                   tabindex tabindex/next;"
+                   />
+    </div>
+
+        <div class="field" tal:condition="ac_persist">
+
+            <input type="checkbox"
+                   class="noborder formRememberName"
+                   value="1"
+                   checked="checked"
+                   id="cb_remember"
+                   tabindex=""
+                   tal:attributes="name ac_persist;
+                                   tabindex tabindex/next;
+                                   checked python:request.get(ac_name, '') and 'checked' or None;"
+                   />
+
+            <label for="cb_remember" i18n:translate="label_remember_my_name">Remember my name.</label>
+
+            <div i18n:translate="help_remember_my_name"
+                 class="formHelp">
+                Check this to have your user name filled in automatically when you log in later.
+            </div>
+
+        </div>
+
+        <div class="formControls">
+
+            <input 
+                   tabindex=""
+                   type="submit"
+                   name="submit"
+                   value="Log in"
+                   i18n:attributes="value label_log_in;"
+                   tal:attributes="tabindex tabindex/next;
+                               onclick string:javascript:return setLoginVars('$ac_name','login_name','$ac_password','pwd_empty','js_enabled','cookies_enabled');"
+                   />
+
+        </div>
+
+        <p i18n:translate="remember_to_log_out">
+            Please log out or exit your browser when you're done.
+        </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>
+
+</body>
+</html>
/cvs/cluster/conga/luci/plone-custom/portlet_login.cpt,v  -->  standard output
revision 1.1
--- conga/luci/plone-custom/portlet_login.cpt
+++ -	2006-09-18 21:09:54.441125000 +0000
@@ -0,0 +1,128 @@
+<html xmlns:tal="http://xml.zope.org/namespaces/tal"
+      xmlns:metal="http://xml.zope.org/namespaces/metal"
+      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">
+
+<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:0;
+                canRegister python:0;
+                canRequestPassword python:0"
+    tal:condition="python: auth">
+
+    <dt class="portletHeader">
+        <span class="portletTopLeft"></span>
+        <a href="#" 
+           class="tile"
+           tal:attributes="href string:$portal_url/login_form"
+           i18n:translate="box_sign_in">Log in</a>
+        <span class="portletTopRight"></span>
+    </dt>
+
+    <dd class="portletItem odd">
+        <form action="login_form"
+              name="loginform"
+              method="post"
+              tal:attributes="action string:${portal_url}/login_form">
+
+            <input type="hidden" name="form.submitted" value="1" />
+            <input type="hidden" name="came_from" value=""
+                   tal:attributes="value context/@@plone/getCurrentUrl" />
+            <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 class="field">
+                <label for=""
+                       tal:attributes="for ac_name"
+                       i18n:translate="label_login_name">Login Name</label>
+                <br />
+                <input type="text"
+                       size="10"
+                       alt="Login Name"
+                       onclick="showCookieMessage('cookies_message')"
+                       tal:attributes="name ac_name; id ac_name;
+                                       value python:request.get(ac_name, '');
+                                       tabindex tabindex/next"
+                       i18n:attributes="alt label_login_name;"/>
+            </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"
+                       onclick="showCookieMessage('cookies_message')"
+                       tal:attributes="name ac_password; id ac_password;
+                                       tabindex tabindex/next;"
+                       i18n:attributes="alt label_password;"/>
+            </div>
+
+            <div id="cookies_message" i18n:translate="enable_cookies_message" class="portalMessage" style="display:none">
+                Cookies are not enabled. You must <span i18n:name="enable_cookies">
+                <a href="enabling_cookies" i18n:translate="label_enable_cookies">enable cookies</a></span> before you can log in.
+            </div>
+            
+            <div class="formControls">
+            
+                <input
+                       type="submit"
+                       name="submit"
+                       value="Log in"
+                       alt="Log in"
+                       tal:attributes="tabindex tabindex/next;
+                                  onclick string:javascript:return setLoginVars('$ac_name','login_name','$ac_password','pwd_empty','js_enabled','cookies_enabled');"
+                       i18n:attributes="value label_log_in; alt label_log_in;"/>
+            </div>
+        </form>
+    </dd>
+    
+    </dl>
+
+
+
+
+<dl class="portlet"
+    id="portlet-login"
+    tal:condition="python: not auth">
+
+    <dt class="portletHeader">
+        <a href="#" 
+           class="tile"
+           i18n:translate="box_sign_in">Log in</a>
+    </dt>
+
+    <dd class="portletItem"
+        tal:condition="python: not auth"
+        i18n:translate="login_portlet_disabled">
+        Cookie authentication is disabled. 
+        Login portlet not available.
+    </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>
+</body>
+</html>



             reply	other threads:[~2006-09-18 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-18 21:09 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-09-19  5:22 [Cluster-devel] conga/luci/plone-custom failsafe_login_form.cp rmccabe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060918210955.9190.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.