Fixed ticket 479, project editing inconsistency.
This commit is contained in:
parent
f6fc5ae466
commit
439014b0b1
@ -64,6 +64,14 @@ class IDF_Form_Admin_ProjectCreate extends Pluf_Form
|
||||
'help_text' => __('It must be unique for each project and composed only of letters, digits and dash (-) like "my-project".'),
|
||||
));
|
||||
|
||||
$this->fields['shortdesc'] = new Pluf_Form_Field_Varchar(
|
||||
array('required' => true,
|
||||
'label' => __('short description'),
|
||||
'help_text' => __('A one line description of the project.'),
|
||||
'initial' => '',
|
||||
'widget_attrs' => array('size' => '35'),
|
||||
));
|
||||
|
||||
$this->fields['scm'] = new Pluf_Form_Field_Varchar(
|
||||
array('required' => true,
|
||||
'label' => __('Repository type'),
|
||||
@ -272,6 +280,7 @@ class IDF_Form_Admin_ProjectCreate extends Pluf_Form
|
||||
$project = new IDF_Project();
|
||||
$project->name = $this->cleaned_data['name'];
|
||||
$project->shortname = $this->cleaned_data['shortname'];
|
||||
$project->shortdesc = $this->cleaned_data['shortdesc'];
|
||||
|
||||
if ($this->cleaned_data['template'] != '--') {
|
||||
// Find the template project
|
||||
|
@ -43,6 +43,14 @@ class IDF_Form_Admin_ProjectUpdate extends Pluf_Form
|
||||
'initial' => $this->project->name,
|
||||
));
|
||||
|
||||
$this->fields['shortdesc'] = new Pluf_Form_Field_Varchar(
|
||||
array('required' => true,
|
||||
'label' => __('short description'),
|
||||
'help_text' => __('A one line description of the project.'),
|
||||
'initial' => $this->project->shortdesc,
|
||||
'widget_attrs' => array('size' => '35'),
|
||||
));
|
||||
|
||||
$this->fields['owners'] = new Pluf_Form_Field_Varchar(
|
||||
array('required' => false,
|
||||
'label' => __('Project owners'),
|
||||
@ -80,6 +88,7 @@ class IDF_Form_Admin_ProjectUpdate extends Pluf_Form
|
||||
$this->cleaned_data);
|
||||
$this->project->membershipsUpdated();
|
||||
$this->project->name = $this->cleaned_data['name'];
|
||||
$this->project->shortdesc = $this->cleaned_data['shortdesc'];
|
||||
$this->project->update();
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,14 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.shortdesc.labelTag}:</strong></th>
|
||||
<td>
|
||||
{if $form.f.shortdesc.errors}{$form.f.shortdesc.fieldErrors}{/if}
|
||||
{$form.f.shortdesc|unsafe}<br />
|
||||
<span class="helptext">{$form.f.shortdesc.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.scm.labelTag}:</strong></th>
|
||||
<td>{if $form.f.scm.errors}{$form.f.scm.fieldErrors}{/if}
|
||||
{$form.f.scm|unsafe}
|
||||
|
@ -18,6 +18,14 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.shortdesc.labelTag}:</strong></th>
|
||||
<td>
|
||||
{if $form.f.shortdesc.errors}{$form.f.shortdesc.fieldErrors}{/if}
|
||||
{$form.f.shortdesc|unsafe}<br />
|
||||
<span class="helptext">{$form.f.shortdesc.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.owners.labelTag}:</strong></th>
|
||||
<td>
|
||||
{if $form.f.owners.errors}{$form.f.owners.fieldErrors}{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user