function lingotek_admin_account_status_form in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lingotek.admin.inc \lingotek_admin_account_status_form()
- 7.3 lingotek.admin.inc \lingotek_admin_account_status_form()
- 7.5 lingotek.admin.inc \lingotek_admin_account_status_form()
- 7.6 lingotek.admin.inc \lingotek_admin_account_status_form()
Form constructor for the administration form.
Return value
array A FAPI form array.
1 string reference to 'lingotek_admin_account_status_form'
File
- ./
lingotek.admin.inc, line 17
Code
function lingotek_admin_account_status_form($form, &$form_state, $show_fieldset = FALSE) {
lingotek_is_module_setup();
$account = LingotekAccount::instance();
$is_enterprise = $account
->isEnterprise();
// Account Status
$account_status = $account
->getStatusText();
//$account_status .= '<br>Enterprise: ' . ($is_enterprise ? 'Yes' : 'No');
$form['status'] = array(
'#type' => $show_fieldset ? 'fieldset' : 'item',
'#title' => t('Account'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'administrative_settings',
);
$form['status']['account_summary'] = array(
'#type' => 'hidden',
'#value' => $account_status,
'#attributes' => array(
'id' => array(
'account_summary',
),
),
);
// Account Information
$activation_details = variable_get('lingotek_activation_first_name', '') . ' ' . variable_get('lingotek_activation_last_name', '');
$activation_email = variable_get('lingotek_activation_email', '');
$activation_details .= strlen($activation_email) ? ' (' . $activation_email . ')' : '';
$activation_details = strlen(trim($activation_details)) ? $activation_details : 'NA';
$form['status'][] = array(
'#type' => 'item',
'#markup' => theme('table', array(
'header' => array(),
'rows' => array(
array(
t('Status:'),
$account_status,
),
//,array('Plan:', $account->getPlanTypeText()),
array(
t('Enterprise:'),
$is_enterprise ? '<span style="color: green;">' . t('Yes') . '</span>' : '<span>' . t('No') . '</span>',
),
array(
t('Activation Name:'),
$activation_details,
),
array(
t('Community Identifier:'),
variable_get('lingotek_community_identifier', ''),
),
array(
t('OAuth Key:'),
variable_get('lingotek_oauth_consumer_id', ''),
),
array(
t('OAuth Secret:'),
variable_get('lingotek_oauth_consumer_secret', ''),
),
array(
t('Workflow ID:'),
variable_get('lingotek_workflow', ''),
),
array(
t('Integration Method ID:'),
variable_get('lingotek_integration_method', ''),
),
array(
t('External ID:'),
variable_get('lingotek_login_id', ''),
),
array(
t('Project ID:'),
variable_get('lingotek_project', ''),
),
array(
t('Vault ID:'),
variable_get('lingotek_vault', ''),
),
array(
t('Notify URL:'),
'<span title="' . variable_get('lingotek_notify_url', '') . '">' . truncate_utf8(variable_get('lingotek_notify_url', ''), 45, FALSE, TRUE) . '</span>',
),
),
)),
);
return $form;
}