#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2010 Aimluck,Inc.
 * http://aipostyle.com/
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *#

## ---------------------------------------------------------------------------
#set($career = 'wm')
#parse("/portlets/wm/ja/schedule-form-title.vm")

#set($linklist = [["スケジュールへ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1')"]])
#ALcell_linklist_iphone($career $linklist)
#ALcell_contents_header($career)

#ALcell_errmsg($career $errmsgs)
#ALcell_formheader($career $jslink $portlet)
<input type="hidden" name="view_date" value="$!{result.FormData.ViewDate.toString()}">
#set($usercount = 1)
#set($membersize = $!{result.FormData.MemberList.size()})
<input type="hidden" name="shareusers" value="#foreach($record in $!{result.FormData.MemberList})$!{record.Name}#if($usercount<$membersize),#set($usercount = $usercount + 1)#end#end">
#set($facilitycount = 1)
#set($fmembersize = $!{result.FormData.FacilityMemberList.size()})
<input type="hidden" name="sharefacs" value="#foreach($record in $!{result.FormData.FacilityMemberList})$!{record.FacilityId}#if($facilitycount<$fmembersize),#set($facilitycount = $facilitycount + 1)#end#end">

#if($mode!="new_form" && ($!{result.FormData.EditRepeatFlag.toString()} != "-1"))
<h3>編集範囲</h3>
#if ($!{result.getInt($!{result.FormData.EditRepeatFlag.getValue()})} == 0) すべての予定 #else $!{result.FormData.ViewDate.Year}年$!{result.FormData.ViewDate.Month}月$!{result.FormData.ViewDate.Day}日の予定のみ #end #ALcell_br($career)
#if ($!{result.getInt($!{result.FormData.EditRepeatFlag.getValue()})} == 0)

<h3>繰り返しの設定</h3>
<script type="text/javascript">
function onChangeRepeat(form) {
  var repeatMonthlySpan = document.getElementById('repeatMonthlySpan');
  var repeatWeeklySpan = document.getElementById('repeatWeeklySpan');
  switch (form.repeat_type.value) {
    case "D" :
      repeatMonthlySpan.style.display = "none";
      repeatWeeklySpan.style.display = "none";
      break;
    case "W" :
      repeatMonthlySpan.style.display = "none";
      repeatWeeklySpan.style.display = "";
      break;
    case "M" :
      repeatMonthlySpan.style.display = "";
      repeatWeeklySpan.style.display = "none";
      break;
  }
}
</script>
<p class="center">
<select name="repeat_type" onChange="onChangeRepeat(this.form);return false;">
   <option value="D"  #if ($!{result.FormData.RepeatType.toString()} == "D") selected="selected" #end>毎日</option>
   <option value="W"  #if ($!{result.FormData.RepeatType.toString()} == "W") selected="selected" #end>毎週</option>
   <option value="M"  #if ($!{result.FormData.RepeatType.toString()} == "M") selected="selected" #end>毎月</option>
</select>
<span id="repeatMonthlySpan" #if ($!{result.FormData.RepeatType.toString()} != "M") style="display:none;" #end><input type="text" name="month_day" size="2" maxlength="2" value="$!{result.FormData.MonthDay}"/>日</span>

<div class="weaklycheck" id="repeatWeeklySpan" #if ($!{result.FormData.RepeatType.toString()} != "W") style="display:none;" #end>
<p class="sun">日<br /><input name="week_0" type="checkbox" class="checkbox" #if ($!{result.FormData.Week0.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p>月<br /><input name="week_1" type="checkbox" class="checkbox" #if ($!{result.FormData.Week1.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p>火<br /><input name="week_2" type="checkbox" class="checkbox" #if ($!{result.FormData.Week2.toString()} == "TRUE") checked="checked" #end value="TRUE" /></p>
<p>水<br /><input name="week_3" type="checkbox" class="checkbox" #if ($!{result.FormData.Week3.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p>木<br /><input name="week_4" type="checkbox" class="checkbox" #if ($!{result.FormData.Week4.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p>金<br /><input name="week_5" type="checkbox" class="checkbox" #if ($!{result.FormData.Week5.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p class="sat">土<br /><input name="week_6" type="checkbox" class="checkbox" #if ($!{result.FormData.Week6.toString()} == "TRUE") checked="checked" #end value="TRUE" /></p>
<br clear="all" />
</div>

