Commit 0916977a authored by Fabien Morin's avatar Fabien Morin

- add a message on login_form redirection if user haven't enought permission to access a document

- add Base_translateString function on some scripts
- replace the register button by a macro because of using it on two places
- add a form for explain why it's important to register to eGov
- add css selectors for the new pages

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19829 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 597ddca7
......@@ -70,11 +70,15 @@ and redirect to the customize login page\'\'\'\n
\n
request = context.REQUEST\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
module_url = portal.web_site_module.egov_portal.absolute_url()\n
form_id = \'view\'\n
\n
return request[\'RESPONSE\'].redirect(\'%s/%s\' % (module_url, form_id))\n
msg = ""\n
if request.get(\'came_from\', None) is not None:\n
msg = "%s. %s" % (N_("You don\'t have enough permissions to access this page"), N_("You can log in with another user name"))\n
return context.Base_redirect(\'%s/%s\' % (module_url, form_id), keep_items = {\'portal_status_message\' : msg})\n
</string> </value>
</item>
<item>
......@@ -121,9 +125,11 @@ return request[\'RESPONSE\'].redirect(\'%s/%s\' % (module_url, form_id))\n
<string>context</string>
<string>request</string>
<string>portal</string>
<string>N_</string>
<string>module_url</string>
<string>form_id</string>
<string>_getitem_</string>
<string>msg</string>
<string>None</string>
</tuple>
</value>
</item>
......
......@@ -65,7 +65,10 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if request_number is not None:\n
<value> <string>portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
if request_number is not None:\n
document = context.portal_catalog.getResultValue(uid=request_number)\n
if document is not None:\n
if document.getValidationState() == \'draft\':\n
......@@ -80,7 +83,7 @@ else:\n
\n
\n
# Prepare message\n
msg = "Sorry, this document is not available"\n
msg = N_(\'Sorry, this document is not available\')\n
return context.Base_redirect(form_id=\'view\', keep_items = {\'portal_status_message\' : msg})\n
</string> </value>
</item>
......@@ -127,9 +130,11 @@ return context.Base_redirect(form_id=\'view\', keep_items = {\'portal_status_mes
<string>request_number</string>
<string>id</string>
<string>kw</string>
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>None</string>
<string>document</string>
<string>msg</string>
</tuple>
......
......@@ -68,6 +68,8 @@
<value> <string>"""\n
Default logout handler, overwritten to give website specific portal status message.\n
"""\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
website = context.getWebSiteValue()\n
form_id=\'view\'\n
\n
......@@ -75,7 +77,7 @@ REQUEST = context.REQUEST\n
if REQUEST.has_key(\'portal_skin\'):\n
context.portal_skins.clearSkinCookie()\n
REQUEST.RESPONSE.expireCookie(\'__ac\', path=\'/\')\n
msg = context.Base_translateString(\'You have been logged out. Thank you for using this website.\')\n
msg = N_(\'You have been logged out. Thank you for using this website.\')\n
return website.Base_redirect(form_id, keep_items = {\'portal_status_message\' : msg}, **kw)\n
</string> </value>
</item>
......@@ -123,6 +125,8 @@ return website.Base_redirect(form_id, keep_items = {\'portal_status_message\' :
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>website</string>
<string>form_id</string>
<string>REQUEST</string>
......
......@@ -3,7 +3,7 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle>
......@@ -28,12 +28,7 @@
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
<dictionary/>
</value>
</item>
</dictionary>
......@@ -42,32 +37,114 @@
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block metal:define-macro="master">\n
<div id="register_information">\n
Here you will find all informations that explain why it\'s important to register to SAFI.\n
</div>\n
</tal:block>\n
]]></string> </value>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>register_informations</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>register_informations</string> </key>
<value>
<list>
<string>explanation_head</string>
<string>percpective_vue</string>
<string>explanation_body</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>eGov_RegisterInformations</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>PDFDocument_viewHistory</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Register Informations</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -237,7 +237,7 @@ div.fields div{\n
font: bold 12px Verdana, sans-serif;\n
}\n
\n
.become_vip_member #register_button input{\n
#register_button input{\n
margin-top:0.2em;\n
float: right;\n
font-weight: bold;\n
......
......@@ -496,6 +496,22 @@ div.section_explanation{\n
padding-top:1em;\n
padding-bottom:2em;\n
font-size: 1.3em;\n
text-align: justify ;\n
}\n
\n
.member_explanation_picture,\n
.member_explanation_body{\n
float:left;\n
clear:none !important;\n
width:50%;\n
}\n
\n
.become_member_body{\n
margin-bottom:1.5em;\n
}\n
\n
fieldset.fieldset_register_informations{\n
width:100%\n
}\n
\n
.section_description{\n
......@@ -574,7 +590,8 @@ div.inline_label label{\n
----------------------------------------------------*/\n
\n
\n
fieldset.white_background{\n
fieldset.white_background,\n
fieldset.register_informations{\n
background: white !important;\n
margin-right: auto !important;\n
margin-left: auto !important;\n
......@@ -583,10 +600,15 @@ fieldset.white_background{\n
width:800px !important;\n
}\n
\n
fieldset.white_background .input{\n
fieldset.white_background .input,\n
fieldset.register_informations .input{\n
padding: 0 2em 0 2em;\n
}\n
\n
fieldset.register_informations{\n
margin-top:60px !important;\n
}\n
\n
.field .input .title{\n
margin-top: 1em;\n
margin-bottom:0.5em;\n
......
......@@ -68,13 +68,9 @@ Description:\n
jutificatif,... without having to move or to queue. For more\n
information, please click\n
</tal:block>\n
<a href="#more_information" i18n:domain="ui" i18n:translate="">here</a>.\n
</div>\n
<div id="register_button">\n
<input i18n:domain="ui" i18n:attributes="value" type="submit"\n
name="search_area/WebSite_viewQuickSearchResultList:method"\n
value="Register >>"/>\n
<a href="eGov_RegisterInformations" i18n:domain="ui" i18n:translate="">here</a>.\n
</div>\n
<tal:block metal:use-macro="here/WebSite_viewRegisterButton/macros/main"/>\n
</div>\n
</tal:block>\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string>multipart/form-data</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>white_background</string>
<string>right</string>
<string>bottom</string>
<string>center</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>white_background</string> </key>
<value>
<list>
<string>listbox</string>
<string>my_title</string>
<string>listbox_creation_date</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_viewPendingRequests</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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_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> <string encoding="cdata"><![CDATA[
<!-- ============================================================== -->\n
<!--\n
Description:\n
This macro render a invitation to becom vip member panel.\n
-->\n
\n
<tal:block metal:define-macro="main">\n
<div id="register_button">\n
<input i18n:domain="ui" i18n:attributes="value" type="submit"\n
name="search_area/WebSite_viewQuickSearchResultList:method"\n
value="Register >>"/>\n
</div>\n
</tal:block>\n
]]></string> </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>WebSite_viewRegisterButton</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>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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_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[
<!-- ============================================================== -->\n
<!--\n
Description:\n
This macro render an explanation of why it\'s important to become a member.\n
-->\n
\n
<tal:block metal:define-macro="main">\n
<div class="become_member_body section_explanation">\n
<tal:block i18n:translate="" i18n:domain="ui">\n
Une fois inscrit, vous pouvez b\xc3\xa9n\xc3\xa9ficier des avantages suivants :\n
</tal:block>\n
<ul>\n
<li i18n:translate="" i18n:domain="ui">r\xc3\xa9glage des pr\xc3\xa9f\xc3\xa9rences et\n
s\xc3\xa9l\xc3\xa9ction d\'un moyen de suivi des proc\xc3\xa9dures (mail, sms)</li>\n
<li i18n:translate="" i18n:domain="ui">vue d\'ensemble sur toutes\n
les proc\xc3\xa9dures en cours</li>\n
<li i18n:translate="" i18n:domain="ui">r\xc3\xa9utilisation facile de\n
documents d\xc3\xa9j\xc3\xa0 utilis\xc3\xa9s dans une proc\xc3\xa9dure</li>\n
<li i18n:translate="" i18n:domain="ui">v\xc3\xa9rification de l\'authenticit\xc3\xa9\n
de documents</li>\n
<li i18n:translate="" i18n:domain="ui">r\xc3\xa9alisation de toutes les\n
proc\xc3\xa9dures administratives sur une seule et m\xc3\xaame plateforme</li>\n
<li i18n:translate="" i18n:domain="ui">gain de temps : plus besoin\n
de se d\xc3\xa9placer pour faire la queue au guichet</li>\n
</ul>\n
</div>\n
<tal:block metal:use-macro="here/WebSite_viewRegisterButton/macros/main"/>\n
<br />\n
<br />\n
<br />\n
<a href="lien" tal:attributes="href python:\'%s/%s\' % (context.absolute_url(), \'view\')"\n
i18n:translate="" i18n:domain="ui">Retour \xc3\xa0 l\'accueil</a>\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>WebSite_viewRegisterInformationBody</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>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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_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[
<!-- ============================================================== -->\n
<!--\n
Description:\n
This macro render an explanation of why it\'s important to become a member.\n
-->\n
\n
<tal:block metal:define-macro="main">\n
<div class="become_member_head section_explanation" i18n:translate="" i18n:domain="ui">\n
Le portail SAFI permet d\'effectuer des formalit\xc3\xa9s administratives en ligne.\n
Il est possible d\'effectuer des demandes sans \xc3\xaatre inscrit (demande\n
anonymes), toutefois, l\'inscription est vivement conseill\xc3\xa9e.\n
</div>\n
</tal:block>\n
]]></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>WebSite_viewRegisterInformationHead</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
31
\ No newline at end of file
63
\ 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