Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/186_tianshujie_19786

This commit is contained in:
tianshujie
2022-03-01 15:51:34 +08:00
2 changed files with 12 additions and 4 deletions
+10 -2
View File
@@ -1001,13 +1001,21 @@ EOF;
{
if($_POST)
{
$data = fixer::input('post')->get();
$data = fixer::input('post')->setDefault('users', array())->get();
if($data->mode == 'new')
{
if(empty($data->newList))
{
dao::$errors['newList'] = sprintf($this->lang->error->notempty, $this->lang->user->contacts->listName);
$response['result'] = 'fail';
$response['message'] = dao::getError();
return $this->send($response);
}
$listID = $this->user->createContactList($data->newList, $data->users);
$this->user->setGlobalContacts($listID, isset($data->share));
if(isonlybody()) return print(js::closeModal('parent.parent', '', ' function(){parent.parent.ajaxGetContacts(\'#mailto\')}'));
return print(js::locate(inlink('manageContacts', "listID=$listID"), 'parent'));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('manageContacts', "listID=$listID")));
}
elseif($data->mode == 'edit')
{
+2 -2
View File
@@ -36,8 +36,8 @@
</h2>
</div>
<form method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<form method='post' target='hiddenwin' id='dataform' class='main-form form-ajax' enctype='multipart/form-data'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->user->contacts->listName;?></th>
<td class='w-300px'>