#*
 * 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/>.
 *#

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

#set($link = "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_member','1')")
#set($linklist = [["ｽｹｼﾞｭｰﾙへ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1')"]])
#set($event_submit = "eventSubmit_doSchedule_form")
#ALcell_errmsg($career $errmsgs)
#if($errmsgs && !($errmsgs.size() == 0))
#ALcell_hr($career '1')
#end
#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()}">
<input type="hidden" name="view_date" value="$!{result.FormData.ViewDate.toString()}">
#end
<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($memberlist = $!result.getUsers($!result.SelectedGroup.Value))
<input type="hidden" name="selectedgroup" value="$!{result.SelectedGroup}">
#set($usercount = 1)
#set($membersize = $!{result.FormData.MemberList.size()})
<input type="hidden" name="shareusers" value="#foreach($record in $!{result.FormData.MemberList})#if(! $!result.isContains($memberlist, $record))$!{record.Name}#if($usercount<$membersize),#set($usercount = $usercount + 1)#end#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()}"> 

#ALcell_center_header($career)参加ﾕｰｻﾞｰ選択#ALcell_center_footer($career)
#ALcell_hr($career '1')
#if($memberlist.size() == 0)
所属するﾕｰｻﾞｰがいません。
#else

#if($result.PagesNum > 1)
#set($pages = $result.PagesNum)
#set($currentPage = $result.CurrentPage)
#set($rowsNum = $result.RowsNum)
#if ($pages > 1)
#ALcell_center_header($career)
#if($currentPage > 1) #set($pre = $currentPage - 1) #ALcell_submit($career "eventSubmit_doSchedule_form_member" "&lt;前")
<input type="hidden" name="start" value="$pre">
#end
$currentPage/$pages
#if($pages > $currentPage) #set($next = $currentPage + 1) #ALcell_submit($career "eventSubmit_doSchedule_form_member" "次&gt;")
<input type="hidden" name="start" value="$next">
#end
#ALcell_center_footer($career)
#end
#ALcell_hr($career '1')
#end

#foreach($record in $memberlist)
#if ( ! ($!result.LoginUser.Name.toString() == $!record.Name.toString()) )
<input name="shareuser" type="checkbox" value="$!record.Name" #if($!result.isContains($!{result.FormData.MemberList}, $record))checked#end>$!record.AliasName#ALcell_br($career)
#end
#end
#end
	

#if($result.PagesNum > 1)
#set($pages = $result.PagesNum)
#set($currentPage = $result.CurrentPage)
#set($rowsNum = $result.RowsNum)
#if ($pages > 1)
#ALcell_hr($career '1')
#ALcell_center_header($career)
#if($currentPage > 1) #set($pre = $currentPage - 1) #ALcell_submit($career "eventSubmit_doSchedule_form_member" "&lt;前")
<input type="hidden" name="start" value="$pre">
#end
$currentPage/$pages
#if($pages > $currentPage) #set($next = $currentPage + 1) #ALcell_submit($career "eventSubmit_doSchedule_form_member" "次&gt;")
<input type="hidden" name="start" value="$next">
#end
#ALcell_center_footer($career)
#end
#end

#ALcell_hr($career '1')
#ALcell_submit($career "$event_submit" "追加する")
#ALcell_formfooter()
#ALcell_hr($career '1')
#ALcell_linklist($career $linklist)
#ALtdcellFooterLink($career)
