diff --git a/CRM/UF/Form/Group.php b/CRM/UF/Form/Group.php index 933cfc537fa..77cca1586df 100644 --- a/CRM/UF/Form/Group.php +++ b/CRM/UF/Form/Group.php @@ -64,6 +64,7 @@ protected function setEntityFields() { 'title' => ['name' => 'title'], 'frontend_title' => ['name' => 'frontend_title'], '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()] ]; } @@ -266,17 +267,6 @@ public function setDefaultValues() { } $defaults['uf_group_type'] = isset($checked) ? $checked : ""; - //get the uf join records for current uf group other than default modules - $otherModules = array(); - $otherModules = CRM_Core_BAO_UFGroup::getUFJoinRecord($this->_id, TRUE, TRUE); - if (!empty($otherModules)) { - $otherModuleString = NULL; - foreach ($otherModules as $key) { - $otherModuleString .= " [ x ] "; - } - $this->assign('otherModuleString', $otherModuleString); - } - $showAdvanced = 0; $advFields = array( 'group', @@ -422,4 +412,20 @@ public function postProcess() { */ public function setDeleteMessage() {} + /** + * Get the string to display next to the used for field indicating unchangeable uses. + * + * @return string + */ + protected function getOtherModuleString() { + $otherModules = CRM_Core_BAO_UFGroup::getUFJoinRecord($this->_id, TRUE, TRUE); + if (!empty($otherModules)) { + $otherModuleString = NULL; + foreach ($otherModules as $key) { + $otherModuleString .= " [ x ] "; + } + } + return $otherModuleString; + } + } diff --git a/templates/CRM/Core/Form/Field.tpl b/templates/CRM/Core/Form/Field.tpl index fb6a01eee9a..5aa672db6c4 100644 --- a/templates/CRM/Core/Form/Field.tpl +++ b/templates/CRM/Core/Form/Field.tpl @@ -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} - {if $form.$fieldName.html}{if $fieldSpec.formatter === 'crmMoney'}{$form.$fieldName.html|crmMoney}{else}{$form.$fieldName.html}{/if}{else}{$fieldSpec.place_holder}{/if}
+ {$fieldSpec.pre_html_text}{if $form.$fieldName.html}{if $fieldSpec.formatter === 'crmMoney'}{$form.$fieldName.html|crmMoney}{else}{$form.$fieldName.html}{/if}{else}{$fieldSpec.place_holder}{/if}{$fieldSpec.post_html_text}
{if $fieldSpec.description}{$fieldSpec.description}{/if} {if $fieldSpec.documentation_link}{docURL page=$fieldSpec.documentation_link.page resource=$fieldSpec.documentation_link.resource}{/if} diff --git a/templates/CRM/UF/Form/Group.tpl b/templates/CRM/UF/Form/Group.tpl index 6e86a4e8b27..73fbcab9c29 100644 --- a/templates/CRM/UF/Form/Group.tpl +++ b/templates/CRM/UF/Form/Group.tpl @@ -52,10 +52,6 @@ {include file="CRM/Core/Form/Field.tpl"} {/foreach} - - {$form.uf_group_type.label} {help id='id-used_for' file="CRM/UF/Form/Group.hlp"} - {$form.uf_group_type.html} {$otherModuleString} - {$form.weight.label}{if $config->userSystem->is_drupal EQ '1'} {help id='id-profile_weight' file="CRM/UF/Form/Group.hlp"}{/if} {$form.weight.html} diff --git a/xml/schema/Core/UFGroup.xml b/xml/schema/Core/UFGroup.xml index 350273655b0..4057e3bd9fd 100644 --- a/xml/schema/Core/UFGroup.xml +++ b/xml/schema/Core/UFGroup.xml @@ -120,6 +120,9 @@ int true 1 + + Text + Controls display order when multiple user framework groups are setup for concurrent display. 1.2 1.3