Commit 4d79e8b4 authored by jaapjansma's avatar jaapjansma

update

parent 640df0ad
......@@ -255,6 +255,11 @@ class RelationshipsFieldOutputHandler extends AbstractFieldOutputHandler {
$form->addCheckBox('relationship_type_checkboxes', E::ts('Restrict to relationship'), $relationshipTypes);
$form->assign('relationship_types', $relationshipTypes);
$form->add('hidden', 'sorted_relationship_types', null, ['id' => 'sorted_relationship_types']);
// Backwords compatibilty
$form->assign('useSortIcon', false);
if (version_compare(CRM_Utils_System::version(), '5.15', '<')) {
$form->assign('useSortIcon', true);
}
$form->add('checkbox', 'show_label', E::ts('Show relationship type'), false, false);
$form->add('checkbox', 'include_deceased', E::ts('Include deceased'), false, false);
......
......@@ -10,6 +10,9 @@
<ul id="relationship_types" class="crm-checkbox-list crm-sortable-list" style="width: 600px;">
{foreach from=$relationship_types item="relationshipType"}
<li id="relationship-type-{$relationshipType}">
{if $useSortIcon}
<i class="crm-i fa-arrows crm-grip" style="float:left;"></i>
{/if}
{$form.relationship_type_checkboxes.$relationshipType.html}
</li>
{/foreach}
......@@ -84,4 +87,15 @@
left: 20px;
top: 4px;
}
{/literal}</style>
{/literal}
{if $useSortIcon}{literal}
.crm-container ul.crm-checkbox-list.crm-sortable-list {
border: 1px solid #a5a5a5;
padding: 0px;
background-color: white;
}
.crm-container ul.crm-checkbox-list.crm-sortable-list li i {
margin-top: 3px;
}
{/literal}{/if}
</style>
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