Added longer description for the downloads.
This commit is contained in:
@@ -46,6 +46,16 @@ class IDF_Form_UpdateUpload extends Pluf_Form
|
||||
'size' => 67,
|
||||
),
|
||||
));
|
||||
$this->fields['changelog'] = new Pluf_Form_Field_Varchar(
|
||||
array('required' => false,
|
||||
'label' => __('Description'),
|
||||
'initial' => $this->upload->changelog,
|
||||
'widget' => 'Pluf_Form_Widget_TextareaInput',
|
||||
'widget_attrs' => array(
|
||||
'cols' => 58,
|
||||
'rows' => 13,
|
||||
),
|
||||
));
|
||||
$tags = $this->upload->get_tags_list();
|
||||
for ($i=1;$i<7;$i++) {
|
||||
$initial = '';
|
||||
@@ -132,6 +142,7 @@ class IDF_Form_UpdateUpload extends Pluf_Form
|
||||
}
|
||||
// Create the upload
|
||||
$this->upload->summary = trim($this->cleaned_data['summary']);
|
||||
$this->upload->changelog = trim($this->cleaned_data['changelog']);
|
||||
$this->upload->modif_dtime = gmdate('Y-m-d H:i:s');
|
||||
$this->upload->update();
|
||||
$this->upload->batchAssoc('IDF_Tag', $tags);
|
||||
|
@@ -44,6 +44,16 @@ class IDF_Form_Upload extends Pluf_Form
|
||||
'size' => 67,
|
||||
),
|
||||
));
|
||||
$this->fields['changelog'] = new Pluf_Form_Field_Varchar(
|
||||
array('required' => false,
|
||||
'label' => __('Description'),
|
||||
'initial' => '',
|
||||
'widget' => 'Pluf_Form_Widget_TextareaInput',
|
||||
'widget_attrs' => array(
|
||||
'cols' => 58,
|
||||
'rows' => 13,
|
||||
),
|
||||
));
|
||||
$this->fields['file'] = new Pluf_Form_Field_File(
|
||||
array('required' => true,
|
||||
'label' => __('File'),
|
||||
@@ -155,6 +165,7 @@ class IDF_Form_Upload extends Pluf_Form
|
||||
$upload->project = $this->project;
|
||||
$upload->submitter = $this->user;
|
||||
$upload->summary = trim($this->cleaned_data['summary']);
|
||||
$upload->changelog = trim($this->cleaned_data['changelog']);
|
||||
$upload->file = $this->cleaned_data['file'];
|
||||
$upload->filesize = filesize(Pluf::f('upload_path').'/'.$this->project->shortname.'/files/'.$this->cleaned_data['file']);
|
||||
$upload->downloads = 0;
|
||||
|
Reference in New Issue
Block a user