function patterns_import_url in Patterns 6.2
Same name and namespace in other branches
- 5 patterns.module \patterns_import_url()
- 6 patterns.module \patterns_import_url()
- 7.2 includes/forms/import.inc \patterns_import_url()
- 7 includes/forms/import.inc \patterns_import_url()
Display the import pattern url form
1 string reference to 'patterns_import_url'
- patterns_menu in ./
patterns.module - Implementation of hook_menu().
File
- ./
patterns.module, line 552 - Enables extremely simple adding/removing features to your site with minimal to no configuration
Code
function patterns_import_url(&$form_state) {
if (empty($form_state['post'])) {
drupal_set_message(t('Import feature currently supports only XML file format.'), 'warning');
}
$form['xmlurl'] = array(
'#type' => 'textfield',
'#title' => t('Specify an URL'),
'#description' => t('Import a pattern from a remote URL. Imported patterns are not executed until you run them manually.'),
'#size' => 48,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Import'),
);
$form['#validate'][] = 'patterns_import_validate';
$form['#submit'][] = 'patterns_import_submit';
return $form;
}