function lingotek_admin_advanced_parsing_form in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.admin.inc \lingotek_admin_advanced_parsing_form()
- 7.3 lingotek.admin.inc \lingotek_admin_advanced_parsing_form()
- 7.4 lingotek.admin.inc \lingotek_admin_advanced_parsing_form()
- 7.5 lingotek.admin.inc \lingotek_admin_advanced_parsing_form()
Advanced Parsing - XML Configuration
1 string reference to 'lingotek_admin_advanced_parsing_form'
File
- ./
lingotek.admin.inc, line 1221
Code
function lingotek_admin_advanced_parsing_form($form, &$form_state, $show_fieldset = FALSE) {
/*
* Advanced XML Configuration
*/
$form['advanced-parsing'] = array(
'#type' => $show_fieldset ? 'fieldset' : 'item',
'#title' => t('Advanced Content Parsing'),
'#group' => 'administrative_settings',
'#submit' => array(
'lingotek_admin_advanced_parsing_form_submit',
),
);
$form['advanced-parsing'][] = array(
'#type' => 'item',
'#description' => t('Settings to support advanced parsing of translatable content.'),
);
$form['advanced-parsing']['lingotek_advanced_xml_config1'] = array(
'#type' => 'textarea',
'#title' => t('Configuration Settings (Primary)'),
'#description' => t('Paste in the contents of an advanced configuration file (.fprm). This will be used as the primary set of advanced settings when sending content to Lingotek.'),
'#default_value' => variable_get('lingotek_advanced_xml_config1'),
);
$form['advanced-parsing']['lingotek_advanced_xml_config2'] = array(
'#type' => 'textarea',
'#title' => t('Configuration Settings (Secondary)'),
'#description' => t('Paste in the contents of an advanced configuration file (.fprm). This will be used as the secondary set of advanced settings when sending content to Lingotek.'),
'#default_value' => variable_get('lingotek_advanced_xml_config2'),
);
if (!variable_get('lingotek_advanced_parsing', FALSE)) {
$form['advanced-parsing']['lingotek_advanced_parsing'] = array(
'#type' => 'checkbox',
'#title' => t('Upgrade to advanced content parsing.'),
'#description' => t('This site is currently using Simple content parsing.
Check this box to upgrade your site to use advanced content parsing for existing and future content. <strong>Warning:</strong> This will update all current Lingotek-associated content on the site, possibly modifying the state of in-progress translations.'),
);
$form['advanced-parsing']['#submit'][] = 'lingotek_handle_advanced_xml_upgrade';
}
$form['advanced-parsing']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
$form['advanced-parsing']['reset'] = array(
'#type' => 'submit',
'#value' => t('Reset to Defaults'),
'#attributes' => array(
'onclick' => 'return confirm("' . t('Are you sure?\\n\\nAll of your content-parsing settings will be reset to system defaults.') . '");',
),
);
return $form;
}