diff --git a/sino-activity/src/main/resources/templates/activity/info/add.html b/sino-activity/src/main/resources/templates/activity/info/add.html index 3127e6bf6..393351af9 100644 --- a/sino-activity/src/main/resources/templates/activity/info/add.html +++ b/sino-activity/src/main/resources/templates/activity/info/add.html @@ -1121,6 +1121,8 @@ // 该事件在离开某个步骤之前触发 $("#smartwizard").on("leaveStep", function (e, anchorObject, currentStepNumber, nextStepNumber, stepDirection) { if (stepDirection == 'forward') { + var form = $("#step-" + (currentStepNumber + 1)).find('.form'); + console.log(form); return $("#step-" + (currentStepNumber + 1)).validate({ errorPlacement: function(error, element) { error.appendTo(element.parent().parent().parent()); diff --git a/sino-activity/src/main/resources/templates/activity/info/edit.html b/sino-activity/src/main/resources/templates/activity/info/edit.html index 8c2320fea..32f540d97 100644 --- a/sino-activity/src/main/resources/templates/activity/info/edit.html +++ b/sino-activity/src/main/resources/templates/activity/info/edit.html @@ -375,18 +375,18 @@
-
+
- +
选择图片更改 - + 清除 + data-dismiss="fileinput" onclick="clecreq('pic')">清除
@@ -651,9 +651,9 @@ 选择图片更改 + onchange="syncPic(this)" th:value="*{actPageConfigUserinfo.bgImg}"> 清除 + data-dismiss="fileinput" onclick="clecreq('picture')">清除
@@ -827,10 +827,10 @@
选择图片更改 - + 清除 + data-dismiss="fileinput" onclick="clecreq('shareImg')">清除
选择图片更改 + name="actPageConfigSubscribe-bgImg" onchange="syncPic(this)" th:value="*{actPageConfigSubscribe.bgImg}" + > 清除 + data-dismiss="fileinput" onclick="clecreq('backdropImg')">清除 @@ -913,10 +913,10 @@ 选择图片更改 + name="actPageConfigSubscribe-bgImg2" onchange="syncPic(this)" th:value="*{actPageConfigSubscribe.qrCode}" + > 清除 + data-dismiss="fileinput" onclick="clecreq('qrCodeImg')">清除 @@ -1255,6 +1255,8 @@ // 该事件在离开某个步骤之前触发 $("#smartwizard").on("leaveStep", function (e, anchorObject, currentStepNumber, nextStepNumber, stepDirection) { if (stepDirection == 'forward') { + var form = $("#step-" + (currentStepNumber + 1)).context.forms; + console.log(form); return $("#step-" + (currentStepNumber + 1)).validate({ errorPlacement: function(error, element) { error.appendTo(element.parent().parent().parent()); @@ -1374,6 +1376,10 @@ } } + //补丁,添加必填校验 + function clecreq(val){ + $('#'+val).attr("required","true"); + }