<!DOCTYPE html>
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
<head>
|
<th:block th:include="include :: header('邮件模板配置')"/>
|
<th:block th:include="include :: datetimepicker-css"/>
|
<th:block th:include="include :: select2-css" />
|
<th:block th:include="include :: bootstrap-select-css" />
|
</head>
|
<body class="white-bg">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<form class="form-horizontal m" id="form-email_edit-add">
|
<input th:type="hidden" id="id" name="id" th:value="${emailTemplate.id}">
|
<!--测试者邀请邮件模板 -->
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.test_package.005}]]:</label>
|
<div class="col-sm-8">
|
<select name="inviteType" id="inviteType" class="form-control noselect2 selectpicker" th:with="type=${@dict.getType('lang_type')}" multiple>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
th:value="${dict.dictValue}"
|
th:selected="${dict.dictValue} eq 'Chinese' and ${emailTemplate.inviteCnTemplate} != null
|
or ${dict.dictValue} eq 'English' and ${emailTemplate.inviteUsTemplate} != null
|
or ${dict.dictValue} eq 'Thai' and ${emailTemplate.inviteThTemplate} != null ">
|
</option>
|
</select>
|
</div>
|
</div>
|
<div class="form-group" id="inviteCnTemplateDiv" th:style="'display:' + @{(*{emailTemplate.inviteCnTemplate} ? 'block' : 'none')} + ''">
|
<label class="col-sm-3 control-label">[[#{dict.ic124}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="inviteCnTemplate" name="inviteCnTemplate" th:text="${emailTemplate.inviteCnTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
<div class="form-group" id="inviteUsTemplateDiv" th:style="'display:' + @{(*{emailTemplate.inviteUsTemplate} ? 'block' : 'none')} + ''">
|
<label class="col-sm-3 control-label">[[#{dict.ic125}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="inviteUsTemplate" name="inviteUsTemplate" th:text="${emailTemplate.inviteUsTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
<div class="form-group" id="inviteThTemplateDiv" th:style="'display:' + @{(*{emailTemplate.inviteThTemplate} ? 'block' : 'none')} + ''">
|
<label class="col-sm-3 control-label">[[#{dict.ic126}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="inviteThTemplate" name="inviteThTemplate" th:text="${emailTemplate.inviteThTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
|
|
<!--HR邮件模板 -->
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.test_package.hrinvitationEmailContent}]]:</label>
|
<div class="col-sm-8">
|
<select name="hrType" id="hrType" class="form-control noselect2 selectpicker" th:with="type=${@dict.getType('lang_type')}" multiple>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
th:value="${dict.dictValue}"
|
th:selected="${dict.dictValue} eq 'Chinese' and ${emailTemplate.hrCnTemplate} != null
|
or ${dict.dictValue} eq 'English' and ${emailTemplate.hrUsTemplate} != null
|
or ${dict.dictValue} eq 'Thai' and ${emailTemplate.hrThTemplate} != null ">
|
</option>
|
</select>
|
</div>
|
</div>
|
<div class="form-group" id="hrCnTemplateDiv" th:style="'display:' + @{(*{emailTemplate.hrCnTemplate} ? 'block' : 'none')} + ''">
|
<label class="col-sm-3 control-label">[[#{dict.ic124}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="hrCnTemplate" name="hrCnTemplate" th:text="${emailTemplate.hrCnTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
<div class="form-group" id="hrUsTemplateDiv" th:style="'display:' + @{(*{emailTemplate.hrUsTemplate} ? 'block' : 'none')} + ''">
|
<label class="col-sm-3 control-label">[[#{dict.ic125}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="hrUsTemplate" name="hrUsTemplate" th:text="${emailTemplate.hrUsTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
<div class="form-group" id="hrThTemplateDiv" th:style="'display:' + @{(*{emailTemplate.hrThTemplate} ? 'block' : 'none')} + ''">
|
<label class="col-sm-3 control-label">[[#{dict.ic126}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="hrThTemplate" name="hrThTemplate" th:text="${emailTemplate.hrThTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
|
<!-- 测试者接收报告邮件 -->
|
<div class="form-group">
|
<label class="col-sm-3 control-label">[[#{jsp.exam.test_package.memberEmailContent}]]:</label>
|
<div class="col-sm-8">
|
<select name="memberType" id="memberType" class="form-control noselect2 selectpicker" th:with="type=${@dict.getType('lang_type')}" multiple>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
th:value="${dict.dictValue}"
|
th:selected="${dict.dictValue} eq 'Chinese' and ${emailTemplate.memberCnTemplate} != null
|
or ${dict.dictValue} eq 'English' and ${emailTemplate.memberUsTemplate} != null
|
or ${dict.dictValue} eq 'Thai' and ${emailTemplate.memberThTemplate} != null ">
|
</select>
|
</div>
|
</div>
|
<div class="form-group" id="memberCnTemplateDiv" th:style="'display:' + @{(*{emailTemplate.memberCnTemplate} ? 'block' : 'none')} + ''">
|
<label class="col-sm-3 control-label">[[#{dict.ic124}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="memberCnTemplate" name="memberCnTemplate" th:text="${emailTemplate.memberCnTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
<div class="form-group" id="memberUsTemplateDiv" th:style="'display:' + @{(*{emailTemplate.memberUsTemplate} ? 'block' : 'none')} + ''">
|
<label class="col-sm-3 control-label">[[#{dict.ic125}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="memberUsTemplate" name="memberUsTemplate" th:text="${emailTemplate.memberUsTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
<div class="form-group" id="memberThTemplateDiv" th:style="'display:' + @{(*{emailTemplate.memberThTemplate} ? 'block' : 'none')} + ''">
|
<label class="col-sm-3 control-label">[[#{dict.ic126}]]:</label>
|
<div class="col-sm-8">
|
<textarea id="memberThTemplate" name="memberThTemplate" th:text="${emailTemplate.memberThTemplate}" class="form-control" rows="10" cols="60"></textarea>
|
</div>
|
</div>
|
|
</form>
|
</div>
|
<th:block th:include="include :: footer"/>
|
<th:block th:include="include :: datetimepicker-js"/>
|
<th:block th:include="include :: select2-js" />
|
<th:block th:include="include :: bootstrap-select-js" />
|
<script type="text/javascript">
|
var prefix = ctx + "exam/template"
|
$("#form-email_edit-add").validate({
|
focusCleanup: true
|
});
|
|
function submitHandler() {
|
if ($.validate.form()) {
|
$.operate.save(prefix + "/emailEdit", $('#form-email_edit-add').serialize());
|
}
|
}
|
|
$(function () {
|
$.table.testPackDefault();
|
});
|
|
/**
|
* 邀请测试者通知模板
|
*/
|
$("#inviteType").change(function(){
|
var opt = $("#inviteType").val();
|
//没有选中
|
if (opt != null){
|
var Chinese = 0;
|
var English = 0;
|
var Thai = 0;
|
//选中后拼接语言赋值模板
|
for(var i = 0;i < opt.length;i++){
|
if(opt[i] == 'Chinese'){
|
$('#inviteCnTemplateDiv').attr("style","display:block;");
|
Chinese = 1;
|
}else if(opt[i] == 'English'){
|
$('#inviteUsTemplateDiv').attr("style","display:block;");
|
English = 1;
|
}else if(opt[i] == 'Thai'){
|
$('#inviteThTemplateDiv').attr("style","display:block;");
|
Thai = 1;
|
}
|
}
|
if(Chinese == 0){
|
$('#inviteCnTemplateDiv').attr("style","display:none;");
|
}
|
if(English == 0){
|
$('#inviteUsTemplateDiv').attr("style","display:none;");
|
}
|
if(Thai == 0){
|
$('#inviteThTemplateDiv').attr("style","display:none;");
|
}
|
}else{
|
$('#inviteCnTemplateDiv').attr("style","display:none;");
|
$('#inviteUsTemplateDiv').attr("style","display:none;");
|
$('#inviteThTemplateDiv').attr("style","display:none;");
|
}
|
});
|
|
/**
|
* HR通知模板
|
*/
|
$("#hrType").change(function(){
|
var opt = $("#hrType").val();
|
//没有选中
|
if (opt != null){
|
var Chinese = 0;
|
var English = 0;
|
var Thai = 0;
|
//选中后拼接语言赋值模板
|
for(var i = 0;i < opt.length;i++){
|
if(opt[i] == 'Chinese'){
|
$('#hrCnTemplateDiv').attr("style","display:block;");
|
Chinese = 1;
|
}else if(opt[i] == 'English'){
|
$('#hrUsTemplateDiv').attr("style","display:block;");
|
English = 1;
|
}else if(opt[i] == 'Thai'){
|
$('#hrThTemplateDiv').attr("style","display:block;");
|
Thai = 1;
|
}
|
}
|
if(Chinese == 0){
|
$('#hrCnTemplateDiv').attr("style","display:none;");
|
}
|
if(English == 0){
|
$('#hrUsTemplateDiv').attr("style","display:none;");
|
}
|
if(Thai == 0){
|
$('#hrThTemplateDiv').attr("style","display:none;");
|
}
|
}else{
|
$('#hrCnTemplateDiv').attr("style","display:none;");
|
$('#hrUsTemplateDiv').attr("style","display:none;");
|
$('#hrThTemplateDiv').attr("style","display:none;");
|
}
|
});
|
|
/**
|
* 测试者通知模板
|
*/
|
$("#memberType").change(function(){
|
var opt = $("#memberType").val();
|
//没有选中
|
if (opt != null){
|
var Chinese = 0;
|
var English = 0;
|
var Thai = 0;
|
//选中后拼接语言赋值模板
|
for(var i = 0;i < opt.length;i++){
|
if(opt[i] == 'Chinese'){
|
$('#memberCnTemplateDiv').attr("style","display:block;");
|
Chinese = 1;
|
}else if(opt[i] == 'English'){
|
$('#memberUsTemplateDiv').attr("style","display:block;");
|
English = 1;
|
}else if(opt[i] == 'Thai'){
|
$('#memberThTemplateDiv').attr("style","display:block;");
|
Thai = 1;
|
}
|
}
|
if(Chinese == 0){
|
$('#memberCnTemplateDiv').attr("style","display:none;");
|
}
|
if(English == 0){
|
$('#memberUsTemplateDiv').attr("style","display:none;");
|
}
|
if(Thai == 0){
|
$('#memberThTemplateDiv').attr("style","display:none;");
|
}
|
}else{
|
$('#memberCnTemplateDiv').attr("style","display:none;");
|
$('#memberUsTemplateDiv').attr("style","display:none;");
|
$('#memberThTemplateDiv').attr("style","display:none;");
|
}
|
});
|
</script>
|
</body>
|
</html>
|