</p>

<h3>繰り返し期間</h3>
<script type="text/javascript">
function onChangeLimitFlag(form) {
  var limitDateSpan = document.getElementById('limitDateSpan');
  switch (form.limit_flag.value) {
    case "ON" :
      limitDateSpan.style.display = "";
      break;
    case "OFF" :
      limitDateSpan.style.display = "none";
      break;
  }
  var month = form.limit_start_date_month.value;
  var day = form.limit_start_date_day.value;
}
function onChangeLimitStartDate(form) {
  var year = form.limit_start_date_year.value;
  var month = form.limit_start_date_month.value;
  var day = form.limit_start_date_day.value;
  form.limit_start_date.value = ("0000" + year).slice(-4) + ("00" + month).slice(-2) + ("00" + day).slice(-2);
}
function onChangeLimitEndDate(form) {
  var year = form.limit_end_date_year.value;
  var month = form.limit_end_date_month.value;
  var day = form.limit_end_date_day.value;
  form.limit_end_date.value = ("0000" + year).slice(-4) + ("00" + month).slice(-2) + ("00" + day).slice(-2);
}
</script>
<p class="center">
<select name="limit_flag" onChange="onChangeLimitFlag(this.form);return false;">
   <option value="OFF"  #if ($!{result.FormData.LimitFlag.toString()} == "OFF") selected="selected" #end>指定しない</option>
   <option value="ON"  #if ($!{result.FormData.LimitFlag.toString()} == "ON") selected="selected" #end>指定する</option>
</select>
</p>
<div id="limitDateSpan" #if ($!{result.FormData.LimitFlag.toString()} != "ON") style="display:none;" #end>
<p class="center">
<input type="text" size="4" maxlength="4" value="$!{result.FormData.LimitStartDate.Year}" name="limit_start_date_year" id="limit_start_date_year" onChange="onChangeLimitStartDate(this.form);" />/<input type="text" size="2" maxlength="2" value="$!{result.FormData.LimitStartDate.Month}" name="limit_start_date_month" id="limit_start_date_month" onChange="onChangeLimitStartDate(this.form);"/>/<input type="text" size="2" maxlength="2" value="$!{result.FormData.LimitStartDate.Day}" name="limit_start_date_day" id="limit_start_date_day" onChange="onChangeLimitStartDate(this.form);" />から
</p>
<p class="center">
<input type="text" size="4" maxlength="4" value="$!{result.FormData.LimitEndDate.Year}" name="limit_end_date_year" id="limit_end_date_year" onChange="onChangeLimitEndDate(this.form);" />/<input type="text" size="2" maxlength="2" value="$!{result.FormData.LimitEndDate.Month}" name="limit_end_date_month" id="limit_end_date_month" onChange="onChangeLimitEndDate(this.form);"/>/<input type="text" size="2" maxlength="2" value="$!{result.FormData.LimitEndDate.Day}" name="limit_end_date_day" id="limit_end_date_day" onChange="onChangeLimitEndDate(this.form);" />まで
</p>
<input type="hidden" name="limit_start_date" value="$!{result.FormData.LimitStartDateDate}"/>
<input type="hidden" name="limit_end_date" value="$!{result.FormData.LimitEndDateDate}"/>
</div>

<h3>時間#ALcell_must()</h3>
<script type="text/javascript">
function onChangeStartDateTime(form) {
  var hour = form.start_date_hour.value;
  var minute = form.start_date_minute.value;
  form.start_date_time.value = ("00" + hour).slice(-2) + ("00" + minute).slice(-2);
}
function onChangeEndDateTime(form) {
  var hour = form.end_date_hour.value;
  var minute = form.end_date_minute.value;
  form.end_date_time.value = ("00" + hour).slice(-2) + ("00" + minute).slice(-2);
}
</script>
<p class="center">
      <span id="startTimeSpan">
        <select name="start_date_hour" size="1" onChange="onChangeStartDateTime(this.form)">
            #foreach ( $num in [0..23] )
            <option value="$num" #if ($!result.FormData.StartDate.Hour == "$num") selected="selected" #end>$num時</option>
            #end
            </select>
            <select name="start_date_minute" size="1" onchange="onChangeStartDateTime(this.form)">
            <option value="0" #if ($!result.FormData.StartDate.Minute == "0") selected="selected" #end>00分</option>
            <option value="15" #if ($!result.FormData.StartDate.Minute == "15") selected="selected" #end>15分</option>
            <option value="30" #if ($!result.FormData.StartDate.Minute == "30") selected="selected" #end>30分</option>
            <option value="45" #if ($!result.FormData.StartDate.Minute == "45") selected="selected" #end>45分</option>
            </select>から
        </span>
