function globallink_useful_tools in GlobalLink Connect for Drupal 7.7
Globallink Useful Tools form.
1 string reference to 'globallink_useful_tools'
File
- ./
globallink_settings.inc, line 571
Code
function globallink_useful_tools() {
$form = array();
$form['globallink_useful_tools'] = array(
'#type' => 'fieldset',
'#title' => t('Useful Tools'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['globallink_useful_tools']['export_csv'] = array(
'#markup' => '<label for="export_csv_button">Export GlobalLink tables to CSV</label><div>Exports the data from the GlobalLink tables to a CSV and makes it available for download. Use this utility whenever you need to debug under the hood.</div>',
);
$form['globallink_useful_tools']['export_csv_button'] = array(
'#type' => 'submit',
'#value' => t('Export'),
'#submit' => array(
'export_csv_button_submit',
),
'#name' => 'submit_export',
'#attributes' => array(
'onclick' => 'if (!confirm("RUNNING TOOL: Export CSV. Confirm this operation.")){return false;}',
),
);
$form['globallink_useful_tools']['prepare_nodes'] = array(
'#markup' => '<label for="prepare_nodes_button">Prepare Nodes</label><div>Sets all language neutral nodes and underlying fields and path aliases to this site\'s source locale.</div>',
);
$form['globallink_useful_tools']['prepare_nodes_button'] = array(
'#type' => 'submit',
'#value' => t('Run Tool'),
'#name' => 'submit_nodes',
'#submit' => array(
'prepare_nodes_button_submit',
),
'#attributes' => array(
'onclick' => 'if (!confirm("RUNNING TOOL: Prepare Nodes. This action is irreversible. Confirm this operation.")){return false;}',
),
);
$form['globallink_useful_tools']['prepare_blocks'] = array(
'#markup' => '<label for="prepare_blocks_button">Prepare Blocks</label><div>Updates all blocks to be translatable in the Language Settings.</div>',
);
$form['globallink_useful_tools']['prepare_blocks_button'] = array(
'#type' => 'submit',
'#value' => t('Run Tool'),
'#name' => 'submit_blocks',
'#submit' => array(
'prepare_blocks_button_submit',
),
'#attributes' => array(
'onclick' => 'if (!confirm("RUNNING TOOL: Prepare Blocks. This action is irreversible. Confirm this operation.")){return false;}',
),
);
$form['globallink_useful_tools']['prepare_taxonomy'] = array(
'#markup' => '<label for="prepare_taxonomy_button">Prepare Taxonomy</label><div>Updates all taxonomy vocabularies that are currently not enabled for multilingual, to use a translation mode from the Multilingual Options available.</div>',
);
$form['globallink_useful_tools']['prepare_taxonomy_button'] = array(
'#type' => 'submit',
'#value' => t('Run Tool'),
'#name' => 'submit_taxonomy',
'#submit' => array(
'prepare_taxonomy_custom_submit_redirect',
),
'#attributes' => array(
'onclick' => 'if (!confirm("You can select the Multilingual option to be used for all taxonomies.")){return false;}',
),
);
$form['globallink_useful_tools']['prepare_menus'] = array(
'#markup' => '<label for="prepare_menus_button">Prepare Menus</label><div>Updates all Menus to use the \'Translate and Localize\' Multilingual option, and updates the language of all menu links to the site\'s source locale.</div>',
);
$form['globallink_useful_tools']['prepare_menus_button'] = array(
'#type' => 'submit',
'#value' => t('Run Tool'),
'#name' => 'submit_menus',
'#submit' => array(
'prepare_menus_button_submit',
),
'#attributes' => array(
'onclick' => 'if (!confirm("RUNNING TOOL: Prepare Menus. This action is irreversible. Confirm this operation.")){return false;}',
),
);
$form['globallink_useful_tools']['prepare_field_collections'] = array(
'#markup' => '<label for="prepare_field_collections_button">Prepare Field Collections</label><div>Sets all Field Collections to be translatable, allowing all the underlying fields to be enabled for multilingual use.</div>',
);
$form['globallink_useful_tools']['prepare_field_collections_button'] = array(
'#type' => 'submit',
'#value' => t('Run Tool'),
'#name' => 'submit_field_collections',
'#submit' => array(
'prepare_field_collections_button_submit',
),
'#attributes' => array(
'onclick' => 'if (!confirm("RUNNING TOOL: Prepare Field Collections. This action is irreversible. Confirm this operation.")){return false;}',
),
);
$form['globallink_useful_tools']['prepare_beans'] = array(
'#markup' => '<label for="prepare_beans_button">Prepare Beans</label><div>Sets all bean fields to be translatable and will set language of the bean field data to site source language</div>',
);
$form['globallink_useful_tools']['prepare_beans_button'] = array(
'#type' => 'submit',
'#value' => t('Run Tool'),
'#name' => 'submit_beans',
'#submit' => array(
'prepare_beans_button_submit',
),
'#attributes' => array(
'onclick' => 'if (!confirm("RUNNING TOOL: Prepare Beans. This action is irreversible. Confirm this operation.")){return false;}',
),
);
return $form;
}