| 1 |
<?php
|
| 2 |
// $Id: active_translation.admin.inc,v 1.3 2008/06/13 19:48:52 drewish Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Settings form.
|
| 6 |
*/
|
| 7 |
function active_translation_settings_form() {
|
| 8 |
$form['active_translation_show_status'] = array(
|
| 9 |
'#type' => 'radios',
|
| 10 |
'#title' => t('Show Translation Status Message'),
|
| 11 |
'#options' => array(
|
| 12 |
1 => t('Yes, inform visitors when they are viewing the node in another language because it has not been translated into their language.'),
|
| 13 |
0 => t("No, don't bother them."),
|
| 14 |
),
|
| 15 |
'#default_value' => variable_get('active_translation_show_status', 1),
|
| 16 |
);
|
| 17 |
$form['active_translation_hide_node_links'] = array(
|
| 18 |
'#type' => 'radios',
|
| 19 |
'#title' => t("Hide Node Translation Links"),
|
| 20 |
'#options' => array(
|
| 21 |
1 => t("Yes, hide the local module's links to other translations."),
|
| 22 |
0 => t('No, leave the links alone.'),
|
| 23 |
),
|
| 24 |
'#default_value' => variable_get('active_translation_hide_node_links', 0),
|
| 25 |
'#description' => t("This can be useful the locale module's language switcher block is being used to select the language making the node links redundant."),
|
| 26 |
);
|
| 27 |
|
| 28 |
return system_settings_form($form);
|
| 29 |
}
|
| 30 |
|
| 31 |
/**
|
| 32 |
* Rebuild translation table form.
|
| 33 |
*/
|
| 34 |
function active_translation_rebuild_form() {
|
| 35 |
$form['help'] = array(
|
| 36 |
'#type' => 'item',
|
| 37 |
'#value' => t('If you are experiencing problems with missing translations you should try rebuilding the Active Translation table.'),
|
| 38 |
);
|
| 39 |
$form['submit'] = array(
|
| 40 |
'#type' => 'submit',
|
| 41 |
'#value' => t('Rebuild'),
|
| 42 |
);
|
| 43 |
$form['#submit'] = array('active_translation_rebuild_on_submit');
|
| 44 |
return $form;
|
| 45 |
}
|