diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isReferenceUnique.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isReferenceUnique.xml new file mode 100644 index 0000000000000000000000000000000000000000..4d794312446a36752f3214708cb0de8d5aba702e --- /dev/null +++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/Base_isReferenceUnique.xml @@ -0,0 +1,142 @@ +<?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>"""\n + External validator for login_form\n + that checks that reference is unique into the system.\n +"""\n +kw={\'reference\': editor,\n + \'portal_type\': [\'Person\', \'Credential Request\']}\n +email = context.portal_catalog.getResultValue(**kw)\n +if email is not None:\n + return 0\n +return 1\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>editor, request</string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>2</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>editor</string> + <string>request</string> + <string>kw</string> + <string>_apply_</string> + <string>_getattr_</string> + <string>context</string> + <string>email</string> + <string>None</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Base_isReferenceUnique</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/login_form/your_default_email_text.xml b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/login_form/your_default_email_text.xml index 8d1309090dd22ae9c46c00881e0b6e94e53fb5c8..9d3e2fac951d5364ab666eeece2f0df3ac98d966 100644 --- a/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/login_form/your_default_email_text.xml +++ b/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/login_form/your_default_email_text.xml @@ -11,6 +11,15 @@ <value> <list> <string>enabled</string> + <string>external_validator</string> + </list> + </value> + </item> + <item> + <key> <string>delegated_message_list</string> </key> + <value> + <list> + <string>external_validator_failed</string> </list> </value> </item> @@ -24,7 +33,7 @@ <dictionary> <item> <key> <string>external_validator_failed</string> </key> - <value> <string>The input failed the external validator.</string> </value> + <value> <string>Email is already used into the system. Please try new one.</string> </value> </item> </dictionary> </value> @@ -81,6 +90,12 @@ <key> <string>enabled</string> </key> <value> <int>1</int> </value> </item> + <item> + <key> <string>external_validator</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string>your_default_email_text</string> </value> @@ -112,4 +127,17 @@ </dictionary> </pickle> </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="Method" module="Products.Formulator.MethodField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>method_name</string> </key> + <value> <string>Base_isReferenceUnique</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_km/bt/revision b/bt5/erp5_km/bt/revision index 3a2ac0e3fa68bbe9eded20380ed1c7ffcb27c6cb..9b21444cdb612fa3ae69eee9f48e31d937a3531a 100644 --- a/bt5/erp5_km/bt/revision +++ b/bt5/erp5_km/bt/revision @@ -1 +1 @@ -1701 \ No newline at end of file +1703 \ No newline at end of file