#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2011 Aimluck,Inc.
 * http://www.aipo.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/>.
 *#

## ---------------------------------------------------------------------------
#parse("/portlets/cell_default/ja/schedule-form-title.vm")

#set($linklist = [["ｽｹｼﾞｭｰﾙへ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1')"]])
#if($mode=="new_form")
#set ($action_str = "追加する")
#set ($event_submit = "eventSubmit_doSchedule_insert")
#else
#set ($action_str = "更新する")
#set ($event_submit = "eventSubmit_doSchedule_update")
#end
#ALcell_errmsg($career $errmsgs)

#if ($!{result.isRepeat()})
繰り返し：#ALcell_br($career)
<BLOCKQUOTE>
#if ($!{result.FormData.RepeatType.toString()} == "D") 毎日#end
#if ($!{result.FormData.RepeatType.toString()} == "W") 毎週#ALcell_br($career)#if ($!{result.FormData.Week0.toString()} == "TRUE")日#end#if ($!{result.FormData.Week1.toString()} == "TRUE")月#end#if ($!{result.FormData.Week2.toString()} == "TRUE")火#end#if ($!{result.FormData.Week3.toString()} == "TRUE")水#end#if ($!{result.FormData.Week4.toString()} == "TRUE")木#end#if ($!{result.FormData.Week5.toString()} == "TRUE")金#end#if ($!{result.FormData.Week6.toString()} == "TRUE")土#end 曜日#end
#if ($!{result.FormData.RepeatType.toString()} == "M") 毎月 $!{result.FormData.MonthDay}日#end
</BLOCKQUOTE>
#if ($!{result.FormData.LimitFlag.toString()} == "ON")
期間：
<BLOCKQUOTE>
$!{result.FormData.LimitStartDateDate2}から#ALcell_br($career)
$!{result.FormData.LimitEndDateDate2}
</BLOCKQUOTE>
#end
時間:
<BLOCKQUOTE>
$!{result.FormData.StartDateTime2}から$!{result.FormData.EndDateTime2}
</BLOCKQUOTE>
#if($isDuplicateFacility=="true")
<BLOCKQUOTE>
施設予約が重複しています。
</BLOCKQUOTE>
#end
#elseif($!{result.isSpan()})
期間：#ALcell_br($career)
$!{result.FormData.StartDateDate2}から#ALcell_br($career)
$!{result.FormData.EndDateDate2}
#else
時間:
<BLOCKQUOTE>
$!{result.FormData.StartDateDate2}#ALcell_br($career)
$!{result.FormData.StartDateTime2}から$!{result.FormData.EndDateTime2}
</BLOCKQUOTE>
#if($isDuplicateFacility=="true")
<BLOCKQUOTE>
施設予約が重複しています。
</BLOCKQUOTE>
#end
#end
#ALcell_hr($career '1')
#ALcell_formheader($career $jslink $portlet)
#if($!{result.EntityId} && $!{result.EntityId} != 'new')
<input type="hidden" name="entityid" value="$!{result.EntityId}">
<input type="hidden" name="edit_repeat_flag" value="$!{result.FormData.EditRepeatFlag.toString()}">
#end
<input type="hidden" name="view_date" value="$!{result.FormData.ViewDate.toString()}">
<input type="hidden" value="$!{result.ScheduleType}" name="schedule_type">

#if ($!{result.isRepeat()})
<input type="hidden" name="repeat_type" value="$!{result.FormData.RepeatType}">
#if ($!{result.FormData.RepeatType.toString()} == "W")
#if ($!{result.FormData.Week0.toString()} == "TRUE") <input type="hidden" name="week_0" value="TRUE"> #end
#if ($!{result.FormData.Week1.toString()} == "TRUE") <input type="hidden" name="week_1" value="TRUE"> #end
#if ($!{result.FormData.Week2.toString()} == "TRUE") <input type="hidden" name="week_2" value="TRUE"> #end
#if ($!{result.FormData.Week3.toString()} == "TRUE") <input type="hidden" name="week_3" value="TRUE"> #end
#if ($!{result.FormData.Week4.toString()} == "TRUE") <input type="hidden" name="week_4" value="TRUE"> #end
#if ($!{result.FormData.Week5.toString()} == "TRUE") <input type="hidden" name="week_5" value="TRUE"> #end
#if ($!{result.FormData.Week6.toString()} == "TRUE") <input type="hidden" name="week_6" value="TRUE"> #end
#elseif ($!{result.FormData.RepeatType.toString()} == "M")
<input type="hidden" name="month_day" value="$!{result.FormData.MonthDay}">
#end
<input type="hidden" name="limit_flag" value="$!{result.FormData.LimitFlag.toString()}">
#if($!{result.FormData.LimitFlag.toString()} == "ON")
<input type="hidden" name="limit_start_date" value="$!{result.FormData.LimitStartDateDate}">
<input type="hidden" name="limit_end_date" value="$!{result.FormData.LimitEndDateDate}">
#end
#end
<input type="hidden" name="start_date_date" value="$!{result.FormData.StartDateDate}">
<input type="hidden" name="start_date_time" value="$!{result.FormData.StartDateTime}">
<input type="hidden" name="end_date_date" value="$!{result.FormData.EndDateDate}">
<input type="hidden" name="end_date_time" value="$!{result.FormData.EndDateTime}">
#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">

<input type="hidden" name="edit_flag" value="$!{result.FormData.EditFlag.toString()}">
<input type="hidden" name="change_tmpreserve_flag" value="$!{result.FormData.ChangeTmpreserveFlag.toString()}">

$!result.getFieldName('name')#ALcell_must()#ALcell_br($career)
#ALcell_textfield($career 'name' $!result.Name 14 50 '' 'h')
#ALcell_hr($career '1')
$!result.getFieldName('place')#ALcell_br($career)
#ALcell_textfield($career 'place' $!result.Place 14 50 '' 'h')
#ALcell_hr($career '1')
$!result.getFieldName('note')#ALcell_br($career)
#ALcell_textarea($career 'note' $!result.Note 6 14 '' 'h')
#ALcell_hr($career '1')
$!result.getFieldName("public_flag")#ALcell_br($career)
<input name="public_flag" type="radio" value="O" #if ($!result.PublicFlag.toString() == "O") checked="checked" #end>公開#ALcell_br($career)
<input name="public_flag" type="radio" value="C" #if ($!result.PublicFlag.toString() == "C") checked="checked" #end>非公開#ALcell_br($career)
<input name="public_flag" type="radio" value="P" #if ($!result.PublicFlag.toString() == "P") checked="checked" #end>完全に隠す
#ALcell_hr($career '1')
#ALcell_submit($career $event_submit $action_str)
##cell_submit($career 'eventSubmit_doSchedule_menu' 'ｷｬﾝｾﾙする')
#ALcell_formfooter()
#ALcell_hr($career '1')
#ALcell_linklist($career $linklist)
#ALtdcellFooterLink($career)
