return; } else { ?> Fatal contact linking error. Sorry I rushed this feature! <?php } } } } hook_handle_callback('layout_column_half', 1); $hide_more_button = true; $title = 'Contact Details'; include module_theme::include_ucm('includes/plugin_user/pages/contact_admin_form.php'); if (class_exists('module_address', false) && module_config::c('users_have_address', 0)) { module_address::print_address_form($user_id, 'user', 'physical', 'Address'); } ?> <?php if ((int) $user_id > 0 && module_user::can_i('edit', 'Contacts', $contact_type) && strlen($user['email']) > 2 && $use_master_key == 'customer_id') { // check if contact exists under other customer accounts. $others = module_user::get_contacts(array('email' => $user['email'], "{$contact_module_name}_id" => 0)); if (count($others) > 1) { foreach ($others as $other_id => $other) { if ($other['user_id'] == $user['user_id']) { // this "other" person is from teh same customer as us. unset($others[$other_id]); } else {
if ($vendor['primary_user_id']) { $fieldset_data['heading']['button'] = array('title' => 'More', 'url' => module_user::link_open_contact($vendor['primary_user_id'], false)); } echo module_form::generate_fieldset($fieldset_data); unset($fieldset_data); } else { module_user::print_contact_form($vendor['primary_user_id']); } } } else { // hack to create new contact details. module_user::print_contact_form(false); } /*** ADDRESS **/ if (class_exists('module_address', false)) { module_address::print_address_form($vendor_id, 'vendor', 'physical', 'Address'); } /** ADVANCED AREA **/ /* $fieldset_data = array( 'heading' => array( 'type' => 'h3', 'title' => 'Advanced', ), 'class' => 'tableclass tableclass_form tableclass_full', 'elements' => array(), ); if(module_vendor::can_i('edit','Vendor Credit')){ $fieldset_data['elements']['credit'] = array( 'title' => _l('Credit'),
if ($customer['primary_user_id']) { $fieldset_data['heading']['button'] = array('title' => 'More', 'url' => module_user::link_open_contact($customer['primary_user_id'], false)); } echo module_form::generate_fieldset($fieldset_data); unset($fieldset_data); } else { module_user::print_contact_form($customer['primary_user_id']); } } } else { // hack to create new contact details. module_user::print_contact_form(false); } /*** ADDRESS **/ if (class_exists('module_address', false)) { module_address::print_address_form($customer_id, 'customer', 'physical', 'Address'); } /** ADVANCED AREA **/ hook_handle_callback('layout_column_half', 2); if ($customer_id && $customer_id != 'new') { if (class_exists('module_group', false) && module_group::is_plugin_enabled()) { module_group::display_groups(array('title' => $page_type_single . ' Groups', 'owner_table' => 'customer', 'owner_id' => $customer_id, 'view_link' => $module->link_open($customer_id))); } $note_summary_owners = array(); // generate a list of all possible notes we can display for this customer. // display all the notes which are owned by all the sites we have access to // display all the notes which are owned by all the users we have access to foreach (module_user::get_contacts(array('customer_id' => $customer_id)) as $val) { $note_summary_owners['user'][] = $val['user_id']; } if (class_exists('module_website', false) && module_website::is_plugin_enabled()) {