</p>
<p class="center">
        <span id="endTimeSpan">
            <select name="end_date_hour" size="1" onchange="onChangeEndDateTime(this.form)">
            #foreach ( $num in [0..23] )
            <option value="$num" #if ($!result.FormData.EndDate.Hour == "$num") selected="selected" #end >$num時</option>
            #end
            </select>
            <select name="end_date_minute" size="1" onchange="onChangeEndDateTime(this.form)">
            <option value="0" #if ($!result.FormData.EndDate.Minute == "0") selected="selected" #end>00分</option>
            <option value="15" #if ($!result.FormData.EndDate.Minute == "15") selected="selected" #end>15分</option>
            <option value="30" #if ($!result.FormData.EndDate.Minute == "30") selected="selected" #end>30分</option>
            <option value="45" #if ($!result.FormData.EndDate.Minute == "45") selected="selected" #end>45分</option>
            </select>まで
         </span>
</p>
<input type="hidden" name="start_date_time" value="$!{result.FormData.StartDateTime}"/>
<input type="hidden" name="end_date_time" value="$!{result.FormData.EndDateTime}"/>
<input type="hidden" value="TRUE" name="is_repeat">
<input type="hidden" value="FALSE" name="is_span">
<input type="hidden" name="start_date_date" value="$!{result.FormData.StartDateDate}">
<input type="hidden" name="end_date_date" value="$!{result.FormData.StartDateDate}">
#else
<input type="hidden" value="FALSE" name="is_repeat">
<input type="hidden" value="FALSE" name="is_span">
<input type="hidden" name="end_date_date" value="$!{result.FormData.StartDateDate}">

<h3>日付#ALcell_must()</h3>
<script type="text/javascript">
function onChangeStartDate(form) {
  var year = form.start_date_year.value;
  var month = form.start_date_month.value;
  var day = form.start_date_day.value;
  form.start_date_date.value = ("0000" + year).slice(-4) + ("00" + month).slice(-2) + ("00" + day).slice(-2);
}
</script>
<p class="center">
<input type="text" size="4" maxlength="4" value="$!{result.FormData.StartDate.Year}" name="start_date_year" id="start_date_year" onChange="onChangeStartDate(this.form);" />/<input type="text" size="2" maxlength="2" value="$!{result.FormData.StartDate.Month}" name="start_date_month" id="start_date_month" onChange="onChangeStartDate(this.form);"/>/<input type="text" size="2" maxlength="2" value="$!{result.FormData.StartDate.Day}" name="start_date_day" id="start_date_day" onChange="onChangeStartDate(this.form);" />
<input type="hidden" name="start_date_date" value="$!{result.FormData.StartDateDate}"/>
<input type="hidden" name="end_date_date" value="$!{result.FormData.StartDateDate}"/>

<h3>時間#ALcell_must()</h3>
<script type="text/javascript">
function onChangeStartDateTime(form) {
  var hour = form.start_date_hour.value;
  var minute = form.start_date_minute.value;
  form.start_date_time.value = ("00" + hour).slice(-2) + ("00" + minute).slice(-2);
}
function onChangeEndDateTime(form) {
  var hour = form.end_date_hour.value;
  var minute = form.end_date_minute.value;
  form.end_date_time.value = ("00" + hour).slice(-2) + ("00" + minute).slice(-2);
}
</script>
<p class="center">
      <span id="startTimeSpan">
        <select name="start_date_hour" size="1" onChange="onChangeStartDateTime(this.form)">
            #foreach ( $num in [0..23] )
            <option value="$num" #if ($!result.FormData.StartDate.Hour == "$num") selected="selected" #end>$num時</option>
            #end
            </select>
            <select name="start_date_minute" size="1" onchange="onChangeStartDateTime(this.form)">
            <option value="0" #if ($!result.FormData.StartDate.Minute == "0") selected="selected" #end>00分</option>
            <option value="15" #if ($!result.FormData.StartDate.Minute == "15") selected="selected" #end>15分</option>
            <option value="30" #if ($!result.FormData.StartDate.Minute == "30") selected="selected" #end>30分</option>
            <option value="45" #if ($!result.FormData.StartDate.Minute == "45") selected="selected" #end>45分</option>
            </select>から
        </span>
