Fix ticket #3013: MAX_FILE_SIZE hidden fields were incorrectly placed

In order to apply to PHP's POST processing, the MAX_FILE_SIZE field must appear *before* the file upload field. They were incorrectly placed after, where they had no effect on POST processing.
This commit is contained in:
Brion Vibber
2011-01-26 15:49:57 -08:00
parent 625405910f
commit 54e98ffe22
7 changed files with 20 additions and 20 deletions

View File

@@ -168,6 +168,10 @@ class ApplicationEditForm extends Form
$this->out->element('img', array('src' => $icon));
}
$this->out->element('input', array('name' => 'MAX_FILE_SIZE',
'type' => 'hidden',
'id' => 'MAX_FILE_SIZE',
'value' => ImageFile::maxFileSizeInt()));
$this->out->element('label', array('for' => 'app_icon'),
// TRANS: Form input field label for application icon.
_('Icon'));
@@ -176,10 +180,6 @@ class ApplicationEditForm extends Form
'id' => 'app_icon'));
// TRANS: Form guide.
$this->out->element('p', 'form_guide', _('Icon for this application'));
$this->out->element('input', array('name' => 'MAX_FILE_SIZE',
'type' => 'hidden',
'id' => 'MAX_FILE_SIZE',
'value' => ImageFile::maxFileSizeInt()));
$this->out->elementEnd('li');
$this->out->elementStart('li');