From 4c45a4a2ac377f34a97d6efda5f99528f91a42b6 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Sun, 25 Jan 2009 10:32:34 +0100 Subject: [PATCH] Added the management of the notification email addresses. --- src/IDF/Form/TabsConf.php | 14 ++++++++++++++ src/IDF/Views/Project.php | 7 ++++++- src/IDF/templates/idf/admin/tabs.html | 24 ++++++++++++++++++++++-- www/media/idf/css/style.css | 2 +- 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/IDF/Form/TabsConf.php b/src/IDF/Form/TabsConf.php index 3c64de2..9b4eb30 100644 --- a/src/IDF/Form/TabsConf.php +++ b/src/IDF/Form/TabsConf.php @@ -57,6 +57,20 @@ class IDF_Form_TabsConf extends Pluf_Form '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( array('required' => false, 'label' => __('Private project'), diff --git a/src/IDF/Views/Project.php b/src/IDF/Views/Project.php index 0c97580..d41a1d9 100644 --- a/src/IDF/Views/Project.php +++ b/src/IDF/Views/Project.php @@ -430,7 +430,12 @@ class IDF_Views_Project $params = array(); $keys = array('downloads_access_rights', 'source_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) { $_val = $request->conf->getVal($key, false); if ($_val !== false) { diff --git a/src/IDF/templates/idf/admin/tabs.html b/src/IDF/templates/idf/admin/tabs.html index 94611a9..366419a 100644 --- a/src/IDF/templates/idf/admin/tabs.html +++ b/src/IDF/templates/idf/admin/tabs.html @@ -12,34 +12,54 @@
+ + + + + + + + + + - - diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css index cd1d03e..dace477 100644 --- a/www/media/idf/css/style.css +++ b/www/media/idf/css/style.css @@ -48,7 +48,7 @@ a:active{ } .a-c { - text-align: center; + text-align: center !important; } .dellink {
 {trans 'Access Rights'}{trans 'Notification Email'}
{$form.f.downloads_access_rights.labelTag}: {if $form.f.downloads_access_rights.errors}{$form.f.downloads_access_rights.fieldErrors}{/if} {$form.f.downloads_access_rights|unsafe} {if $form.f.downloads_notification_email.errors}{$form.f.downloads_notification_email.fieldErrors}{/if} +{$form.f.downloads_notification_email|unsafe} +
{$form.f.wiki_access_rights.labelTag}: {if $form.f.wiki_access_rights.errors}{$form.f.wiki_access_rights.fieldErrors}{/if} {$form.f.wiki_access_rights|unsafe} {if $form.f.wiki_notification_email.errors}{$form.f.wiki_notification_email.fieldErrors}{/if} +{$form.f.wiki_notification_email|unsafe} +
{$form.f.issues_access_rights.labelTag}: {if $form.f.issues_access_rights.errors}{$form.f.issues_access_rights.fieldErrors}{/if} {$form.f.issues_access_rights|unsafe} {if $form.f.issues_notification_email.errors}{$form.f.issues_notification_email.fieldErrors}{/if} +{$form.f.issues_notification_email|unsafe} +
{$form.f.source_access_rights.labelTag}: {if $form.f.source_access_rights.errors}{$form.f.source_access_rights.fieldErrors}{/if} {$form.f.source_access_rights|unsafe} {if $form.f.source_notification_email.errors}{$form.f.source_notification_email.fieldErrors}{/if} +{$form.f.source_notification_email|unsafe} +
{$form.f.review_access_rights.labelTag}: {if $form.f.review_access_rights.errors}{$form.f.review_access_rights.fieldErrors}{/if} {$form.f.review_access_rights|unsafe} {if $form.f.review_notification_email.errors}{$form.f.review_notification_email.fieldErrors}{/if} +{$form.f.review_notification_email|unsafe} +
{if $form.f.private_project.errors}{$form.f.private_project.fieldErrors}{/if} @@ -49,14 +69,14 @@
 {$form.f.authorized_users.labelTag}:
+
{$form.f.authorized_users.labelTag}:
{if $form.f.authorized_users.errors}{$form.f.authorized_users.fieldErrors}{/if} {$form.f.authorized_users|unsafe}
  +