<p class="center">
</p>
        <span id="endTimeSpan">
            <select name="end_date_hour" size="1" onchange="onChangeEndDateTime(this.form)">
            #foreach ( $num in [0..23] )
            <option value="$num" #if ($!result.FormData.EndDate.Hour == "$num") selected="selected" #end >$num時</option>
            #end
            </select>
            <select name="end_date_minute" size="1" onchange="onChangeEndDateTime(this.form)">
            <option value="0" #if ($!result.FormData.EndDate.Minute == "0") selected="selected" #end>00分</option>
            <option value="15" #if ($!result.FormData.EndDate.Minute == "15") selected="selected" #end>15分</option>
            <option value="30" #if ($!result.FormData.EndDate.Minute == "30") selected="selected" #end>30分</option>
            <option value="45" #if ($!result.FormData.EndDate.Minute == "45") selected="selected" #end>45分</option>
            </select>まで
         </span>
</p>
<input type="hidden" name="start_date_time" value="$!{result.FormData.StartDateTime}"/>
<input type="hidden" name="end_date_time" value="$!{result.FormData.EndDateTime}"/>
#end
<input type="hidden" name="edit_repeat_flag" value="$!{result.FormData.EditRepeatFlag.toString()}">
#else
<input type="hidden" #if (! $!{result.isRepeat()}) value="FALSE" #else value="TRUE" #end name="is_repeat">
<input type="hidden" #if (! $!{result.isSpan()}) value="FALSE" #else value="TRUE" #end name="is_span">

#if ($!{result.isRepeat()})
<h3>繰り返しの設定</h3>
<script type="text/javascript">
function onChangeRepeat(form) {
  var repeatMonthlySpan = document.getElementById('repeatMonthlySpan');
  var repeatWeeklySpan = document.getElementById('repeatWeeklySpan');
  switch (form.repeat_type.value) {
    case "D" :
      repeatMonthlySpan.style.display = "none";
      repeatWeeklySpan.style.display = "none";
      break;
    case "W" :
      repeatMonthlySpan.style.display = "none";
      repeatWeeklySpan.style.display = "";
      break;
    case "M" :
      repeatMonthlySpan.style.display = "";
      repeatWeeklySpan.style.display = "none";
      break;
  }
}
</script>
<p class="center">
<select name="repeat_type" onChange="onChangeRepeat(this.form);return false;">
   <option value="D"  #if ($!{result.FormData.RepeatType.toString()} == "D") selected="selected" #end>毎日</option>
   <option value="W"  #if ($!{result.FormData.RepeatType.toString()} == "W") selected="selected" #end>毎週</option>
   <option value="M"  #if ($!{result.FormData.RepeatType.toString()} == "M") selected="selected" #end>毎月</option>
</select>
<span id="repeatMonthlySpan" #if ($!{result.FormData.RepeatType.toString()} != "M") style="display:none;" #end><input type="text" name="month_day" size="2" maxlength="2" value="$!{result.FormData.MonthDay}"/>日</span>
<div class="weaklycheck" id="repeatWeeklySpan" #if ($!{result.FormData.RepeatType.toString()} != "W") style="display:none;" #end>
<p class="sun">日<br /><input name="week_0" type="checkbox" class="checkbox" #if ($!{result.FormData.Week0.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p>月<br /><input name="week_1" type="checkbox" class="checkbox" #if ($!{result.FormData.Week1.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p>火<br /><input name="week_2" type="checkbox" class="checkbox" #if ($!{result.FormData.Week2.toString()} == "TRUE") checked="checked" #end value="TRUE" /></p>
<p>水<br /><input name="week_3" type="checkbox" class="checkbox" #if ($!{result.FormData.Week3.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p>木<br /><input name="week_4" type="checkbox" class="checkbox" #if ($!{result.FormData.Week4.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p>金<br /><input name="week_5" type="checkbox" class="checkbox" #if ($!{result.FormData.Week5.toString()} == "TRUE") checked="checked" #end value="TRUE"/></p>
<p class="sat">土<br /><input name="week_6" type="checkbox" class="checkbox" #if ($!{result.FormData.Week6.toString()} == "TRUE") checked="checked" #end value="TRUE" /></p>
<br clear="all" />
</div>
</p>

