- Alternative solution for #28721: expand "File attachments"-group on node edit form when files are attached.

4.7.x
Dries Buytaert 2005-08-17 19:27:03 +00:00
parent b14ae54d62
commit 12c5614599
2 changed files with 4 additions and 2 deletions

View File

@ -380,12 +380,13 @@ function upload_form($node) {
if (count($node->files)) {
$output = theme('table', $header, $rows);
}
if (user_access('upload files')) {
$output .= form_file(t('Attach new file'), "upload", 40);
$output .= form_button(t('Attach'), 'fileop');
}
return '<div class="attachments">'. form_group_collapsible(t('File attachments'), $output, TRUE, t('Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.')) .'</div>';
return '<div class="attachments">'. form_group_collapsible(t('File attachments'), $output, empty($node->files), t('Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.')) .'</div>';
}
function upload_load($node) {

View File

@ -380,12 +380,13 @@ function upload_form($node) {
if (count($node->files)) {
$output = theme('table', $header, $rows);
}
if (user_access('upload files')) {
$output .= form_file(t('Attach new file'), "upload", 40);
$output .= form_button(t('Attach'), 'fileop');
}
return '<div class="attachments">'. form_group_collapsible(t('File attachments'), $output, TRUE, t('Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.')) .'</div>';
return '<div class="attachments">'. form_group_collapsible(t('File attachments'), $output, empty($node->files), t('Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.')) .'</div>';
}
function upload_load($node) {