Commit 0de109f2 authored by Romain Courteaud's avatar Romain Courteaud

Separate external account login form.

parent 65432885
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>vifib_external_account</skin_folder>
<skin_selection>Hosting</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>85.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>vifib_external_account</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></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>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<tal:block tal:define="form_action string:logged_in;\n
global form_id string:login_form;\n
js_list python: [\'%s/login_form.js\' % (here.portal_url(), ), \'%s/erp5.js\' % (here.portal_url(), )]">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="main">\n
<div class="content login">\n
<tal:block tal:condition="python: request.get(\'came_from\', None) is None">\n
<h1 i18n:translate="" i18n:domain="ui">Log in</h1>\n
</tal:block>\n
<tal:block tal:condition="python: request.get(\'came_from\', None) is not None">\n
<h1 i18n:translate="" i18n:domain="ui">Please login before continue.</h1>\n
</tal:block>\n
<tal:block tal:condition="python: request.get(\'came_from\', None) is not None">\n
<tal:block tal:define="dummy python: request.RESPONSE.setCookie(\'redirect_after_login\', request.get(\'came_from\'), path=\'/\')"></tal:block>\n
</tal:block>\n
<fieldset>\n
<script src="https://browserid.org/include.js" type="text/javascript"></script> \n
<div class="field nolabel validate widthAuto forgotten_password center"><br/><br/>\n
If you have Google or Facebook accounts feel free to use any of them to signup<br/><br/>\n
<a class="zocial facebook" href="./login_with_facebook">Signup with Facebook</a> or \n
<a class="zocial google" href="./login_with_google">Signup with Google</a><br/><br/>\n
You are not connected with social network? So then use BrowserID <a href="#" id="browserid" title="Sign-in with BrowserID"> <img src="./vifib_image/browser_id_logo.png" alt="Sign-in with BrowserID" title="Sign-in with BrowserID"></a>\n
</div>\n
<browserid id="browser_id_login" tal:attributes=\'value python: here.getWebSiteValue().login_with_browser_id.absolute_url()\'/>\n
<script type="text/javascript">\n
$(\'#browserid\').click(function() {\n
navigator.id.get(gotAssertion);\n
return false;\n
});\n
\n
function post_to_url(path, params, method) {\n
method = method || "post"; // Set method to post by default, if not specified.\n
\n
// The rest of this code assumes you are not using a library.\n
// It can be made less wordy if you use one.\n
var form = document.createElement("form");\n
form.setAttribute("method", method);\n
form.setAttribute("action", path);\n
\n
for(var key in params) {\n
if(params.hasOwnProperty(key)) {\n
var hiddenField = document.createElement("input");\n
hiddenField.setAttribute("type", "hidden");\n
hiddenField.setAttribute("name", key);\n
hiddenField.setAttribute("value", params[key]);\n
\n
form.appendChild(hiddenField);\n
}\n
}\n
\n
document.body.appendChild(form);\n
form.submit();\n
}\n
\n
function gotAssertion(assertion) { \n
// got an assertion, now send it up to the server for verification \n
if (assertion !== null) { \n
post_to_url($(\'#browser_id_login\').attr(\'value\'), {\'assertion\': assertion})\n
} \n
} \n
</script>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></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>
......@@ -46,7 +46,7 @@
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<tal:block tal:define="form_action string:logged_in;\n
global form_id string:login_form;\n
global form_id string:traditional_login_form;\n
js_list python: [\'%s/login_form.js\' % (here.portal_url(), ), \'%s/erp5.js\' % (here.portal_url(), )]">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="main">\n
......
vifib_web
\ No newline at end of file
1
\ No newline at end of file
2
\ No newline at end of file
vifib_external_account | Hosting
\ No newline at end of file
vifib_external_account
\ No newline at end of file
......@@ -55,57 +55,56 @@
<h1 i18n:translate="" i18n:domain="ui">Log in</h1>\n
</tal:block>\n
<tal:block tal:condition="python: request.get(\'came_from\', None) is not None">\n
<h1 i18n:translate="" i18n:domain="ui">Please login before continue.</h1>\n
</tal:block>\n
<tal:block tal:condition="python: request.get(\'came_from\', None) is not None">\n
<tal:block tal:define="dummy python: request.RESPONSE.setCookie(\'redirect_after_login\', request.get(\'came_from\'), path=\'/\')"></tal:block>\n
<h1 i18n:translate="" i18n:domain="ui">You do not have enough permissions to access this page.</h1>\n
<p i18n:translate="" i18n:domain="ui">You can login with another user name or\n
<span i18n:name="go_back"><a href="javascript:history.back();" i18n:translate="">go back</a></span>.\n
</p>\n
</tal:block>\n
<input tal:condition="exists: request/came_from"\n
type="hidden" name="came_from"\n
tal:attributes="value request/came_from" />\n
<fieldset>\n
<script src="https://browserid.org/include.js" type="text/javascript"></script> \n
<div class="field nolabel validate widthAuto forgotten_password center"><br/><br/>\n
If you have Google or Facebook accounts feel free to use any of them to signup<br/><br/>\n
<a class="zocial facebook" href="./login_with_facebook">Signup with Facebook</a> or \n
<a class="zocial google" href="./login_with_google">Signup with Google</a><br/><br/>\n
You are not connected with social network? So then use BrowserID <a href="#" id="browserid" title="Sign-in with BrowserID"> <img src="./vifib_image/browser_id_logo.png" alt="Sign-in with BrowserID" title="Sign-in with BrowserID"></a>\n
<div class="field login_name">\n
<label for="name" class="required" i18n:translate="" i18n:domain="ui">Name</label>\n
<div class="input"><input type="text" name="__ac_name" id="name" tal:attributes="value python: request.get(\'__ac_name\') or \'\'" /></div>\n
<p class="clear"></p>\n
</div>\n
<div class="field login_password">\n
<label for="password" i18n:translate="" i18n:domain="ui">Password</label>\n
<div class="input"><input type="password" name="__ac_password" id="password" /></div>\n
<p class="clear"></p>\n
</div>\n
<div class="field login_remember">\n
<label for="cb_remember" i18n:translate="" i18n:domain="ui">Remember my name</label>\n
<div class="input"><input type="checkbox" name="__ac_persistent" value="1" checked="checked" id="cb_remember" /></div>\n
<p class="clear"></p>\n
</div>\n
<div class="field login_button">\n
<label>&nbsp;</label>\n
<div class="input">\n
<input type="submit" value="Login" class="submit"\n
tal:attributes="name python: \'%s:method\' % (form_action, )"\n
i18n:attributes="value" i18n:domain="ui" />\n
</div>\n
<p class="clear"></p>\n
</div>\n
<browserid id="browser_id_login" tal:attributes=\'value python: here.getWebSiteValue().login_with_browser_id.absolute_url()\'/>\n
<script type="text/javascript">\n
$(\'#browserid\').click(function() {\n
navigator.id.get(gotAssertion);\n
return false;\n
});\n
\n
function post_to_url(path, params, method) {\n
method = method || "post"; // Set method to post by default, if not specified.\n
\n
// The rest of this code assumes you are not using a library.\n
// It can be made less wordy if you use one.\n
var form = document.createElement("form");\n
form.setAttribute("method", method);\n
form.setAttribute("action", path);\n
\n
for(var key in params) {\n
if(params.hasOwnProperty(key)) {\n
var hiddenField = document.createElement("input");\n
hiddenField.setAttribute("type", "hidden");\n
hiddenField.setAttribute("name", key);\n
hiddenField.setAttribute("value", params[key]);\n
\n
form.appendChild(hiddenField);\n
}\n
}\n
\n
document.body.appendChild(form);\n
form.submit();\n
}\n
\n
function gotAssertion(assertion) { \n
// got an assertion, now send it up to the server for verification \n
if (assertion !== null) { \n
post_to_url($(\'#browser_id_login\').attr(\'value\'), {\'assertion\': assertion})\n
} \n
} \n
</script>\n
<div class="field forgotten_password">\n
<label>&nbsp;</label>\n
<div class="field nolabel validate widthAuto" title="">\n
<label>Join</label>\n
<a href="ERP5Site_viewCredentialRequestForm">Join</a>\n
</div>\n
<div class="field nolabel cancel widthAuto" title="">\n
<label>Lost password?</label>\n
<a href="ERP5Site_viewCredentialRecoveryLoginDialog">Lost password?</a>\n
</div>\n
</div>\n
</fieldset>\n
<script type="text/javascript">setFocus()</script>\n
<p i18n:translate="" i18n:domain="ui">Having trouble logging in? Make sure to enable cookies in your web browser.</p>\n
<p i18n:translate="" i18n:domain="ui">Do not forget to logout or exit your browser when you are done.</p>\n
<p i18n:translate="" i18n:domain="ui">Setting the \'Remember my name\' option will set a cookie with your username, so that when you login next time, your user name will already be filled in for you.</p>\n
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
......
491
\ No newline at end of file
492
\ 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