-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#527 Permit translation of Public Title field for Profiles #13110
dev/core#527 Permit translation of Public Title field for Profiles #13110
Conversation
(Standard links)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton I've r-run this and done a code review. It works perfectly.
I have not tested this on a multilingual install and I don't quite understand how this makes the field translateable but I'm assuming that's part of the magic of entityform?
@@ -112,6 +120,9 @@ | |||
<type>int</type> | |||
<required>true</required> | |||
<default>1</default> | |||
<html> | |||
<type>Text</type> | |||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. All changes in UFGroup.xml are correct.
'description' => ts('Profile Form Public title'), | ||
'maxlength' => 64, | ||
'size' => CRM_Utils_Type::BIG, | ||
'table_name' => 'civicrm_uf_group', | ||
'entity' => 'UFGroup', | ||
'bao' => 'CRM_Core_BAO_UFGroup', | ||
'localizable' => 1, | ||
'html' => [ | ||
'type' => 'Text', | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. All changes in UFGroup.php are correct.
'description' => ['name' => 'description', 'help' => ['id' => 'id-description', 'file' => 'CRM/UF/Form/Group.hlp']], | ||
'uf_group_type' => ['name' => 'uf_group_type', 'not-auto-addable' => TRUE, 'help' => ['id' => 'id-used_for', 'file' => 'CRM/UF/Form/Group.hlp'], 'post_html_text' => ' ' . $this->getOtherModuleString()] | ||
]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
$otherModuleString .= " [ x ] <label>" . $key . "</label>"; | ||
} | ||
$this->assign('otherModuleString', $otherModuleString); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Moved to it's own function getOtherModuleString()
@@ -33,7 +33,7 @@ | |||
{/capture}{help id=$help.id file=$help.file}{/if} | |||
{if $action == 2 && $fieldSpec.is_add_translate_dialog}{include file='CRM/Core/I18n/Dialog.tpl' table=$entityTable field=$fieldName id=$entityID}{/if} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattwire this line ^^
Overview
Fixes the field 'Public Title' to be translatable on the profile form
Before
Not translatable
After
Technical Details
In order to fix this field I have partially converted the form to an EntityForm. To finish the form we probably need to figure out how to deal with the accordian in it - but I did look at one challenge - which was having a way to add some text after the html & before the
which I did in the tpl
Comments
@mattwire ping
@samuelsov this fixes one of the fields you describe in https://lab.civicrm.org/dev/core/issues/527
Note that the next field on the display is 'description' and that doesn't seem to be localised in the schema yet. I think there are some upgrade challenges in changing that