mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-23 02:45:33 +08:00
83 lines
3.7 KiB
HTML
83 lines
3.7 KiB
HTML
<!--
|
||
Copyright 2012-2026 ShopeX (https://www.shopex.cn)
|
||
|
||
Licensed under the Apache License, Version 2.0 (the "License");
|
||
you may not use this file except in compliance with the License.
|
||
You may obtain a copy of the License at
|
||
|
||
http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
Unless required by applicable law or agreed to in writing, software
|
||
distributed under the License is distributed on an "AS IS" BASIS,
|
||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
See the License for the specific language governing permissions and
|
||
limitations under the License.
|
||
-->
|
||
|
||
<form method="post" action="index.php?app=monitor&ctl=admin_email&act=save" class="tableform" id="report_mail_edit">
|
||
<div class="tableform">
|
||
<div class="division" id='email_config'>
|
||
<table cellspacing="0" cellpadding="0" width="100%">
|
||
<tbody>
|
||
<tr>
|
||
<th><em class="red">*</em><label><{t}>smtp 主机地址:<{/t}></label></th>
|
||
<td><input type="text" vtype="required" size="32" name="mail[smtpserver]" class="x-input" autocomplete="off" value='<{$data.smtpserver}>'/></td>
|
||
</tr>
|
||
<tr>
|
||
<th><em class="red">*</em><label><{t}>smtp 主机端口:<{/t}></label></th>
|
||
<td><input type="text" vtype="required" size="32" name="mail[smtpport]" class="x-input" autocomplete="off" value='<{$data.smtpport}>'/></td>
|
||
</tr>
|
||
<tr>
|
||
<th><em class="red">*</em><label><{t}>是否启用SSL方式:<{/t}></label></th>
|
||
<td>
|
||
<input type="radio" name="mail[smtpssl]" autocomplete="off" <{if $data.smtpssl == '1'}>checked="checked"<{/if}> value='1' />是
|
||
<input type="radio" name="mail[smtpssl]" autocomplete="off" <{if $data.smtpssl == '2'}>checked="checked"<{/if}> value='2' />否
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th><em class="red">*</em><label><{t}>发件邮箱:<{/t}></label></th>
|
||
<td><input type="text" vtype="required" size="32" name="mail[usermail]" class="x-input" autocomplete="off" value='<{$data.usermail}>'/></td>
|
||
</tr>
|
||
<tr>
|
||
<th><em class="red">*</em><label><{t}>发件名称:<{/t}></label></th>
|
||
<td><input type="text" vtype="required" size="32" name="mail[fromname]" class="x-input" autocomplete="off" value='<{$data.fromname}>'/></td>
|
||
</tr>
|
||
<tr>
|
||
<th><em class="red">*</em><label><{t}>发件密码:<{/t}></label></th>
|
||
<td><input type="password" vtype="required" size="32" name="mail[smtppasswd]" class="x-input" autocomplete="off" value='<{$data.smtppasswd}>'/></td>
|
||
</tr>
|
||
<tr>
|
||
<td><{button class="btn-primary" id="report-mail-form-submit" type="submit" label="确定" }></td>
|
||
<!-- <td><{button label=$___desktop="测试配置"|t:'desktop' onclick="new Dialog('index.php?app=monitor&ctl=admin_email&act=testEmail&'+$('report_mail_edit').toQueryString(),{width:590,ajaksable:false})"}></td>-->
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<script>
|
||
(function(){
|
||
var _form = $('report_mail_edit');
|
||
var btn =$('report-mail-form-submit');
|
||
var finder = finderGroup['<{$env.get.finder_id}>'];
|
||
_form.store('target',{
|
||
onComplete:function(){
|
||
},
|
||
onSuccess:function(response){
|
||
var hash_res_obj = JSON.decode(response);
|
||
if (hash_res_obj.success != undefined && hash_res_obj.success != ""){
|
||
try{
|
||
var _dialogIns = btn.getParent('.dialog').retrieve('instance');
|
||
}catch(e){}
|
||
if(_dialogIns){
|
||
_dialogIns.close();
|
||
}
|
||
}
|
||
}
|
||
});
|
||
btn.addEvent('click',function(){
|
||
_form.fireEvent('submit',{stop:$empty});
|
||
});
|
||
})();
|
||
</script>
|