diff --git a/module/execution/model.php b/module/execution/model.php
index b7fcebdba7..80c1f014c1 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -329,7 +329,7 @@ class executionModel extends model
->join('whitelist', ',')
->add('type', $type)
->stripTags($this->config->execution->editor->create['id'], $this->config->allowedTags)
- ->remove('products, workDays, delta, branch, uid, plans, teams, teamMembers')
+ ->remove('products, workDays, delta, branch, uid, plans, teams, teamMembers, contactListMenu')
->get();
/* Check the workload format and total. */
@@ -487,7 +487,7 @@ class executionModel extends model
->setDefault('team', $this->post->name)
->join('whitelist', ',')
->stripTags($this->config->execution->editor->edit['id'], $this->config->allowedTags)
- ->remove('products, branch, uid, plans, syncStories')
+ ->remove('products, branch, uid, plans, syncStories, contactListMenu')
->get();
if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php
index 86d5af042a..f06567ccca 100644
--- a/module/execution/view/create.html.php
+++ b/module/execution/view/create.html.php
@@ -227,9 +227,12 @@
| whitelist;?> |
- |
- |
- |
+
+
+
+ fetch('my', 'buildContactLists', 'whitelist');?>
+
+ |
|
diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php
index 8c82adaac2..2f19524ce7 100644
--- a/module/execution/view/edit.html.php
+++ b/module/execution/view/edit.html.php
@@ -191,8 +191,12 @@
|
| whitelist;?> |
- whitelist, 'class="form-control chosen" multiple');?> |
- |
+
+
+ whitelist, 'class="form-control chosen" multiple');?>
+ fetch('my', 'buildContactLists', 'whitelist');?>
+
+ |
|
diff --git a/module/my/control.php b/module/my/control.php
index 748fcb8c36..f1679c4fa1 100644
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -968,12 +968,14 @@ class my extends control
/**
* Build contact lists.
*
+ * @param dropdownName
* @access public
* @return void
*/
- public function buildContactLists()
+ public function buildContactLists($dropdownName = 'mailto')
{
$this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');
+ $this->view->dropdownName = $dropdownName;
$this->display();
}
diff --git a/module/my/view/buildcontactlists.html.php b/module/my/view/buildcontactlists.html.php
index e9aca7c780..a775184488 100644
--- a/module/my/view/buildcontactlists.html.php
+++ b/module/my/view/buildcontactlists.html.php
@@ -13,7 +13,14 @@
#contactListMenu_chosen {width: 100px !important;}
#contactListMenu + .chosen-container {min-width: 100px;}
-td > #mailto + .chosen-container .chosen-choices {border-radius: 2px 2px 0 0;}
-td > #mailto + .chosen-container + #contactListMenu + .chosen-container > .chosen-single {border-radius: 0 0 2px 2px; border-top-width: 0; padding-top: 6px;}
+td > + .chosen-container .chosen-choices {border-radius: 2px 2px 0 0;}
+td > + .chosen-container + #contactListMenu + .chosen-container > .chosen-single {border-radius: 0 0 2px 2px; border-top-width: 0; padding-top: 6px;}
#contactListMenu + .chosen-container.chosen-container-active > .chosen-single {border-top-width: 1px !important; padding-top: 5px !important;}
diff --git a/module/product/model.php b/module/product/model.php
index 8d5c25ca81..ab15ee5e8e 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -577,7 +577,7 @@ class productModel extends model
->stripTags($this->config->product->editor->create['id'], $this->config->allowedTags)
->join('whitelist', ',')
->join('reviewer', ',')
- ->remove('uid,newLine,lineName')
+ ->remove('uid,newLine,lineName,contactListMenu')
->get();
if(!empty($_POST['lineName']))
@@ -653,7 +653,7 @@ class productModel extends model
->join('whitelist', ',')
->join('reviewer', ',')
->stripTags($this->config->product->editor->edit['id'], $this->config->allowedTags)
- ->remove('uid,changeProjects')
+ ->remove('uid,changeProjects,contactListMenu')
->get();
if($this->config->systemMode == 'new')
diff --git a/module/product/view/create.html.php b/module/product/view/create.html.php
index ef4f24e87a..e67d5e995e 100644
--- a/module/product/view/create.html.php
+++ b/module/product/view/create.html.php
@@ -104,8 +104,12 @@
| whitelist;?> |
- |
- |
+
+
+
+ fetch('my', 'buildContactLists', 'whitelist');?>
+
+ |
|
diff --git a/module/product/view/edit.html.php b/module/product/view/edit.html.php
index 90a668e4da..c37febfa01 100644
--- a/module/product/view/edit.html.php
+++ b/module/product/view/edit.html.php
@@ -87,8 +87,12 @@
|
| whitelist;?> |
- whitelist, 'class="form-control chosen" multiple');?> |
- |
+
+
+ whitelist, 'class="form-control chosen" multiple');?>
+ fetch('my', 'buildContactLists', 'whitelist');?>
+
+ |
|
diff --git a/module/program/model.php b/module/program/model.php
index 30b797bdf2..b8fccaad7a 100644
--- a/module/program/model.php
+++ b/module/program/model.php
@@ -593,7 +593,7 @@ class programModel extends model
->add('type', 'program')
->join('whitelist', ',')
->stripTags($this->config->program->editor->create['id'], $this->config->allowedTags)
- ->remove('delta,future')
+ ->remove('delta,future,contactListMenu')
->get();
if($program->parent)
@@ -678,7 +678,7 @@ class programModel extends model
->setIF(!isset($this->post->budgetUnit), 'budgetUnit', $oldProgram->budgetUnit)
->join('whitelist', ',')
->stripTags($this->config->program->editor->edit['id'], $this->config->allowedTags)
- ->remove('uid,delta,future,syncPRJUnit,exchangeRate')
+ ->remove('uid,delta,future,syncPRJUnit,exchangeRate,contactListMenu')
->get();
$program = $this->loadModel('file')->processImgURL($program, $this->config->program->editor->edit['id'], $this->post->uid);
diff --git a/module/program/view/create.html.php b/module/program/view/create.html.php
index 8146ad15a0..63d864e277 100644
--- a/module/program/view/create.html.php
+++ b/module/program/view/create.html.php
@@ -114,9 +114,12 @@
|
| whitelist;?> |
- |
- |
- |
+
+
+
+ fetch('my', 'buildContactLists', 'whitelist');?>
+
+ |
|
diff --git a/module/program/view/edit.html.php b/module/program/view/edit.html.php
index e04d68b45e..d47a4bc4f6 100644
--- a/module/program/view/edit.html.php
+++ b/module/program/view/edit.html.php
@@ -99,9 +99,12 @@
|
| whitelist;?> |
- whitelist, 'class="form-control chosen" multiple');?> |
- |
- |
+
+
+ whitelist, 'class="form-control chosen" multiple');?>
+ fetch('my', 'buildContactLists', 'whitelist');?>
+
+ |
|
diff --git a/module/project/model.php b/module/project/model.php
index 35fc6a2f4a..b747dd204a 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -772,7 +772,7 @@ class projectModel extends model
->add('type', 'project')
->join('whitelist', ',')
->stripTags($this->config->project->editor->create['id'], $this->config->allowedTags)
- ->remove('products,branch,plans,delta,newProduct,productName,future')
+ ->remove('products,branch,plans,delta,newProduct,productName,future,contactListMenu')
->get();
$linkedProductsCount = 0;
@@ -985,7 +985,7 @@ class projectModel extends model
->setIF($this->post->budget != 0, 'budget', round($this->post->budget, 2))
->join('whitelist', ',')
->stripTags($this->config->project->editor->edit['id'], $this->config->allowedTags)
- ->remove('products,branch,plans,delta,future')
+ ->remove('products,branch,plans,delta,future,contactListMenu')
->get();
if($project->parent)
diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php
index e2fbb0a306..8590d502f6 100644
--- a/module/project/view/create.html.php
+++ b/module/project/view/create.html.php
@@ -159,9 +159,12 @@
|
| whitelist;?> |
- |
- |
- |
+
+
+
+ fetch('my', 'buildContactLists', 'whitelist');?>
+
+ |
| project->auth;?> |
diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php
index bd007d5e87..c069696863 100644
--- a/module/project/view/edit.html.php
+++ b/module/project/view/edit.html.php
@@ -172,9 +172,12 @@
| whitelist;?> |
- whitelist, 'class="form-control chosen" multiple');?> |
- |
- |
+
+
+ whitelist, 'class="form-control chosen" multiple');?>
+ fetch('my', 'buildContactLists', 'whitelist');?>
+
+ |
| project->auth;?> |
diff --git a/module/user/control.php b/module/user/control.php
index a9f281c40f..11ce68064c 100644
--- a/module/user/control.php
+++ b/module/user/control.php
@@ -1165,19 +1165,20 @@ class user extends control
* AJAX: get users from a contact list.
*
* @param int $contactListID
+ * @param string $dropdownName
* @access public
* @return string
*/
- public function ajaxGetContactUsers($contactListID)
+ public function ajaxGetContactUsers($contactListID, $dropdownName = 'mailto')
{
$list = $contactListID ? $this->user->getContactListByID($contactListID) : '';
$users = $this->user->getPairs('devfirst|nodeleted', $list ? $list->userList : '', $this->config->maxCount);
- if(isset($this->config->user->moreLink)) $this->config->moreLinks['mailto[]'] = $this->config->user->moreLink;
+ if(isset($this->config->user->moreLink)) $this->config->moreLinks[$dropdownName . "[]"] = $this->config->user->moreLink;
- if(!$contactListID) return print(html::select('mailto[]', $users, '', "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
+ if(!$contactListID) return print(html::select($dropdownName . "[]", $users, '', "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
- return print(html::select('mailto[]', $users, $list->userList, "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
+ return print(html::select($dropdownName . "[]", $users, $list->userList, "class='form-control chosen' multiple data-placeholder='{$this->lang->chooseUsersToMail}'"));
}
/**
diff --git a/www/js/my.full.js b/www/js/my.full.js
index 0dfee1616f..7c91460e43 100644
--- a/www/js/my.full.js
+++ b/www/js/my.full.js
@@ -136,7 +136,7 @@ function showMoreImage(obj)
*/
function setMailto(mailto, contactListID)
{
- link = createLink('user', 'ajaxGetContactUsers', 'listID=' + contactListID);
+ link = createLink('user', 'ajaxGetContactUsers', 'listID=' + contactListID + '&dropdownName=' + mailto);
$.get(link, function(users)
{
$('#' + mailto).replaceWith(users);