<h3>繰り返し期間</h3>
<script type="text/javascript">
function onChangeLimitFlag(form) {
  var limitDateSpan = document.getElementById('limitDateSpan');
  switch (form.limit_flag.value) {
    case "ON" :
      limitDateSpan.style.display = "";
      break;
    case "OFF" :
      limitDateSpan.style.display = "none";
      break;
  }
  var month = form.limit_start_date_month.value;
  var day = form.limit_start_date_day.value;
}
function onChangeLimitStartDate(form) {
  var year = form.limit_start_date_year.value;
  var month = form.limit_start_date_month.value;
  var day = form.limit_start_date_day.value;
  form.limit_start_date.value = ("0000" + year).slice(-4) + ("00" + month).slice(-2) + ("00" + day).slice(-2);
}
function onChangeLimitEndDate(form) {
  var year = form.limit_end_date_year.value;
  var month = form.limit_end_date_month.value;
  var day = form.limit_end_date_day.value;
  form.limit_end_date.value = ("0000" + year).slice(-4) + ("00" + month).slice(-2) + ("00" + day).slice(-2);
}
</script>
<p class="center">
<select name="limit_flag" onChange="onChangeLimitFlag(this.form);return false;">
   <option value="OFF"  #if ($!{result.FormData.LimitFlag.toString()} == "OFF") selected="selected" #end>指定しない</option>
   <option value="ON"  #if ($!{result.FormData.LimitFlag.toString()} == "ON") selected="selected" #end>指定する</option>
</select>
</p>
<div id="limitDateSpan" #if ($!{result.FormData.LimitFlag.toString()} != "ON") style="display:none;" #end>
<p class="center">
<input type="text" size="4" maxlength="4" value="$!{result.FormData.LimitStartDate.Year}" name="limit_start_date_year" id="limit_start_date_year" onChange="onChangeLimitStartDate(this.form);" />/<input type="text" size="2" maxlength="2" value="$!{result.FormData.LimitStartDate.Month}" name="limit_start_date_month" id="limit_start_date_month" onChange="onChangeLimitStartDate(this.form);"/>/<input type="text" size="2" maxlength="2" value="$!{result.FormData.LimitStartDate.Day}" name="limit_start_date_day" id="limit_start_date_day" onChange="onChangeLimitStartDate(this.form);" />から
</p>
<p class="center">
<input type="text" size="4" maxlength="4" value="$!{result.FormData.LimitEndDate.Year}" name="limit_end_date_year" id="limit_end_date_year" onChange="onChangeLimitEndDate(this.form);" />/<input type="text" size="2" maxlength="2" value="$!{result.FormData.LimitEndDate.Month}" name="limit_end_date_month" id="limit_end_date_month" onChange="onChangeLimitEndDate(this.form);"/>/<input type="text" size="2" maxlength="2" value="$!{result.FormData.LimitEndDate.Day}" name="limit_end_date_day" id="limit_end_date_day" onChange="onChangeLimitEndDate(this.form);" />まで
</p>
<input type="hidden" name="limit_start_date" value="$!{result.FormData.LimitStartDateDate}"/>
<input type="hidden" name="limit_end_date" value="$!{result.FormData.LimitEndDateDate}"/>
<input type="hidden" name="start_date_date" value="$!{result.FormData.StartDateDate}">
<input type="hidden" name="end_date_date" value="$!{result.FormData.StartDateDate}">
</div>
#end

