%s @ %s ', h($alignment['type']), sprintf( '%s', $baseurl, h($alignment['organisation']['id']), h($alignment['organisation']['name']) ), sprintf( "UI.openModalFromURL(%s);", sprintf( "'/alignments/delete/%s'", $alignment['id'] ) ) ); } } else if ($field['scope'] === 'organisations') { foreach ($extracted['alignments'] as $alignment) { $alignments .= sprintf( '
[%s] %s
', h($alignment['type']), sprintf( '%s', $baseurl, h($alignment['individual']['id']), h($alignment['individual']['email']) ), sprintf( "UI.openModalFromURL(%s);", sprintf( "'/alignments/delete/%s'", $alignment['id'] ) ) ); } } echo sprintf( '
%s
', $alignments, sprintf( "UI.openModalFromURL('/alignments/add/%s/%s');", h($field['scope']), h($extracted['id']) ), $field['scope'] === 'individuals' ? __('Add organisation') : __('Add individual') );