mailEdit.html.svn-base 10.1 KB
Newer Older
Kim Gyeongeun committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
#set($title = "メール編集")
#set($menukubun = "2")
#parse( "/WEB-INF/view/common/header_admin.vm" )
<script language="JavaScript">
    <!--
	function send_check(flg){
     	if (document.mainForm.deliveryTargetMethod.value == '0') {
     		document.mainForm.status.value = '0';
     	} else if (document.mainForm.deliveryTargetMethod.value == '1') {
     		document.mainForm.status.value = '1';
     	}
		document.mainForm.submit();
		return false;
     }

	function save_mail(flg) {
		document.mainForm.status.value = flg;
     	document.mainForm.action="#q('/admin/mail/mailEdit/saveMail/')";
		document.mainForm.submit();
		return false;
     }

	function send_mail(){
     	document.mainForm.action="#q('/admin/mail/mailEdit/testMailSend/')";
		document.mainForm.submit();
		return false;
     }

    function OpenSrchWindow()
    {
		//var url='#q("/admin/mail/mailSearch/mailResevedPopup/")';
		var url='#q("/admin/mail/mailPopup/")';
		window.open(url, "userEditForm", "width=800px, height=512px,resizable=yes,scrollbars=yes ");
    }

    function change(arg){
    	if (arg == "0") {
    		$("#deliveryDate").datepick('enable');
    		$("select[name=deliveryHour]").attr("disabled",false);
			$("select[name=deliveryMin]").attr("disabled",false);

    	} else {
    		$("#deliveryDate").datepick('disable');
		$("select[name=deliveryHour]").attr("disabled",true);
		$("select[name=deliveryMin]").attr("disabled",true);
    	}
     }

    function showSendSetting(type) {
        if (type == "0") {
            document.getElementById('send_file').style.display = 'none';
            document.getElementById('enquete_id').style.display = 'none';
            document.getElementById('send_target').style.display = '';
            document.getElementById('send_group').style.display = '';
        } else {
            document.getElementById('send_file').style.display = '';
            document.getElementById('enquete_id').style.display = '';
            document.getElementById('send_group').style.display = 'none';
            document.getElementById('send_target').style.display = 'none';
        }
    }

    //-->
</script>
<script language="javascript" type="text/javascript" charset="utf-8">
<!--
	//開始日
	$(function() {
	  $('#deliveryDate').datepick({showTrigger: '#calFromDate',
	  minDate: '0m'});
	});

	$(function() {

		#if($!mailRegistForm.deliveryTargetMethod=="0")
			$("input[name=deliveryDate]").attr("disabled",false);
			$("select[name=deliveryHour]").attr("disabled",false);
			$("select[name=deliveryMin]").attr("disabled",false);
			$("#deliveryDate").datepick('enable');
		#else
			$("input[name=deliveryDate]").attr("disabled",true);
			$("select[name=deliveryHour]").attr("disabled",true);
			$("select[name=deliveryMin]").attr("disabled",true);
			$("#deliveryDate").datepick('disable');
		#end
		showSendSetting("$!mailRegistForm.sendType");
	});
	// -->
</script>
<div id="contents">
<div id="contents_main">
<div id="breadcrumbsWrap">

</div><!--[ /breadcrumbsWrap ]-->
<div id="main" class="clearfix">


<h2 class="contents_title">メール編集</h2>
<div id="right_contents">
#if($tools.getMsgs()!="")
<font color="red" size="2">入力エラーがあります。</font>
#end
#set($mail-url = $tools.getSecureUrl('/admin/mail/mailEdit/confirm/'))
<form name="mainForm" action="$!mail-url" method="post" enctype="multipart/form-data">
##<div id="search">
##<div class="clearfix">
<table border="0" cellspacing="0" cellpadding="0" class="stripe2 mgb10 w840">
##<table border="0" cellspacing="0" cellpadding="0" class="stripe3 w790">
	<tr class="gray">
		<td class="w120">ステータス</td>
		<td>
			#if($!mailRegistForm.status == 0)未配信
			#elseif($!mailRegistForm.status == 1)配信済
			#else 一時保存
			#end
		</td>
	</tr>
