diff --git a/module/bug/ui/assignto.html.php b/module/bug/ui/assignto.html.php
index d8a8c42d42..025cd67426 100644
--- a/module/bug/ui/assignto.html.php
+++ b/module/bug/ui/assignto.html.php
@@ -32,7 +32,7 @@ formPanel
formGroup
(
set::label($lang->bug->mailto),
- mailto(set::items($users), set::value(str_replace(' ', '', $bug->mailto ?: '')))
+ mailto(set::items($users), set::value($bug->mailto))
),
formGroup
(
diff --git a/module/bug/ui/confirm.html.php b/module/bug/ui/confirm.html.php
index ffd7adcb65..d6d556dea3 100644
--- a/module/bug/ui/confirm.html.php
+++ b/module/bug/ui/confirm.html.php
@@ -70,7 +70,7 @@ formPanel
formGroup
(
set::label($lang->bug->lblMailto),
- mailto(set::items($users), set::value(str_replace(' ', '', $bug->mailto ?: '')))
+ mailto(set::items($users), set::value($bug->mailto))
),
formGroup
(
diff --git a/module/bug/ui/create.html.php b/module/bug/ui/create.html.php
index 4151b98c04..2346af46e4 100644
--- a/module/bug/ui/create.html.php
+++ b/module/bug/ui/create.html.php
@@ -377,11 +377,7 @@ formPanel
(
set::width('1/2'),
set::label($lang->bug->lblMailto),
- mailto
- (
- set::items($users),
- set::value($bug->mailto ? str_replace(' ', '', $bug->mailto) : '')
- )
+ mailto(set::items($users), set::value($bug->mailto))
),
formGroup
(
diff --git a/module/doc/ui/create.html.php b/module/doc/ui/create.html.php
index 4d9a023cdd..4bfd9a13e5 100644
--- a/module/doc/ui/create.html.php
+++ b/module/doc/ui/create.html.php
@@ -194,12 +194,7 @@ else
formGroup
(
set::label($lang->doc->mailto),
- picker
- (
- set::multiple(true),
- set::name('mailto[]'),
- set::items($users)
- )
+ mailto(set::items($users))
),
formGroup
(
diff --git a/module/doc/ui/edit.html.php b/module/doc/ui/edit.html.php
index e9c509bacc..4958ee6716 100644
--- a/module/doc/ui/edit.html.php
+++ b/module/doc/ui/edit.html.php
@@ -148,13 +148,7 @@ form
formGroup
(
set::label($lang->doc->mailto),
- picker
- (
- set::multiple(true),
- set::name('mailto[]'),
- set::items($users),
- set::value($doc->mailto)
- )
+ mailto(set::items($users), set::value($doc->mailto))
),
formGroup
(
diff --git a/module/release/ui/create.html.php b/module/release/ui/create.html.php
index e34cb99416..d0247b64f9 100644
--- a/module/release/ui/create.html.php
+++ b/module/release/ui/create.html.php
@@ -103,12 +103,7 @@ formPanel
formGroup
(
set::label($lang->release->mailto),
- picker
- (
- set::name('mailto[]'),
- set::items($users),
- set::multiple(true)
- )
+ mailto(set::items($users))
),
formGroup
(
diff --git a/module/release/ui/edit.html.php b/module/release/ui/edit.html.php
index 8cf806993c..da43d4ba32 100644
--- a/module/release/ui/edit.html.php
+++ b/module/release/ui/edit.html.php
@@ -87,13 +87,7 @@ formPanel
formGroup
(
set::label($lang->release->mailto),
- picker
- (
- set::name('mailto[]'),
- set::value($release->mailto),
- set::items($users),
- set::multiple(true)
- )
+ mailto(set::items($users), set::value($release->mailto))
),
formGroup
(
diff --git a/module/story/ui/create.html.php b/module/story/ui/create.html.php
index 5a74265b52..3ad1d01d83 100644
--- a/module/story/ui/create.html.php
+++ b/module/story/ui/create.html.php
@@ -398,14 +398,7 @@ formPanel
formGroup
(
set::label($lang->story->mailto),
- picker
- (
- setID('mailto'),
- set::name('mailto[]'),
- set::items($fields['mailto']['options']),
- set::value($fields['mailto']['default']),
- set::multiple(true)
- )
+ mailto(set::items($fields['mailto']['options']), set::value($fields['mailto']['default']))
),
formGroup
(
diff --git a/module/story/ui/edit.html.php b/module/story/ui/edit.html.php
index 657723885b..045b0455be 100644
--- a/module/story/ui/edit.html.php
+++ b/module/story/ui/edit.html.php
@@ -324,29 +324,7 @@ detailBody
item
(
set::name($lang->story->mailto),
- inputGroup
- (
- picker(setID('mailto'), set::name('mailto[]'), set::items($fields['mailto']['options']), set::value($fields['mailto']['default']), set::multiple(true)),
- isset($contactList) ? picker
- (
- setID('contactListMenu'),
- set::name('contactListMenu'),
- set::items($contactList),
- set::value()
- ) : btn
- (
- set('url', createLink('my', 'managecontacts', 'listID=0&mode=new')),
- set('title', $lang->user->contacts->manage),
- setData(array('toggle' => 'modal')),
- icon('cog')
- ),
- isset($contactList) ? null : btn
- (
- setID('refreshMailto'),
- setClass('text-black'),
- icon('refresh')
- )
- )
+ mailto(set::items($fields['mailto']['options']), set::value($fields['mailto']['default']))
),
),
tableData
diff --git a/module/task/ui/create.html.php b/module/task/ui/create.html.php
index 4ebc8cb505..67939b311d 100644
--- a/module/task/ui/create.html.php
+++ b/module/task/ui/create.html.php
@@ -597,12 +597,7 @@ formPanel
(
setClass($hiddenMailto),
set::label($lang->product->mailto),
- picker
- (
- set::multiple(true),
- set::name('mailto[]'),
- set::items($users)
- )
+ mailto(set::items($users))
),
$afterRow,
);
diff --git a/module/task/ui/edit.html.php b/module/task/ui/edit.html.php
index 65c236a84f..2f9ed35b75 100644
--- a/module/task/ui/edit.html.php
+++ b/module/task/ui/edit.html.php
@@ -306,49 +306,7 @@ detailBody
item
(
set::name($lang->task->mailto),
- inputGroup
- (
- picker
- (
- setID('mailto'),
- set::name('mailto[]'),
- set::value($task->mailto),
- set::items($mailtoOptions),
- set::multiple(true)
- ),
- span
- (
- setID('contactBox'),
- setClass('input-group-addon'),
- $contactListMenuOptions ? setStyle(array('width' => '100px', 'padding' => '0')) : null,
- $contactListMenuOptions ? picker
- (
- setClass('w-20'),
- set::name('contactListMenuOptionsMenu'),
- set::items($contactListMenuOptions),
- set::placeholder($lang->contact->common)
- ) :
- span
- (
- setClass('input-group-addon'),
- a
- (
- set('href', createLink('my', 'managecontacts', 'listID=0&mode=new')),
- set('title', $lang->user->contacts->manage),
- setClass('mr-2'),
- setData(array('toggle' => 'modal')),
- icon('cog'),
- ),
- a
- (
- setID('refreshMailto'),
- setClass('text-black'),
- set('href', 'javascript:void(0)'),
- icon('refresh')
- )
- )
- )
- )
+ mailto(set::items($mailtoOptions), set::value($task->mailto))
)
),
modalTrigger
diff --git a/module/task/zen.php b/module/task/zen.php
index df38272a95..2ad635d6c7 100644
--- a/module/task/zen.php
+++ b/module/task/zen.php
@@ -279,7 +279,6 @@ class taskZen extends task
$this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
$this->view->modules = $this->tree->getTaskOptionMenu($task->execution, 0, $this->view->showAllModule ? 'allModule' : '');
$this->view->executions = $executions;
- $this->view->contactLists = $this->loadModel('user')->getContactLists();
$this->display();
}
diff --git a/module/testtask/control.php b/module/testtask/control.php
index 0d34dc5c76..d3e712e8af 100644
--- a/module/testtask/control.php
+++ b/module/testtask/control.php
@@ -644,11 +644,10 @@ class testtask extends control
/* Set menu. */
$this->loadModel('qa')->setMenu($productID, $testtask->branch);
- $this->view->title = $testtask->name . $this->lang->colon . $this->lang->close;
- $this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
- $this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted|qdfirst');
- $this->view->contactLists = $this->user->getContactLists();
- $this->view->testtask = $testtask;
+ $this->view->title = $testtask->name . $this->lang->colon . $this->lang->close;
+ $this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
+ $this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted|qdfirst');
+ $this->view->testtask = $testtask;
$this->display();
}
diff --git a/module/testtask/ui/close.html.php b/module/testtask/ui/close.html.php
index b12281bd59..5ca579a118 100644
--- a/module/testtask/ui/close.html.php
+++ b/module/testtask/ui/close.html.php
@@ -32,22 +32,7 @@ formPanel
formGroup
(
set::label($lang->testtask->mailto),
- inputGroup
- (
- picker
- (
- set::name('mailto'),
- set::items($users),
- set::value($testtask->mailto ? str_replace(' ', '', $testtask->mailto) : ''),
- set::multiple(true)
- ),
- $contactList ? picker
- (
- set::name('contact'),
- set::items($contactList),
- on::change("setMailto('mailto', this.value)")
- ) : null
- )
+ mailto(set::items($users), set::value($testtask->mailto))
),
set::actions(array('submit'))
);
diff --git a/module/testtask/ui/create.html.php b/module/testtask/ui/create.html.php
index 6d8a6fee75..2b7a3a5790 100644
--- a/module/testtask/ui/create.html.php
+++ b/module/testtask/ui/create.html.php
@@ -195,12 +195,7 @@ formPanel
formGroup
(
set::label($lang->testtask->mailto),
- picker
- (
- set::multiple(true),
- set::name('mailto[]'),
- set::items($users)
- )
+ mailto(set::items($users))
)
);
diff --git a/module/testtask/ui/edit.html.php b/module/testtask/ui/edit.html.php
index 7d07a1967f..615f2cdcf0 100644
--- a/module/testtask/ui/edit.html.php
+++ b/module/testtask/ui/edit.html.php
@@ -162,11 +162,7 @@ formPanel
formGroup
(
set::label($lang->testtask->mailto),
- set::name('mailto[]'),
- set::value($task->mailto ? str_replace(' ', '', $task->mailto) : ''),
- set::control('picker'),
- set::items($users),
- set::multiple(true)
+ mailto(set::items($users), set::value($task->mailto))
)
);
diff --git a/module/testtask/ui/importunitresult.html.php b/module/testtask/ui/importunitresult.html.php
index 04d491e34b..737f1e79b0 100644
--- a/module/testtask/ui/importunitresult.html.php
+++ b/module/testtask/ui/importunitresult.html.php
@@ -147,15 +147,7 @@ formPanel
formGroup
(
set::label($lang->testtask->mailto),
- inputGroup
- (
- picker
- (
- set::name('mailto[]'),
- set::items($users),
- set::multiple(true)
- )
- )
+ mailto(set::items($users))
)
);