Added the management of the notification email addresses.

This commit is contained in:
Loic d'Anterroches 2009-01-25 10:32:34 +01:00
parent 121c94dc8e
commit 4c45a4a2ac
4 changed files with 43 additions and 4 deletions

View File

@ -57,6 +57,20 @@ class IDF_Form_TabsConf extends Pluf_Form
'widget' => 'Pluf_Form_Widget_SelectInput', 'widget' => 'Pluf_Form_Widget_SelectInput',
)); ));
} }
$ak = array('downloads_notification_email',
'review_notification_email',
'wiki_notification_email',
'source_notification_email',
'issues_notification_email',);
foreach ($ak as $key) {
$this->fields[$key] = new Pluf_Form_Field_Email(
array('required' => false,
'label' => $key,
'initial' => $this->conf->getVal($key, ''),
));
}
$this->fields['private_project'] = new Pluf_Form_Field_Boolean( $this->fields['private_project'] = new Pluf_Form_Field_Boolean(
array('required' => false, array('required' => false,
'label' => __('Private project'), 'label' => __('Private project'),

View File

@ -430,7 +430,12 @@ class IDF_Views_Project
$params = array(); $params = array();
$keys = array('downloads_access_rights', 'source_access_rights', $keys = array('downloads_access_rights', 'source_access_rights',
'issues_access_rights', 'review_access_rights', 'issues_access_rights', 'review_access_rights',
'wiki_access_rights'); 'wiki_access_rights',
'downloads_notification_email',
'review_notification_email',
'wiki_notification_email',
'source_notification_email',
'issues_notification_email');
foreach ($keys as $key) { foreach ($keys as $key) {
$_val = $request->conf->getVal($key, false); $_val = $request->conf->getVal($key, false);
if ($_val !== false) { if ($_val !== false) {

View File

@ -12,34 +12,54 @@
<form method="post" action="."> <form method="post" action=".">
<table class="form" summary=""> <table class="form" summary="">
<tr> <tr>
<th>&nbsp;</th>
<th class="a-c"><strong>{trans 'Access Rights'}</strong></th>
<th class="a-c"><strong>{trans 'Notification Email'}</strong></th>
</tr>
<tr>
<th><strong>{$form.f.downloads_access_rights.labelTag}:</strong></th> <th><strong>{$form.f.downloads_access_rights.labelTag}:</strong></th>
<td>{if $form.f.downloads_access_rights.errors}{$form.f.downloads_access_rights.fieldErrors}{/if} <td>{if $form.f.downloads_access_rights.errors}{$form.f.downloads_access_rights.fieldErrors}{/if}
{$form.f.downloads_access_rights|unsafe} {$form.f.downloads_access_rights|unsafe}
</td> </td>
<td>{if $form.f.downloads_notification_email.errors}{$form.f.downloads_notification_email.fieldErrors}{/if}
{$form.f.downloads_notification_email|unsafe}
</td>
</tr> </tr>
<tr> <tr>
<th><strong>{$form.f.wiki_access_rights.labelTag}:</strong></th> <th><strong>{$form.f.wiki_access_rights.labelTag}:</strong></th>
<td>{if $form.f.wiki_access_rights.errors}{$form.f.wiki_access_rights.fieldErrors}{/if} <td>{if $form.f.wiki_access_rights.errors}{$form.f.wiki_access_rights.fieldErrors}{/if}
{$form.f.wiki_access_rights|unsafe} {$form.f.wiki_access_rights|unsafe}
</td> </td>
<td>{if $form.f.wiki_notification_email.errors}{$form.f.wiki_notification_email.fieldErrors}{/if}
{$form.f.wiki_notification_email|unsafe}
</td>
</tr> </tr>
<tr> <tr>
<th><strong>{$form.f.issues_access_rights.labelTag}:</strong></th> <th><strong>{$form.f.issues_access_rights.labelTag}:</strong></th>
<td>{if $form.f.issues_access_rights.errors}{$form.f.issues_access_rights.fieldErrors}{/if} <td>{if $form.f.issues_access_rights.errors}{$form.f.issues_access_rights.fieldErrors}{/if}
{$form.f.issues_access_rights|unsafe} {$form.f.issues_access_rights|unsafe}
</td> </td>
<td>{if $form.f.issues_notification_email.errors}{$form.f.issues_notification_email.fieldErrors}{/if}
{$form.f.issues_notification_email|unsafe}
</td>
</tr> </tr>
<tr> <tr>
<th><strong>{$form.f.source_access_rights.labelTag}:</strong></th> <th><strong>{$form.f.source_access_rights.labelTag}:</strong></th>
<td>{if $form.f.source_access_rights.errors}{$form.f.source_access_rights.fieldErrors}{/if} <td>{if $form.f.source_access_rights.errors}{$form.f.source_access_rights.fieldErrors}{/if}
{$form.f.source_access_rights|unsafe} {$form.f.source_access_rights|unsafe}
</td> </td>
<td>{if $form.f.source_notification_email.errors}{$form.f.source_notification_email.fieldErrors}{/if}
{$form.f.source_notification_email|unsafe}
</td>
</tr> </tr>
<tr> <tr>
<th><strong>{$form.f.review_access_rights.labelTag}:</strong></th> <th><strong>{$form.f.review_access_rights.labelTag}:</strong></th>
<td>{if $form.f.review_access_rights.errors}{$form.f.review_access_rights.fieldErrors}{/if} <td>{if $form.f.review_access_rights.errors}{$form.f.review_access_rights.fieldErrors}{/if}
{$form.f.review_access_rights|unsafe} {$form.f.review_access_rights|unsafe}
</td> </td>
<td>{if $form.f.review_notification_email.errors}{$form.f.review_notification_email.fieldErrors}{/if}
{$form.f.review_notification_email|unsafe}
</td>
</tr> </tr>
<tr> <tr>
<th>{if $form.f.private_project.errors}{$form.f.private_project.fieldErrors}{/if} <th>{if $form.f.private_project.errors}{$form.f.private_project.fieldErrors}{/if}
@ -49,14 +69,14 @@
</tr> </tr>
<tr id="authorized-users-row"> <tr id="authorized-users-row">
<td>&nbsp;</td> <td>&nbsp;</td>
<td>{$form.f.authorized_users.labelTag}:<br /> <td colspan="2">{$form.f.authorized_users.labelTag}:<br />
{if $form.f.authorized_users.errors}{$form.f.authorized_users.fieldErrors}{/if} {if $form.f.authorized_users.errors}{$form.f.authorized_users.fieldErrors}{/if}
{$form.f.authorized_users|unsafe} {$form.f.authorized_users|unsafe}
</td> </td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td colspan="2">
<input type="submit" value="{trans 'Save Changes'}" name="submit" /> <input type="submit" value="{trans 'Save Changes'}" name="submit" />
</td> </td>
</tr> </tr>

View File

@ -48,7 +48,7 @@ a:active{
} }
.a-c { .a-c {
text-align: center; text-align: center !important;
} }
.dellink { .dellink {