<input type="hidden" name="status" value="$!mailRegistForm.status">
<input type="hidden" name="enqueteMailId" value="$!mailRegistForm.enqueteMailId">
	<tr class="gray">
		<td style="vertical-align:top">メール件名</td>
		<td><input name="subject" type="text" / class="w600"  value="$!escape.html($!mailRegistForm.subject)">
		#if($!tools.getMsg("subject")) <br/>$tools.getMsg("subject") #end
		</td>
	</tr>
	<tr>
		<td style="vertical-align:top">配信先</td>
		<td>
			<input type="radio" name="sendType" onclick="showSendSetting('0');" value="0" #if($!mailRegistForm.sendType == "0") checked="checked" #end>配信グループ&nbsp;&nbsp;
			<input type="radio" name="sendType" onclick="showSendSetting('1');" value="1" #if($!mailRegistForm.sendType == "1") checked="checked" #end>ファイルアップロード
			<br><br>
			<div id="send_group">
			<select name="deliveryGroupId" id="deliveryGroupId"  class="w600">
				<option value=""></option>
					#foreach($genreItem in $deliveryGroupList)
						#if($mailRegistForm.deliveryGroupId && $genreItem.deliveryGroupId == $mailRegistForm.deliveryGroupId)
							<option value="$!genreItem.deliveryGroupId" selected>#he($!genreItem.deliveryGroupName)</option>
						#else
							<option value="$!genreItem.deliveryGroupId">#he($!genreItem.deliveryGroupName)</option>
						#end
					#end
			</select>
			</div>
			<div id="send_file">
				<input type="file" name="file" size="60" id="File" multiple="multiple">
			</div>
		#if($!tools.getMsg("deliveryGroupId")) $tools.getMsg("deliveryGroupId") #end
		</td>
	</tr>
	<tr id="enquete_id">
		<td>アンケートID</td>
		<td>
			<input name="enqueteId" type="text" class="w100" value="$!escape.html($!mailRegistForm.enqueteId)">
			#if($!tools.getMsg("enqueteId")) <BR>$tools.getMsg("enqueteId") #end
		</td>
	</tr>
	<tr>
		<td>差出人名(From)</td>
		<td>$!mailRegistForm.sender</td>
		<input type="hidden" name="sender" value="$!mailRegistForm.sender">
	</tr>
	<tr>
		<td style="vertical-align:top">メール本文</td>
		<td>
	 		<textarea name="mailBody" cols="35" rows="20" class="w600 mgt5">$!mailRegistForm.mailBody</textarea>
	 		#if($!tools.getMsg("mailBody")) <BR>$tools.getMsg("mailBody") #end
	 	<br>
	 	<input type="button" class="button" onClick="OpenSrchWindow();" value="予約語挿入"/>&nbsp;&nbsp;&nbsp;
		<button class="button" onclick="save_mail('2'); return false;">一時保存</button>&nbsp;&nbsp;&nbsp;
		</td>
	</tr>

<!--	<tr>

	<td align="left">
		<input type="button" class="button" onClick="OpenSrchWindow();" value="予約語挿入"/>&nbsp;&nbsp;&nbsp;
		<button class="button" onclick="save_mail('2'); return false;">一時保存</button>&nbsp;&nbsp;&nbsp;
	</td>
	</tr>
