18 require_once SQ_INCLUDE_PATH.
'/asset_edit/asset_edit_fns.inc';
19 require_once SQ_FUDGE_PATH.
'/datetime_field/datetime_field.inc';
20 require_once SQ_ATTRIBUTES_PATH.
'/option_list/option_list.inc';
44 parent::__construct();
45 $this->static_screens = Array(
48 'force_unlock' => TRUE,
49 'lock_type' =>
'attributes',
68 $user_type_codes = array_diff($GLOBALS[
'SQ_SYSTEM']->am->getTypeDescendants(
'user', TRUE), Array(
'root_user'));
70 $user_names = $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($user_type_codes,
'name');
71 if ($asset->writeAccess(
'attributes')) {
72 combo_box($prefix.
'_user_type', $user_names, FALSE, $asset->attr(
'user_type'));
75 echo $user_names[$asset->attr(
'user_type')];
94 if (!empty($_POST[$prefix.
'_user_type'])) {
95 $user_type_codes = array_diff($GLOBALS[
'SQ_SYSTEM']->am->getTypeDescendants(
'user', TRUE), Array(
'root_user'));
96 if (in_array($_POST[$prefix.
'_user_type'], $user_type_codes)) {
97 return $asset->setAttrValue(
'user_type', $_POST[$prefix.
'_user_type']);
119 <p>The required format
for the source
XML file is shown in <a href=
"<?php echo sq_web_path('data'); ?>/asset_types/xml_user_bridge/files/user_bridge_example.xml">
this example file</a>. The attributes of the
'user' node must include
'id' and may include any of the attributes of the asset type selected above</p>