function lingotek_admin_account_status_form in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lingotek.admin.inc \lingotek_admin_account_status_form()
- 7.4 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 15
Code
function lingotek_admin_account_status_form($form, &$form_state, $show_fieldset = FALSE) {
lingotek_is_module_setup();
$account = LingotekAccount::instance();
$api = LingotekApi::instance();
$site = variable_get('site_name', 'Drupal Site');
$is_enterprise = $account
->isEnterprise();
// Account Status
$account_status = $account
->getStatusText();
$form['status'] = array(
'#type' => $show_fieldset ? 'fieldset' : 'item',
'#title' => t('Account') . ': ' . $account_status,
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'administrative_settings',
'actions' => array(
'#type' => 'actions',
'submit' => array(
'#type' => 'submit',
'#value' => t('Update account status'),
),
),
'#submit' => array(
'lingotek_admin_account_status_form_submit',
),
);
// 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:'),
variable_get('lingotek_notify_url', ''),
),
),
)),
);
return $form;
}