-->
	<tr id="send_target">
		<td style="vertical-align:top">配信対象</td>
		<td>
			<select name="deliveryTargetType" id="deliveryTargetType"  class="w200">
				<option value=""></option>
				<option value="0" #if ( "$!{mailRegistForm.deliveryTargetType}" == "0" ) selected #end>PC用のアドレスのみ</option>
				<option value="1" #if ( "$!{mailRegistForm.deliveryTargetType}" == "1" ) selected #end>携帯用のアドレスのみ</option>
			</select>
		#if($!tools.getMsg("deliveryTargetType")) <BR>$tools.getMsg("deliveryTargetType") #end
		</td>
	</tr>

	</tr>
	<tr>
		<td style="vertical-align:top">テスト配信</td>
		<td>&nbsp;&nbsp;メールアドレス
	<input name="testMail" type="text" / class="w300 mgl10" value="$!escape.html($!mailRegistForm.testMail)">
	<input type="submit" name="button" id="button" onclick="send_mail(); return false;" value="送信" / class="w60">
	#if($!tools.getMsg("testMail")) <BR>$tools.getMsg("testMail") #end
		</td>
	</tr>
	<tr>
		<td rowspan="2" style="vertical-align:top">配信方法</td>
		<td>
		#if($!mailRegistForm.deliveryTargetMethod)
			<input type="radio" name="deliveryTargetMethod" onclick="change('0');" value="0" #if($!mailRegistForm.deliveryTargetMethod == "0")checked#end>時間指定&nbsp;&nbsp;
		#else
			<input type="radio" name="deliveryTargetMethod" onclick="change('0');" value="0" >時間指定&nbsp;&nbsp;
		#end
			##<input name="" type="text" / class="w90 mgl10">

			<input name="deliveryDate" id="deliveryDate" type="text" / class="w90 mgl10" value="$!escape.html($!mailRegistForm.deliveryDate)">
			<div style="display: none;"><img id="calFromDate" src="/em/images/icon_cal.gif" style="padding-left:5px;padding-right:5px; vertical-align: middle;"></div>

			<select name="deliveryHour" id="deliveryHour"  class="w50 mgl5">
				<option value=""></option>
				#foreach($mm in [0..23])
					#if($!mailRegistForm.deliveryHour && $!mailRegistForm.deliveryHour != "")
						#if($mm == $!mailRegistForm.deliveryHour)
							<option value="$!mm" selected>#he($!mm)</option>
						#else
							<option value="$!mm">#he($!mm)</option>
						#end
					#else
						<option value="$!mm">#he($!mm)</option>
					#end
				#end
			</select>時
			<select name="deliveryMin" id="deliveryMin"  class="w50 mgl50">
				<option value=""></option>
				#foreach($mm in ['00','10','20','30','40','50'])
					#if($!mailRegistForm.deliveryMin && $!mailRegistForm.deliveryMin != "")
						#if($mm == $!mailRegistForm.deliveryMin)
							<option value="$!mm" selected>#he($!mm)</option>
						#else
							<option value="$!mm">#he($!mm)</option>
						#end
					#else
						<option value="$!mm">#he($!mm)</option>
					#end
				#end
			</select>分
		#if($!tools.getMsg("deliveryDate")) <br>$tools.getMsg("deliveryDate") $tools.getMsg("deliveryDate_1") $tools.getMsg("deliveryDate_2") #end
		#if($!tools.getMsg("deliveryHour")) $tools.getMsg("deliveryHour") #end
		#if($!tools.getMsg("deliveryMin")) $tools.getMsg("deliveryMin") #end
		</td>
	</tr>
	<tr>
		<td>
		#if($!mailRegistForm.deliveryTargetMethod)
			<input type="radio" name="deliveryTargetMethod" onclick="change('1');" value="1" #if($!mailRegistForm.deliveryTargetMethod == "1")checked#end>即時配信&nbsp;&nbsp;
		#else
			<input type="radio" name="deliveryTargetMethod" onclick="change('1');" value="1" >即時配信&nbsp;&nbsp;
		#end
		#if($!tools.getMsg("deliveryTargetMethod")) 
			<BR>$tools.getMsg("deliveryTargetMethod") 
		#end

		</td>
	</tr>

</table>
<div class="btn_area2" style="width:840px;">
		<button class="button" onclick="send_check('1'); return false;">配信予約</button>
</div>
##</div>
##</div>

</form>
</div>
</div>
<div id="contents_bottom">
<img src="/em/images/bg_contents_bottom.jpg" width="1036" height="15" /> </div> </div>
</div>
</div>
</div>

#parse( "/WEB-INF/view/common/footer_admin.vm" )