#if ((! $!{result.isRepeat()}) && (! $!{result.isSpan()}))
<h3>日付#ALcell_must()</h3>
<script type="text/javascript">
function onChangeStartDate(form) {
  var year = form.start_date_year.value;
  var month = form.start_date_month.value;
  var day = form.start_date_day.value;
  form.start_date_date.value = ("0000" + year).slice(-4) + ("00" + month).slice(-2) + ("00" + day).slice(-2);
}
</script>
<p class="center">
<input type="text" size="4" maxlength="4" value="$!{result.FormData.StartDate.Year}" name="start_date_year" id="start_date_year" onChange="onChangeStartDate(this.form);" />/<input type="text" size="2" maxlength="2" value="$!{result.FormData.StartDate.Month}" name="start_date_month" id="start_date_month" onChange="onChangeStartDate(this.form);"/>/<input type="text" size="2" maxlength="2" value="$!{result.FormData.StartDate.Day}" name="start_date_day" id="start_date_day" onChange="onChangeStartDate(this.form);" />
<input type="hidden" name="start_date_date" value="$!{result.FormData.StartDateDate}"/>
<input type="hidden" name="end_date_date" value="$!{result.FormData.StartDateDate}"/>
#end

#if(! $!{result.isSpan()})
<h3>時間#ALcell_must()</h3>
<script type="text/javascript">
function onChangeStartDateTime(form) {
  var hour = form.start_date_hour.value;
  var minute = form.start_date_minute.value;
  form.start_date_time.value = ("00" + hour).slice(-2) + ("00" + minute).slice(-2);
}
function onChangeEndDateTime(form) {
  var hour = form.end_date_hour.value;
  var minute = form.end_date_minute.value;
  form.end_date_time.value = ("00" + hour).slice(-2) + ("00" + minute).slice(-2);
}
</script>
<p class="center">
      <span id="startTimeSpan">
        <select name="start_date_hour" size="1" onChange="onChangeStartDateTime(this.form)">
            #foreach ( $num in [0..23] )
            <option value="$num" #if ($!result.FormData.StartDate.Hour == "$num") selected="selected" #end>$num時</option>
            #end
            </select>
            <select name="start_date_minute" size="1" onchange="onChangeStartDateTime(this.form)">
            <option value="0" #if ($!result.FormData.StartDate.Minute == "0") selected="selected" #end>00分</option>
            <option value="15" #if ($!result.FormData.StartDate.Minute == "15") selected="selected" #end>15分</option>
            <option value="30" #if ($!result.FormData.StartDate.Minute == "30") selected="selected" #end>30分</option>
            <option value="45" #if ($!result.FormData.StartDate.Minute == "45") selected="selected" #end>45分</option>
            </select>から
        </span>
</p>
<p class="center">
        <span id="endTimeSpan">
            <select name="end_date_hour" size="1" onchange="onChangeEndDateTime(this.form)">
            #foreach ( $num in [0..23] )
            <option value="$num" #if ($!result.FormData.EndDate.Hour == "$num") selected="selected" #end >$num時</option>
            #end
            </select>
            <select name="end_date_minute" size="1" onchange="onChangeEndDateTime(this.form)">
            <option value="0" #if ($!result.FormData.EndDate.Minute == "0") selected="selected" #end>00分</option>
            <option value="15" #if ($!result.FormData.EndDate.Minute == "15") selected="selected" #end>15分</option>
            <option value="30" #if ($!result.FormData.EndDate.Minute == "30") selected="selected" #end>30分</option>
            <option value="45" #if ($!result.FormData.EndDate.Minute == "45") selected="selected" #end>45分</option>
            </select>まで
         </span>
</p>
<input type="hidden" name="start_date_time" value="$!{result.FormData.StartDateTime}"/>
<input type="hidden" name="end_date_time" value="$!{result.FormData.EndDateTime}"/>
#end

