Commit edeea95f authored by Dries's avatar Dries

- Patch #137932 by grendzy, Alan D, lilou et al: automatic enctype on adding a file field.

parent 982c7c3c
......@@ -748,7 +748,6 @@ function locale_translate_import_form() {
),
);
$form['import']['submit'] = array('#type' => 'submit', '#value' => t('Import'));
$form['#attributes']['enctype'] = 'multipart/form-data';
return $form;
}
......
......@@ -227,8 +227,6 @@ function aggregator_admin_remove_feed_submit($form, &$form_state) {
function aggregator_form_opml(&$form_state) {
$period = drupal_map_assoc(array(900, 1800, 3600, 7200, 10800, 21600, 32400, 43200, 64800, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval');
$form['#attributes'] = array('enctype' => "multipart/form-data");
$form['upload'] = array(
'#type' => 'file',
'#title' => t('OPML File'),
......
......@@ -27,7 +27,6 @@ function file_test_menu() {
* Form to test file uploads.
*/
function _file_test_form(&$form_state) {
$form['#attributes'] = array('enctype' => 'multipart/form-data');
$form['file_test_upload'] = array(
'#type' => 'file',
'#title' => t('Upload an image'),
......
......@@ -499,7 +499,6 @@ function system_theme_settings(&$form_state, $key = '') {
}
}
}
$form['#attributes'] = array('enctype' => 'multipart/form-data');
$form = system_settings_form($form, FALSE);
// We don't want to call system_settings_form_submit(), so change #submit.
......
......@@ -257,7 +257,6 @@ function upload_form_alter(&$form, $form_state, $form_id) {
}
else {
$form['attachments']['wrapper'] += _upload_form($node);
$form['#attributes']['enctype'] = 'multipart/form-data';
}
$form['#submit'][] = 'upload_node_form_submit';
}
......
......@@ -279,7 +279,6 @@ function user_profile_form($form_state, $account, $category = 'account') {
'#submit' => array('user_edit_cancel_submit'),
);
}
$form['#attributes']['enctype'] = 'multipart/form-data';
return $form;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment