Commit 944e22af by Kim Gyeongeun

ポイント利用し、住所が未入力の場合、エラーメッセージをまとめて表示するように修正

parent 8fb7a80c
......@@ -7,6 +7,10 @@ import java.util.Calendar;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;
import jp.agentec.sinaburocast.action.AbstractAction;
import jp.agentec.sinaburocast.common.SinaburoConstant;
import jp.agentec.sinaburocast.common.util.SinaburoUtil;
......@@ -22,10 +26,6 @@ import jp.agentec.sinaburocast.service.MessageService;
import jp.agentec.sinaburocast.service.PointGetService;
import jp.agentec.sinaburocast.service.PointPeriodService;
import org.apache.log4j.Logger;
import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;
/**
* マイページ
*
......@@ -153,6 +153,7 @@ public class MyPageAction extends AbstractAction {
session.setAttribute("newsList",messageNewsList);
session.setAttribute("donationList",enq1perlist);
session.setAttribute("enqueteList",enqlist);
session.setAttribute("pointCheckFlg", false);
} else {
return "/user/login/login.html";
......
......@@ -299,113 +299,82 @@ public class UserEditAction extends AbstractAction {
Boolean flg = (Boolean) session.getAttribute("pointCheckFlg");
flg = flg == null ? false : flg;
if (flg) {
//住所関連エラーメッセージはまとめて表示する
ActionMessages addressErrorMsg = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (StringUtil.isBlank(userEditForm.zipCode)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("zipCode", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.zipCode"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("zipCode", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.zipCode"))));
}
if (StringUtil.isBlank(userEditForm.prefectureId)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("prefectureId", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.prefectureId"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("prefectureId", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.prefectureId"))));
}
if (StringUtil.isBlank(userEditForm.cityName)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("cityName", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.cityName"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("cityName", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.cityName"))));
}
if (StringUtil.isBlank(userEditForm.areaName)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("areaName", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.areaName"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("areaName", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.areaName"))));
}
if (StringUtil.isBlank(userEditForm.telNo)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("telNo", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.telNo"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("telNo", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.telNo"))));
}
if (StringUtil.isBlank(userEditForm.firstName)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("firstName", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.firstName"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("firstName", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.firstName"))));
}
if (StringUtil.isBlank(userEditForm.lastName)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("firstName", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.lastName"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("firstName", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.lastName"))));
}
if (StringUtil.isBlank(userEditForm.firstNameKana)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("firstNameKana", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.firstKana"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("firstNameKana", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.firstKana"))));
}
if (StringUtil.isBlank(userEditForm.lastNameKana)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("firstNameKana", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.lastKana"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("firstNameKana", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.lastKana"))));
}
if (StringUtil.isBlank(userEditForm.genderCd)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("genderCd", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.genderCd"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
addressErrorMsg.add("genderCd", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.genderCd"))));
}
if (StringUtil.isBlank(userEditForm.birthdayY) || StringUtil.isBlank(userEditForm.birthdayM) || StringUtil.isBlank(userEditForm.birthdayD)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
if (addressErrorMsg == null) {
addressErrorMsg = new ActionMessages();
}
messages.add("birthdayY", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.birthDay"))));
request.setAttribute(Globals.ERROR_KEY, messages);
addressErrorMsg.add("birthdayY", new ActionMessage(SinaburoViewUtil.getMessage("errors.required",SinaburoViewUtil.getMessage("labels.birthDay"))));
}
if (addressErrorMsg != null && !addressErrorMsg.isEmpty()) {
request.setAttribute(Globals.ERROR_KEY, addressErrorMsg);
return "/user/userEdit/uEdit.html";
}
}
// トークン発行
TokenProcessor.getInstance().saveToken(request);
session.setAttribute("userEditFormInfo", userEditForm);
session.setAttribute("pointCheckFlg", false);
return "/user/userEdit/uEditConfirm.html";
}
......
......@@ -12,8 +12,8 @@
<hr size="1">
【ご登録にあたっての注意】<br>
下記のモニター登録情報を正確にご入力ください。<br>
<font color="#ff0000">*</font>」印の項目は必ず登録してください。<br>
(※半角カナは使用しないでください)<br><br>
<font color="#ff0000">*</font>」印は登録時の必須項目です。
<br>(※半角カナは使用しないでください)<br><br>
■基本情報<br>
$!tools.getMsgs()
......
......@@ -10,8 +10,8 @@
<form action="$!confirm-url" method="post">
会員更新ページ
<hr size="1">
<font color="#ff0000">*</font>」印の項目は必ず登録してください。<br>
(※半角カナは使用しないでください)<br><br>
<font color="#ff0000">*</font>」印は登録時の必須項目です。ポイント利用の際はすべての項目について登録してください。
<br>(※半角カナは使用しないでください)<br><br>
$!tools.getMsg("pointUse")
■基本情報<br>
......
......@@ -13,7 +13,8 @@
<h2>会員情報入力</h2>
<h4>ご登録にあたっての注意</h4>
<p>ご登録いただけるのはお1人様1IDとなっています。「*」印の項目は必ず登録してください。<br/>(※半角カナは使用しないでください)</p>
<p>ご登録いただけるのはお1人様1IDとなっています。「*」印は登録時の必須項目です。
<br>(※半角カナは使用しないでください)</p>
<div class="bg_blue">
$!tools.getMsgs()
......
......@@ -59,7 +59,8 @@
<tr>
<td background="/em/images/cts_cmt02_bg.gif"><img src="/em/images/spacer.gif" width="5" height="5" border="0"></td>
<td align="left">ご登録いただけるのはお1人様1IDとなっています。<br>
<font class="listpoint" >*</font>」印の項目は必ず登録してください。(※半角カナは使用しないでください)
<font color="#ff0000">*</font>」印は登録時の必須項目です。
<br>(※半角カナは使用しないでください)
</td>
<td background="/em/images/cts_cmt03_bg.gif"><img src="/em/images/spacer.gif" width="5" height="5" border="0"></td>
......
......@@ -66,7 +66,8 @@
</tr>
<tr>
<td background="/em/images/cts_cmt02_bg.gif"><img src="/em/images/spacer.gif" width="5" height="5" border="0"></td>
<td align="left"><font class="listpoint" >*</font>」印の項目は必ず登録してください。(※半角カナは使用しないでください)
<td align="left"><font color="#ff0000">*</font>」印は登録時の必須項目です。ポイント利用の際はすべての項目について登録してください。
<br>(※半角カナは使用しないでください)
</td>
<td background="/em/images/cts_cmt03_bg.gif"><img src="/em/images/spacer.gif" width="5" height="5" border="0"></td>
</tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment