Commit eb43a7c1 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Authenticate user with ERP5

Stop entering the login/password in the Javascript application.
Redirect instead to the data server (ERP5), which will be able to set a correct cookie/token.

Authentication is done on a separate Web Site to bypass some cache bug on IOS.
parent f32d638d
......@@ -102,7 +102,7 @@
<value> <string encoding="cdata"><![CDATA[
CACHE MANIFEST\n
# generated on Fri, 04 Dec 2015 10:00:00 +0000\n
# generated on Fri, 10 Dec 2015 10:00:00 +0000\n
# XXX + fonts\n
# images/ajax-loader.gif\n
CACHE:\n
......@@ -169,8 +169,6 @@ gadget_erp5_page_front.html\n
gadget_erp5_page_front.js\n
gadget_erp5_page_history.html\n
gadget_erp5_page_history.js\n
gadget_erp5_page_login.html\n
gadget_erp5_page_login.js\n
gadget_erp5_page_logout.html\n
gadget_erp5_page_logout.js\n
gadget_erp5_page_tab.html\n
......@@ -342,7 +340,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>947.36771.24081.57838</string> </value>
<value> <string>947.45418.49350.47138</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -360,7 +358,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1449236184.22</float>
<float>1449757727.84</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -107,13 +107,37 @@
"use strict";\n
\n
function wrapJioCall(gadget, method_name, argument_list) {\n
var storage = gadget.state_parameter_dict.jio_storage;\n
var storage = gadget.state_parameter_dict.jio_storage,\n
regexp = /^X-Delegate uri="(http[s]*:\\/\\/[\\/\\-\\[\\]{}()*+:?.,\\\\\\^$|#\\s\\w%]+)"$/,\n
login_page;\n
\n
return storage[method_name].apply(storage, argument_list)\n
.push(undefined, function (error) {\n
if ((error.target !== undefined) && (error.target.status === 401)) {\n
login_page = error.target.getResponseHeader(\'WWW-Authenticate\');\n
// Only connect to https to login\n
if (regexp.test(login_page)) {\n
return gadget.getUrlFor({\n
command: \'login\',\n
absolute_url: true\n
})\n
.push(function (came_from) {\n
return gadget.redirect({\n
command: \'raw\',\n
options: {\n
url: UriTemplate.parse(regexp.exec(login_page)[1]).expand({came_from: came_from})\n
}\n
});\n
});\n
/*\n
window.location = UriTemplate.parse(\n
regexp.exec(login_page)[1]\n
).expand({came_from: window.location.href + "{&me}"});\n
return RSVP.timeout(5000);\n
*/\n
// Redirect to the login view\n
return gadget.redirect({command: \'display\', options: {page: \'login\'}});\n
}\n
// return gadget.redirect({command: \'display\', options: {page: \'login\'}});\n
}\n
throw error;\n
});\n
......@@ -163,6 +187,7 @@
\n
.declareAcquiredMethod(\'getSetting\', \'getSetting\')\n
.declareAcquiredMethod(\'redirect\', \'redirect\')\n
.declareAcquiredMethod(\'getUrlFor\', \'getUrlFor\')\n
\n
.declareMethod(\'createJio\', function () {\n
var gadget = this;\n
......@@ -418,7 +443,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>947.36789.31946.17646</string> </value>
<value> <string>947.45414.13002.10052</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -436,7 +461,7 @@
</tuple>
<state>
<tuple>
<float>1449236578.55</float>
<float>1449753994.81</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_login.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_pt_loginform_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>ERP5 PT Loginpage</title>\n
\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
\n
<!-- custom script -->\n
<script src="gadget_global.js" type="text/javascript"></script>\n
<script src="gadget_erp5_page_login.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
\n
<fieldset class="center">\n
<form class="login_form">\n
<div class="ui-card ui-body-inherit ui-corner-all ui-shadow ui-content ui-responsive">\n
<label data-i18n="">Login:</label>\n
<div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset">\n
<input type="text" required="required" data-enhanced="true" name="login" value="" />\n
</div>\n
<label data-i18n="Password">Password:</label>\n
<div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset">\n
<input type="password" required="required" name="password" value="" data-enhanced="true" />\n
</div>\n
<div class="ui-grid-a ui-responsive">\n
<div class="ui-block-a">\n
<!-- <a href="#" class="ui-disabled ui-link">Forgot password</a> -->\n
</div>\n
<div class="ui-block-b">\n
<div class="ui-btn ui-btn-b ui-input-btn ui-corner-all ui-icon-carat-r ui-btn-icon-right">\n
<span>Login</span>\n
<input data-enhanced="true" type="submit" data-i18n="[value]Login" value="Login" />\n
</div>\n
</div>\n
</div>\n
\n
</div>\n
</form>\n
</fieldset>\n
\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget ERP5 Loginform</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>sven</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1406902763.96</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>super_sven</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>939.43978.9403.31744</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1419348948.68</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1406817511.26</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_login.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_pt_loginform_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string>/*global window, document, rJS, RSVP, promiseEventListener */\n
/*jslint indent: 2, maxerr: 3 */\n
(function (window, document, rJS, RSVP, promiseEventListener) {\n
"use strict";\n
\n
rJS(window)\n
/////////////////////////////////////////////////////////////////\n
// ready\n
/////////////////////////////////////////////////////////////////\n
// Init local properties\n
.ready(function (g) {\n
g.props = {};\n
})\n
\n
// Assign the element to a variable\n
.ready(function (g) {\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
});\n
})\n
\n
/////////////////////////////////////////////////////////////////\n
// handle acquisition\n
/////////////////////////////////////////////////////////////////\n
.declareAcquiredMethod("redirect", "redirect")\n
.declareAcquiredMethod("translateHtml", "translateHtml")\n
\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
.declareMethod("render", function () {\n
var gadget = this;\n
\n
// XXX: Lot of DOM touches\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.translateHtml(gadget.props.element.innerHTML);\n
})\n
.push(function (my_translated_html) {\n
gadget.props.element.innerHTML = my_translated_html;\n
});\n
})\n
\n
.declareService(function () {\n
var form_gadget = this;\n
// Listen to form submit\n
return new RSVP.Queue()\n
.push(function () {\n
return promiseEventListener(\n
form_gadget.props.element.querySelector(\'form\'),\n
\'submit\',\n
false\n
);\n
})\n
.push(function (evt) {\n
var form = evt.target,\n
login = form.elements[0].value,\n
passwd = form.elements[1].value;\n
\n
document.cookie = "__ac=" + window.btoa(login + ":" + passwd);\n
// XXX Hardcoded non generic redirection to the frontpage\n
return form_gadget.redirect({command: \'display\', options: {}});\n
});\n
\n
});\n
}(window, document, rJS, RSVP, promiseEventListener));</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget ERP5 Login JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1406898406.08</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.44927.40202.16725</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1446127708.36</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1406817511.27</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -121,15 +121,19 @@
\n
</head>\n
<body>\n
<form class="logout">\n
<label style="font-size: xx-large;color: red;">Do you want to logout?</label>\n
<fieldset class="ui-grid-a">\n
\t\t\t\t\t<div class="ui-btn ui-btn-b ui-input-btn ui-corner-all ui-icon-carat-r ui-btn-icon-right">\n
<span>Logout</span>\n
<input data-enhanced="true" type="submit" data-i18n="[value]Logout" value="Logout">\n
</div> \n
\t\t\t</fieldset>\n
\t\t </form>\n
\n
<article class="ui-content ui-body-c">\n
<section class="ui-content-header-plain">\n
<h3 class="ui-content-title ui-body-c" data-i18n="Logout">Logout</h3>\n
</section>\n
<section class="ui-body-c ui-content-section">\n
<form class="logout">\n
\n
<input data-theme="b" data-inline="true" type="submit" data-i18n="[value]Confirm" value="Confirm" data-icon="check" />\n
\n
</form>\n
</section>\n
</article>\n
</body>\n
</html>
......@@ -254,7 +258,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>xiaowu</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -268,7 +272,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>942.41536.11910.9335</string> </value>
<value> <string>947.45437.59333.59426</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -286,7 +290,7 @@
</tuple>
<state>
<tuple>
<float>1430206095.07</float>
<float>1449755433.81</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -99,9 +99,9 @@
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string>/*global window, document, rJS, RSVP, promiseEventListener */\n
/*jslint indent: 2, maxerr: 3 */\n
(function (window, document, rJS, RSVP, promiseEventListener) {\n
<value> <string>/*global window, rJS, RSVP, promiseEventListener, UriTemplate */\n
/*jslint indent: 2, maxerr: 3, nomen: true */\n
(function (window, rJS, RSVP, promiseEventListener, UriTemplate) {\n
"use strict";\n
\n
rJS(window)\n
......@@ -124,6 +124,8 @@
// handle acquisition\n
/////////////////////////////////////////////////////////////////\n
.declareAcquiredMethod("redirect", "redirect")\n
.declareAcquiredMethod("getUrlFor", "getUrlFor")\n
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")\n
.declareAcquiredMethod("translateHtml", "translateHtml")\n
\n
/////////////////////////////////////////////////////////////////\n
......@@ -140,22 +142,41 @@
});\n
})\n
.declareService(function () {\n
var form_gadget = this;\n
var gadget = this,\n
logout_url_template;\n
// Listen to form submit\n
return new RSVP.Queue()\n
.push(function () {\n
return promiseEventListener(\n
form_gadget.props.element.querySelector(\'form\'),\n
gadget.props.element.querySelector(\'form\'),\n
\'submit\',\n
false\n
);\n
})\n
.push(function () {\n
document.cookie = "__ac=" + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;";\n
return form_gadget.redirect({command: \'display\', options: {page: \'login\'}});\n
return gadget.jio_getAttachment(\n
\'acl_users\',\n
\'links\'\n
);\n
})\n
.push(function (links) {\n
logout_url_template = links._links.logout.href;\n
return gadget.getUrlFor({\n
command: \'display\',\n
absolute_url: true,\n
options: {}\n
});\n
})\n
.push(function (came_from) {\n
return gadget.redirect({\n
command: \'raw\',\n
options: {\n
url: UriTemplate.parse(logout_url_template).expand({came_from: came_from})\n
}\n
});\n
});\n
});\n
}(window, document, rJS, RSVP, promiseEventListener));</string> </value>
}(window, rJS, RSVP, promiseEventListener, UriTemplate));</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -276,7 +297,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -290,7 +311,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.39092.31370.59716</string> </value>
<value> <string>947.45416.32910.41454</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -308,8 +329,8 @@
</tuple>
<state>
<tuple>
<float>1445528976.8</float>
<string>GMT</string>
<float>1449754121.57</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -109,9 +109,9 @@
<key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global window, rJS, RSVP, loopEventListener, document, jIO, URI */\n
/*global window, rJS, RSVP, loopEventListener, document, jIO, URI, URL */\n
/*jslint nomen: true, indent: 2 */\n
(function (window, rJS, RSVP, loopEventListener, document, jIO, URI) {\n
(function (window, rJS, RSVP, loopEventListener, document, jIO, URI, URL) {\n
"use strict";\n
\n
// Keep reference of the latest allDocs params which reach to this view\n
......@@ -127,6 +127,8 @@
PREFIX_COMMAND = "!",\n
// PREFIX_ERROR = "?",\n
COMMAND_DISPLAY_STATE = "display",\n
COMMAND_LOGIN = "login",\n
COMMAND_RAW = "raw",\n
COMMAND_DISPLAY_STORED_STATE = "display_stored_state",\n
COMMAND_CHANGE_STATE = "change",\n
COMMAND_STORE_AND_CHANGE_STATE = "store_and_change",\n
......@@ -146,6 +148,8 @@
VALID_URL_COMMAND_DICT[COMMAND_SELECTION_NEXT] = null;\n
VALID_URL_COMMAND_DICT[COMMAND_HISTORY_PREVIOUS] = null;\n
VALID_URL_COMMAND_DICT[COMMAND_PUSH_HISTORY] = null;\n
VALID_URL_COMMAND_DICT[COMMAND_LOGIN] = null;\n
VALID_URL_COMMAND_DICT[COMMAND_RAW] = null;\n
\n
\n
function endsWith(str, suffix) {\n
......@@ -218,6 +222,9 @@
// Build URL functions\n
//////////////////////////////////////////////////////////////////\n
function getCommandUrlFor(gadget, command, options) {\n
if (command === COMMAND_RAW) {\n
return options.url;\n
}\n
var result = "#" + PREFIX_COMMAND + (command || ""),\n
prefix = "?",\n
key,\n
......@@ -249,6 +256,10 @@
prefix = "&";\n
}\n
}\n
if (command === COMMAND_LOGIN) {\n
// Build URL template to allow getting user information\n
result += \'{\' + prefix + \'n.me}\';\n
}\n
return result;\n
}\n
\n
......@@ -575,6 +586,15 @@
return addNavigationHistoryAndDisplay(gadget, next_jio_key, options);\n
});\n
}\n
\n
\n
function execLoginCommand(gadget, previous_options, next_options) {\n
var me = next_options.me;\n
return gadget.setSetting(\'me\', me)\n
.push(function () {\n
return execDisplayCommand(gadget, previous_options);\n
});\n
}\n
\n
//////////////////////////////////////////////////////////////////\n
// Command URL functions\n
......@@ -632,7 +652,7 @@
);\n
}\n
\n
command_options.args.jio_key = command_options.path;\n
command_options.args.jio_key = command_options.path || undefined;\n
\n
// Store current options to handle navigation\n
gadget.props.options = JSON.parse(JSON.stringify(command_options.args));\n
......@@ -706,6 +726,9 @@
if (command_options.path === COMMAND_PUSH_HISTORY) {\n
return execPushHistoryCommand(gadget, previous_options, next_options);\n
}\n
if (command_options.path === COMMAND_LOGIN) {\n
return execLoginCommand(gadget, previous_options, next_options);\n
}\n
throw new Error(\'Unsupported command \' + command_options.path);\n
\n
}\n
......@@ -813,22 +836,30 @@
\n
.declareMethod(\'getCommandUrlFor\', function (options) {\n
var command = options.command,\n
absolute_url = options.absolute_url,\n
hash,\n
args = options.options,\n
valid = true,\n
key;\n
// Only authorize \'command\' and \'options\' keys\n
// Only authorize \'command\', \'options\', \'absolute_url\' keys\n
// Drop all other kind of parameters, to detect issue more easily\n
for (key in options) {\n
if (options.hasOwnProperty(key)) {\n
if ((key !== \'command\') && (key !== \'options\')) {\n
if ((key !== \'command\') && (key !== \'options\') && (key !== \'absolute_url\')) {\n
valid = false;\n
}\n
}\n
}\n
if (valid && (options.command) && (VALID_URL_COMMAND_DICT.hasOwnProperty(options.command))) {\n
return getCommandUrlFor(this, command, args);\n
hash = getCommandUrlFor(this, command, args);\n
} else {\n
hash = getCommandUrlFor(this, \'error\', options);\n
}\n
\n
if (absolute_url) {\n
hash = new URL(hash, window.location.href).href;\n
}\n
return getCommandUrlFor(this, \'error\', options);\n
return hash;\n
})\n
\n
.declareMethod(\'redirect\', function (options) {\n
......@@ -869,6 +900,7 @@
.declareAcquiredMethod(\'renderApplication\', \'renderApplication\')\n
.declareAcquiredMethod(\'jio_allDocs\', \'jio_allDocs\')\n
.declareAcquiredMethod(\'jio_getAttachment\', \'jio_getAttachment\')\n
.declareAcquiredMethod(\'setSetting\', \'setSetting\')\n
\n
.declareService(function () {\n
var gadget = this;\n
......@@ -882,7 +914,7 @@
});\n
});\n
\n
}(window, rJS, RSVP, loopEventListener, document, jIO, URI));\n
}(window, rJS, RSVP, loopEventListener, document, jIO, URI, URL));\n
]]></string> </value>
......@@ -1014,7 +1046,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>947.22494.14742.48810</string> </value>
<value> <string>947.43761.4655.1297</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -1032,7 +1064,7 @@
</tuple>
<state>
<tuple>
<float>1448465284.7</float>
<float>1449754197.93</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -109,11 +109,23 @@
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<key> <string>__translation_dict</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
......@@ -138,13 +150,45 @@
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_login</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_logout</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
<item>
......@@ -155,6 +199,14 @@
</tuple>
</value>
</item>
<item>
<key> <string>configuration_login</string> </key>
<value> <string>connection/login_form{?came_from}</string> </value>
</item>
<item>
<key> <string>configuration_logout</string> </key>
<value> <string>connection/WebSite_logout{?came_from}</string> </value>
</item>
<item>
<key> <string>container_layout</string> </key>
<value> <string>ERP5Document_getHateoas</string> </value>
......@@ -227,6 +279,12 @@
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -241,7 +299,15 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -256,4 +322,12 @@
</dictionary>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Section" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>__before_publishing_traverse__</string> </key>
<value>
<object>
<klass>
<global name="MultiHook" module="ZPublisher.BeforeTraverse"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_defined_in_class</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_hookname</string> </key>
<value> <string>__before_publishing_traverse__</string> </value>
</item>
<item>
<key> <string>_list</string> </key>
<value>
<list>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</list>
</value>
</item>
<item>
<key> <string>_prior</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>__before_traverse__</string> </key>
<value>
<dictionary>
<item>
<key>
<tuple>
<int>99</int>
<string>ERP5 Web Section/connection</string>
</tuple>
</key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>caching_policy/no-cache</string>
</tuple>
</value>
</item>
<item>
<key> <string>container_layout</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>content_layout</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>empty_criterion_valid</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>connection</string> </value>
</item>
<item>
<key> <string>layout_configuration_form_id</string> </key>
<value> <string>WebSection_viewRenderJSPreference</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Section</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>skin_selection_name</string> </key>
<value> <string>RJS</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Connection</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="WebSectionTraversalHook" module="Products.ERP5.Document.WebSection"/>
</pickle>
<pickle>
<dictionary/>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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 encoding="cdata"><![CDATA[
REQUEST = context.REQUEST\n
RESPONSE = REQUEST.RESPONSE\n
from ZTUtils import make_query\n
\n
portal = context.getPortalObject()\n
\n
if (came_from is None):\n
came_from = context.getPermanentURL(context)\n
\n
portal.portal_skins.updateSkinCookie()\n
portal.setupCurrentSkin()\n
\n
if (portal.portal_membership.isAnonymousUser()):\n
RESPONSE.expireCookie(\'__ac\', path=\'/\')\n
url = \'%s/login_form?portal_status_message=%s\' % (context.absolute_url(), context.Base_translateString(\'Login and/or password is incorrect.\'))\n
url = came_from and \'%s&came_from=%s\' % (url, came_from) or url;\n
RESPONSE.redirect(url)\n
else:\n
# XXX Hardcoded behaviour for JS app.\n
# Expect came_from to be an URL template\n
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
if (person is None):\n
came_from = came_from.replace(\'{&n.me}\', \'\')\n
else:\n
came_from = came_from.replace(\'{&n.me}\', \'&%s\' % make_query({\'n.me\': person.getRelativeUrl()}))\n
# RESPONSE.redirect(came_from or context.getPermanentURL(context));\n
RESPONSE.setHeader(\'Location\', came_from or context.getPermanentURL(context))\n
RESPONSE.setStatus(303)\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>came_from=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_login</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>_Access_contents_information_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_bindings_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_cache_settings_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_permissions_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_WebDAV_Locks_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_properties_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Take_ownership_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Undo_changes_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_View_management_screens_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Lock_items_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Unlock_items_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_access_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</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>"""\n
Default logout handler, overwritten to give website specific portal status message.\n
"""\n
website = context.getWebSiteValue()\n
REQUEST = context.REQUEST\n
if REQUEST.has_key(\'portal_skin\'):\n
context.portal_skins.clearSkinCookie()\n
REQUEST.RESPONSE.expireCookie(\'__ac\', path=\'/\')\n
REQUEST.RESPONSE.setHeader(\'Location\', came_from or context.getPermanentURL(context))\n
REQUEST.RESPONSE.setStatus(303)\n
# REQUEST.RESPONSE.redirect(came_from or context.getPermanentURL(context));\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>came_from=\'\', **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_logout</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Logout handler</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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[
<html class="ui-mobile">\n
<head>\n
<meta charset="UTF-8">\n
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">\n
\n
<title tal:content="python: here.getPortalObject().getTitle()"></title>\n
\n
<link rel="stylesheet" href="gadget_erp5.css">\n
<link rel="stylesheet" href="jquerymobile.css">\n
\n
</head>\n
<body class="ui-mobile-viewport ui-overlay-a" tal:define="form_action string:WebSite_login;">\n
<div class="ui-hidden-accessible gadget-container"></div>\n
\n
<div data-role="page" data-url="/" tabindex="0" class="ui-page ui-page-theme-a ui-page-header-fixed ui-page-active" style="padding-top: 36px; min-height: 939px;">\n
\n
<div data-role="header" class="gadget-header ui-header ui-bar-a ui-header-fixed slidedown" data-theme="a" data-position="fixed" data-tap-toggle="false" role="banner">\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">\n
<div class="ui-controlgroup-controls">\n
</div>\n
</div>\n
<span>\n
<h1 class="ui-title" tal:content="python: here.getPortalObject().getTitle()"></h1>\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">\n
<div class="ui-controlgroup-controls">\n
</div>\n
</div></span>\n
<div class="ui-navbar ui-subheader ui-grid-container ui-body-a" role="navigation">\n
\t\t<ul class="ui-grid-d">\n
\t </ul>\n
</div>\n
</div>\n
<div role="main" class="ui-content gadget-content">\n
<article class="ui-content ui-body-c">\n
<section class="ui-content-header-plain">\n
<h3 class="ui-content-title ui-body-c" data-i18n="Connect">Connect</h3>\n
</section>\n
<section class="ui-body-c ui-content-section">\n
<form class="login-form" method="post" tal:attributes="action python: \'%s/\' % context.absolute_url()">\n
\n
<div class="ui-field-contain">\n
<label data-i18n="Login">Login<span></span></label>\n
<div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"><input autofocus type="text" name="__ac_name" placeholder="Ex: john" value="" required=""></div>\n
</div>\n
<div class="ui-field-contain">\n
<label data-i18n="Password">Password<span></span></label>\n
<div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"><input type="password" name="__ac_password" placeholder="Ex: A1bcF$99" value="" required=""></div>\n
</div><br/>\n
<div class="ui-btn ui-input-btn ui-btn-b ui-corner-all ui-shadow ui-btn-inline">Log In<input data-theme="b" data-inline="true" type="submit" data-i18n="[value]Log In" value="Login" data-icon="check" tal:attributes="name python: \'%s:method\' % (form_action, )"/></div>\n
\n
<input type="hidden" name="url" tal:attributes="value python: context.absolute_url()" />\n
\n
<input tal:condition="exists: request/came_from"\n
type="hidden" name="came_from"\n
tal:attributes="value request/came_from" />\n
</form>\n
</section>\n
</article>\n
</div>\n
</div>\n
<div class="ui-loader ui-corner-all ui-body-a ui-loader-default"><h1>loading</h1></div><div class="ui-panel-dismiss"></div>\n
</body>\n
</html>
]]></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>login_form</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>
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