#if ($!{result.isSpan()})
<h3>期間の設定</h3>
<script type="text/javascript">
function onChangeStartDate(form) {
  var year = form.start_date_year.value;
  var month = form.start_date_month.value;
  var day = form.start_date_day.value;
  form.start_date_date.value = ("0000" + year).slice(-4) + ("00" + month).slice(-2) + ("00" + day).slice(-2);
}
function onChangeEndDate(form) {
  var year = form.end_date_year.value;
  var month = form.end_date_month.value;
  var day = form.end_date_day.value;
  form.end_date_date.value = ("0000" + year).slice(-4) + ("00" + month).slice(-2) + ("00" + day).slice(-2);
}
</script>
<p class="center">
<input type="text" size="4" maxlength="4" value="$!{result.FormData.StartDate.Year}" name="start_date_year" id="start_date_year" onChange="onChangeStartDate(this.form);" />/<input type="text" size="2" maxlength="2" value="$!{result.FormData.StartDate.Month}" name="start_date_month" id="start_date_month" onChange="onChangeStartDate(this.form);"/>/<input type="text" size="2" maxlength="2" value="$!{result.FormData.StartDate.Day}" name="start_date_day" id="start_date_day" onChange="onChangeStartDate(this.form);" />から
</p>
<p class="center">
<input type="text" size="4" maxlength="4" value="$!{result.FormData.EndDate.Year}" name="end_date_year" id="end_date_year" onChange="onChangeEndDate(this.form);" />/<input type="text" size="2" maxlength="2" value="$!{result.FormData.EndDate.Month}" name="end_date_month" id="end_date_month" onChange="onChangeEndDate(this.form);"/>/<input type="text" size="2" maxlength="2" value="$!{result.FormData.EndDate.Day}" name="end_date_day" id="end_date_day" onChange="onChangeEndDate(this.form);" />まで
</p>
<input type="hidden" name="start_date_date" value="$!{result.FormData.StartDateDate}"/>
<input type="hidden" name="end_date_date" value="$!{result.FormData.EndDateDate}"/>
<input type="hidden" name="start_date_time" value="0000">
<input type="hidden" name="end_date_time" value="0000">
#end
#end

<h3>参加ユーザー</h3>
<ul>
#foreach($record in $!{result.FormData.MemberList})
#if ( ! ($!result.LoginUser.Name.toString() == $!record.Name.toString()) )
#ALcell_li_header($career)$!{record.AliasName}#ALcell_li_footer($career)
#end
#end
</ul>
#set($membersize = $!{result.FormData.MemberList.size()})
#if($membersize > 1)
#if($!{result.isOwner()} || $!{result.FormData.EditFlag.toString()} == "T")
<h4>編集/削除の可否</h4>
<p class="center">
  <select name="edit_flag">
    <option value="T"  #if ($!{result.FormData.EditFlag.toString()} == "T") selected="selected" #end)>可</option>
    <option value="F"  #if ($!{result.FormData.EditFlag.toString()} == "F") selected="selected" #end)>不可</option>
  </select>
</p>
#end
#if($mode!="new_form" && $!result.isMember())
<h4>仮スケジュールへの変更</h4>
<p class="center">
  <select name="change_tmpreserve_flag">
    <option value="T"  #if ($!{result.FormData.ChangeTmpreserveFlag.toString()} == "T") selected="selected" #end>戻す</option>
    <option value="F"  #if ($!{result.FormData.ChangeTmpreserveFlag.toString()} == "F") selected="selected" #end>戻さない</option>
</select>
</p>
#end
#end
<p class="center">
<input class="submit" name="eventSubmit_doSchedule_form_group" type="submit" value="ユーザーの追加" />
</p>

#if(! $!{result.isSpan()})
<h3>施設予約</h3>
<ul>
#foreach($record in $!{result.FormData.FacilityMemberList})
#ALcell_li_header($career)$!{record.FacilityName}#ALcell_li_footer($career)
#end
</ul>
<p class="center">
<input class="submit" name="eventSubmit_doSchedule_form_facility" type="submit" value="施設予約" />
</p>
#end

<p class="center">
<input type="hidden" value="$!{result.ScheduleType}" name="schedule_type">
#if($!{result.EntityId} && $!{result.EntityId} != 'new')
<input type="hidden" name="entityid" value="$!{result.EntityId}">
#end
<input class="submit" name="eventSubmit_doSchedule_form_note" type="submit" value="次へ" />
</p>

#ALcell_formfooter()
#ALcell_contents_footer($career)
#ALcell_linklist_iphone($career $linklist)
