} $fieldset_data['elements']['primary'] = array('title' => 'Primary', 'fields' => array(array('type' => 'check', 'name' => 'customer_primary', 'value' => '1', 'checked' => $primary), _hr('This users details will be used as a primary point of contact for this customer. These details will display in the main customer listing for this customer. Also if you send an invoice or a newsletter to this "customer" then this email address will be used.'))); } else { if (isset($show_more_button) && $show_more_button) { $fieldset_data['heading']['button'] = array('title' => 'More', 'url' => module_user::link_open_contact($user_id, false)); } } $fieldset_data['elements']['fname'] = array('title' => 'First Name', 'fields' => array(array('type' => 'text', 'name' => 'name', 'value' => $user['name']))); $fieldset_data['elements']['last_name'] = array('title' => 'Last Name', 'fields' => array(array('type' => 'text', 'name' => 'last_name', 'value' => $user['last_name']))); $fieldset_data['elements']['email'] = array('title' => 'Email Address', 'fields' => array(array('type' => 'text', 'name' => 'email', 'value' => $user['email']))); $fieldset_data['elements']['phone'] = array('title' => 'Phone', 'fields' => array(array('type' => 'text', 'name' => 'phone', 'value' => $user['phone']))); $fieldset_data['elements']['mobile'] = array('title' => 'Mobile', 'fields' => array(array('type' => 'text', 'name' => 'mobile', 'value' => $user['mobile']))); $fieldset_data['elements']['fax'] = array('title' => 'Fax', 'fields' => array(array('type' => 'text', 'name' => 'fax', 'value' => $user['fax']))); if (class_exists('module_language', false) && isset($user['language'])) { $attr = array(); foreach (module_language::get_languages_attributes() as $langauge) { $attr[$langauge['language_code']] = $langauge['language_name']; } $fieldset_data['elements']['language'] = array('title' => 'Language', 'fields' => array(array('type' => 'select', 'name' => 'language', 'options' => $attr, 'value' => $user['language']))); } if (class_exists('module_extra') && module_extra::is_plugin_enabled() && module_extra::can_i('view', 'Contacts')) { $fieldset_data['extra_settings'] = array('owner_table' => 'user', 'owner_key' => 'user_id', 'owner_id' => $user['user_id'], 'layout' => 'table_row', 'allow_new' => module_extra::can_i('create', 'Contacts'), 'allow_edit' => module_extra::can_i('edit', 'Contacts')); } echo module_form::generate_fieldset($fieldset_data); unset($fieldset_data); ?> <input type="hidden" name="user_id" value="<?php echo $user_id; ?>
<thead> <tr class="title"> <th><?php echo _l('Language Code'); ?> </th> <th><?php echo _l('Language Name'); ?> </th> </tr> </thead> <tbody> <?php $c = 0; foreach (module_language::get_languages_attributes() as $language_code => $language) { if (!isset($language['language_id']) || !$language['language_id']) { echo "Language {$language_code} failed to update insert into database.. Please report this bug to Support."; continue; } $languages_attributes[$language_code] = $language['language_name']; ?> <tr class="<?php echo $c++ % 2 ? "odd" : "even"; ?> "> <td class="row_action"> <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']) . (strpos($_SERVER['REQUEST_URI'], '?') === false ? '?' : '&'); ?> language_id=<?php