Commit 866801a4 authored by Nicolas Delaby's avatar Nicolas Delaby

replace birthday by date of birth

The property sheet CredentialRequest was used to override birthday property from Person property sheet.
Because Person.birthday stores its value in start_date attribute.

Because property surcharge behaviour is not predictable (Which accesor will be took ?), CrendentialRequest now introduce date_of_birth property.
It avoid collision with start_date property which is also defined on Tickets.

All dialog action keeps birthday as input parameter to not break backward compatibility
my_date_of_birth_field is able to display getBirthday value to not break UI for ancient documents.
parent 60bbe8b6
......@@ -28,6 +28,10 @@
<key> <string>id</string> </key>
<value> <string>CredentialRequest</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
......
......@@ -6,23 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>mode</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
......@@ -33,15 +16,13 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Date of birth</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>birthday_property</string> </value>
</item>
<item>
<key> <string>mode</string> </key>
<value> <string>w</string> </value>
<value> <string>date_of_birth_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -154,6 +154,8 @@
<string>my_dialog_mode_conditional_default_credential_question_question_free_text</string>
<string>my_dialog_mode_reference</string>
<string>my_dialog_mode_required_default_email_text</string>
<string>my_dialog_mode_date_of_birth</string>
<string>my_view_mode_date_of_birth</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_dialog_mode_date_of_birth</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Date of birth</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Date of Birth</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_view_mode_date_of_birth</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The date of birth for the person.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Date of Birth</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getDateOfBirth() or here.getBirthday() or None</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -112,7 +112,7 @@
<string>my_default_telephone_text</string>
<string>my_default_mobile_telephone_text</string>
<string>my_default_email_text</string>
<string>my_birthday</string>
<string>my_date_of_birth</string>
<string>my_nationality</string>
<string>my_activity_list</string>
<string>my_skill_list</string>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_birthday</string> </value>
<value> <string>my_date_of_birth</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_birthday</string> </value>
<value> <string>my_view_mode_date_of_birth</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
......@@ -64,6 +64,7 @@ person_mapping = (\n
(\'last_name\', \'last_name\'),\n
(\'gender\', \'gender\'),\n
(\'birthday\', \'birthday\'),\n
(\'date_of_birth\', \'birthday\'),\n
(\'nationality\', \'nationality\'),\n
(\'default_email_text\', \'default_email_text\'),\n
(\'default_telephone_text\', \'default_telephone_text\'),\n
......
......@@ -117,7 +117,7 @@
<string>my_default_telephone_text</string>
<string>my_default_mobile_telephone_text</string>
<string>my_default_email_text</string>
<string>my_birthday</string>
<string>my_date_of_birth</string>
<string>my_nationality</string>
<string>my_activity_list</string>
<string>my_skill_list</string>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_birthday</string> </value>
<value> <string>my_date_of_birth</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_birthday</string> </value>
<value> <string>my_view_mode_date_of_birth</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
......@@ -78,7 +78,8 @@ credential_request = module.newContent(\n
site=site,\n
activity_list=activity_list,\n
corporate_name=corporate_name,\n
birthday=birthday)\n
birthday=birthday,\n
date_of_birth=date_of_birth)\n
\n
#We attach the current user to the credential request if not anonymous\n
if not context.portal_membership.isAnonymousUser():\n
......@@ -98,7 +99,7 @@ return context.Base_redirect(dialog_id, keep_items = dict(portal_status_message=
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>reference, default_email_text, first_name=None, last_name=None, password=None, birthday=None, default_telephone_text=None, default_mobile_telephone_text=None, default_fax_text=None, corporate_name=None, default_credential_question_question=None, default_credential_question_question_free_text=None, default_credential_question_answer=None, role_list=None, function=None, site=None, activity_list=None, default_address_city=None, default_address_street_address=None, default_address_zip_code=None,default_address_region=None, dialog_id=\'\', **kw</string> </value>
<value> <string>reference, default_email_text, first_name=None, last_name=None, password=None, birthday=None, date_of_birth=None, default_telephone_text=None, default_mobile_telephone_text=None, default_fax_text=None, corporate_name=None, default_credential_question_question=None, default_credential_question_question_free_text=None, default_credential_question_answer=None, role_list=None, function=None, site=None, activity_list=None, default_address_city=None, default_address_street_address=None, default_address_zip_code=None,default_address_region=None, dialog_id=\'\', **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -79,6 +79,7 @@ else:\n
activity_list=activity_list,\n
skill_list=skill_list,\n
birthday=birthday,\n
date_of_birth=date_of_birth,\n
destination_decision=person.getRelativeUrl(),\n
default_image_file=default_image_file,\n
description=description)\n
......@@ -96,7 +97,7 @@ return context.Base_redirect(dialog_id, \n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>default_email_text=None, last_name=None,first_name=None, gender=None, nationality=None, password=None, birthday=None, default_telephone_text=None, default_mobile_telephone_text=None, default_fax_text=None, default_credential_question_question=None, default_credential_question_question_free_text=None, default_credential_question_answer=None, function=None, activity_list=None, skill_list=None, default_address_city=None, default_address_street_address=None, default_address_zip_code=None,default_address_region=None,default_image_file=None, description=None, dialog_id=\'\', **kw</string> </value>
<value> <string>default_email_text=None, last_name=None, first_name=None, gender=None, nationality=None, password=None, birthday=None, date_of_birth=None, default_telephone_text=None, default_mobile_telephone_text=None, default_fax_text=None, default_credential_question_question=None, default_credential_question_question_free_text=None, default_credential_question_answer=None, function=None, activity_list=None, skill_list=None, default_address_city=None, default_address_street_address=None, default_address_zip_code=None,default_address_region=None,default_image_file=None, description=None, dialog_id=\'\', **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -96,7 +96,7 @@
<string>your_gender</string>
<string>your_first_name</string>
<string>your_last_name</string>
<string>your_birthday</string>
<string>your_date_of_birth</string>
<string>your_nationality</string>
<string>your_default_email_text</string>
<string>your_reference</string>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_birthday</string> </value>
<value> <string>your_date_of_birth</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_dialog_mode_birthday</string> </value>
<value> <string>my_dialog_mode_date_of_birth</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
330
\ No newline at end of file
331
\ 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