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 ...@@ -70,11 +70,15 @@ and redirect to the customize login page\'\'\'\n
\n \n
request = context.REQUEST\n request = context.REQUEST\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n \n
module_url = portal.web_site_module.egov_portal.absolute_url()\n module_url = portal.web_site_module.egov_portal.absolute_url()\n
form_id = \'view\'\n form_id = \'view\'\n
\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> </string> </value>
</item> </item>
<item> <item>
...@@ -121,9 +125,11 @@ return request[\'RESPONSE\'].redirect(\'%s/%s\' % (module_url, form_id))\n ...@@ -121,9 +125,11 @@ return request[\'RESPONSE\'].redirect(\'%s/%s\' % (module_url, form_id))\n
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
<string>portal</string> <string>portal</string>
<string>N_</string>
<string>module_url</string> <string>module_url</string>
<string>form_id</string> <string>form_id</string>
<string>_getitem_</string> <string>msg</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -65,7 +65,10 @@ ...@@ -65,7 +65,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 document = context.portal_catalog.getResultValue(uid=request_number)\n
if document is not None:\n if document is not None:\n
if document.getValidationState() == \'draft\':\n if document.getValidationState() == \'draft\':\n
...@@ -80,7 +83,7 @@ else:\n ...@@ -80,7 +83,7 @@ else:\n
\n \n
\n \n
# Prepare message\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 return context.Base_redirect(form_id=\'view\', keep_items = {\'portal_status_message\' : msg})\n
</string> </value> </string> </value>
</item> </item>
...@@ -127,9 +130,11 @@ return context.Base_redirect(form_id=\'view\', keep_items = {\'portal_status_mes ...@@ -127,9 +130,11 @@ return context.Base_redirect(form_id=\'view\', keep_items = {\'portal_status_mes
<string>request_number</string> <string>request_number</string>
<string>id</string> <string>id</string>
<string>kw</string> <string>kw</string>
<string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string>
<string>N_</string>
<string>None</string>
<string>document</string> <string>document</string>
<string>msg</string> <string>msg</string>
</tuple> </tuple>
......
...@@ -68,6 +68,8 @@ ...@@ -68,6 +68,8 @@
<value> <string>"""\n <value> <string>"""\n
Default logout handler, overwritten to give website specific portal status message.\n Default logout handler, overwritten to give website specific portal status message.\n
"""\n """\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
website = context.getWebSiteValue()\n website = context.getWebSiteValue()\n
form_id=\'view\'\n form_id=\'view\'\n
\n \n
...@@ -75,7 +77,7 @@ REQUEST = context.REQUEST\n ...@@ -75,7 +77,7 @@ REQUEST = context.REQUEST\n
if REQUEST.has_key(\'portal_skin\'):\n if REQUEST.has_key(\'portal_skin\'):\n
context.portal_skins.clearSkinCookie()\n context.portal_skins.clearSkinCookie()\n
REQUEST.RESPONSE.expireCookie(\'__ac\', path=\'/\')\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 return website.Base_redirect(form_id, keep_items = {\'portal_status_message\' : msg}, **kw)\n
</string> </value> </string> </value>
</item> </item>
...@@ -123,6 +125,8 @@ return website.Base_redirect(form_id, keep_items = {\'portal_status_message\' : ...@@ -123,6 +125,8 @@ return website.Base_redirect(form_id, keep_items = {\'portal_status_message\' :
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string>
<string>N_</string>
<string>website</string> <string>website</string>
<string>form_id</string> <string>form_id</string>
<string>REQUEST</string> <string>REQUEST</string>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> <global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/> <tuple/>
</tuple> </tuple>
</pickle> </pickle>
...@@ -28,12 +28,7 @@ ...@@ -28,12 +28,7 @@
<item> <item>
<key> <string>_asgns</string> </key> <key> <string>_asgns</string> </key>
<value> <value>
<dictionary> <dictionary/>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -42,32 +37,114 @@ ...@@ -42,32 +37,114 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_objects</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value>
<tuple/>
<tal:block metal:define-macro="master">\n </value>
<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>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>action</string> </key>
<value> <string>text/html</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>expand</string> </key> <key> <string>description</string> </key>
<value> <int>0</int> </value> <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>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>eGov_RegisterInformations</string> </value> <value> <string>eGov_RegisterInformations</string> </value>
</item> </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> <item>
<key> <string>title</string> </key> <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> <value> <string></string> </value>
</item> </item>
</dictionary> </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 ...@@ -237,7 +237,7 @@ div.fields div{\n
font: bold 12px Verdana, sans-serif;\n font: bold 12px Verdana, sans-serif;\n
}\n }\n
\n \n
.become_vip_member #register_button input{\n #register_button input{\n
margin-top:0.2em;\n margin-top:0.2em;\n
float: right;\n float: right;\n
font-weight: bold;\n font-weight: bold;\n
......
...@@ -496,6 +496,22 @@ div.section_explanation{\n ...@@ -496,6 +496,22 @@ div.section_explanation{\n
padding-top:1em;\n padding-top:1em;\n
padding-bottom:2em;\n padding-bottom:2em;\n
font-size: 1.3em;\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
\n \n
.section_description{\n .section_description{\n
...@@ -574,7 +590,8 @@ div.inline_label label{\n ...@@ -574,7 +590,8 @@ div.inline_label label{\n
----------------------------------------------------*/\n ----------------------------------------------------*/\n
\n \n
\n \n
fieldset.white_background{\n fieldset.white_background,\n
fieldset.register_informations{\n
background: white !important;\n background: white !important;\n
margin-right: auto !important;\n margin-right: auto !important;\n
margin-left: auto !important;\n margin-left: auto !important;\n
...@@ -583,10 +600,15 @@ fieldset.white_background{\n ...@@ -583,10 +600,15 @@ fieldset.white_background{\n
width:800px !important;\n width:800px !important;\n
}\n }\n
\n \n
fieldset.white_background .input{\n fieldset.white_background .input,\n
fieldset.register_informations .input{\n
padding: 0 2em 0 2em;\n padding: 0 2em 0 2em;\n
}\n }\n
\n \n
fieldset.register_informations{\n
margin-top:60px !important;\n
}\n
\n
.field .input .title{\n .field .input .title{\n
margin-top: 1em;\n margin-top: 1em;\n
margin-bottom:0.5em;\n margin-bottom:0.5em;\n
......
...@@ -68,13 +68,9 @@ Description:\n ...@@ -68,13 +68,9 @@ Description:\n
jutificatif,... without having to move or to queue. For more\n jutificatif,... without having to move or to queue. For more\n
information, please click\n information, please click\n
</tal:block>\n </tal:block>\n
<a href="#more_information" i18n:domain="ui" i18n:translate="">here</a>.\n <a href="eGov_RegisterInformations" 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
</div>\n </div>\n
<tal:block metal:use-macro="here/WebSite_viewRegisterButton/macros/main"/>\n
</div>\n </div>\n
</tal:block>\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 63
\ 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