Commit 9cfd4c1c authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-12-20 gabriel

* Added page to Login and script to Logout

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41558 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fe9cc859
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<div id="login_form">\n
<h4>Log in</h4>\n
<label for="name" class="required">Name</label><br/>\n
<input type="text" name="__ac_name" id="name" tal:attributes="value python: request.get(\'__ac_name\') or \'\'" /><br/>\n
<label for="password">Password</label><br/>\n
<input type="password" name="__ac_password" id="password" /><br/>\n
<input type="submit" name="logged_in:method" class="submit" value="Login">\n
</div>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_loginDialog</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
portal_path python:website.absolute_url();">\n portal_path python:website.absolute_url();">\n
<a id="right_message">Not Implemented yet</a>\n <a id="right_message">Not Implemented yet</a>\n
<tal:block tal:condition="here/portal_membership/isAnonymousUser">\n <tal:block tal:condition="here/portal_membership/isAnonymousUser">\n
<a tal:attributes="href string:${portal_path}/login_form">Sign in</a>\n <a id="login" tal:attributes="href string: #">Sign in</a>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python:not here.portal_membership.isAnonymousUser()">\n <tal:block tal:condition="python:not here.portal_membership.isAnonymousUser()">\n
<a tal:content="here/portal_membership/getAuthenticatedMember"/>\n <a tal:content="here/portal_membership/getAuthenticatedMember"/>\n
</tal:block>\n </tal:block>\n
| <a id="settings" href="#">Settings</a> | <a id="help" href="#">Help</a> |\n | <a id="settings" href="#">Settings</a> | <a id="help" href="#">Help</a> |\n
<a tal:attributes="href string:${portal_path}/logout">Sign out</a>\n <a tal:attributes="href string:${portal_path}/WebSite_logout">Sign out</a>\n
</tal:block> </tal:block>
]]></unicode> </value> ]]></unicode> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>website = context.getWebSiteValue()\n
REQUEST = context.REQUEST\n
if REQUEST.has_key(\'portal_skin\'):\n
context.portal_skins.clearSkinCookie()\n
\n
#XXX get cookie name from key authentication plugin\n
REQUEST.RESPONSE.expireCookie(\'__ac\', path=\'/\')\n
REQUEST.RESPONSE.expireCookie(\'__key\', path=\'/\')\n
\n
return website.Base_redirect("", **kw)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>dialog_id=None, form_id=\'\', **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>dialog_id</string>
<string>form_id</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>website</string>
<string>REQUEST</string>
<string>_apply_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<string></string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_logout</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -264,6 +264,15 @@ $(document).ready(function(){\n ...@@ -264,6 +264,15 @@ $(document).ready(function(){\n
event.preventDefault();\n event.preventDefault();\n
showNotImplementedMessage("a#left_message");\n showNotImplementedMessage("a#left_message");\n
});\n });\n
$("a#login").click(function(event){\n
event.preventDefault();\n
$("div.header-left div.field input, div.main-right, div.main-left").hide();\n
if ($("div#login_form").html() == null){\n
$.get("WebSection_loginDialog", function(data){\n
$("div.header-left fieldset.widget").append("<p>" + data + "</p>")\n
});\n
}\n
});\n
return false;\n return false;\n
}); });
......
...@@ -873,7 +873,19 @@ a#loading_message {\n ...@@ -873,7 +873,19 @@ a#loading_message {\n
\n \n
iframe#field_my_text_content___Frame {\n iframe#field_my_text_content___Frame {\n
height: 489px !important;\n height: 489px !important;\n
} }\n
\n
div#login_form {\n
font-family: Arial,Helvetica,sans-serif;\n
font-size: 12px;\n
margin: 0;\n
padding: 0;\n
}\n
\n
div#login_form input {\n
vertical-align: middle; \n
}\n
]]></string> </value> ]]></string> </value>
</item> </item>
......
2010-12-20 gabriel 2010-12-20 gabriel
* Added page to Login and script to Logout
* Initial implementation to share documents in UNG. * Initial implementation to share documents in UNG.
* Added redirect to be possible open the document with the key. * Added redirect to be possible open the document with the key.
......
134 135
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment