#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2008 Aimluck,Inc.
 * http://aipostyle.com/
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http:// www.gnu.org/licenses/>.
 *#
## ---------------------------------------------------------------------------
#set($career = 'vodafone')
#if($mode=="new_form")
#set ($title = "ｽｹｼﾞｭｰﾙ(1日)登録")
#else
#set ($title = "ｽｹｼﾞｭｰﾙ(1日)編集")
#end
#set($linklist = [["ｽｹｼﾞｭｰﾙへ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1')"], ["TOPへ", "$!jslink.getAction('controls.Restore',$!portlet.ID)"], ["ﾛｸﾞｱｳﾄ", "$jslink.setAction($config.getString('action.logout'))"]])
#set ($action_str = "次へ")
#set ($event_submit = "eventSubmit_doSchedule_form_next")
#ALcell_pagetitle($career $title)
#ALcell_errmsg($career $errmsgs)
#if($errmsgs && !($errmsgs.size() == 0))
#ALcell_hr($career '1')
#end
#ALcell_formheader($career $jslink $portlet)

#if($mode!="new_form" && ($!{result.EditRepeatFlag.toString()} != "-1"))
編集範囲：#if ($!{result.getInt($!{result.EditRepeatFlag.getValue()})} == 0) すべての予定 #else $!{result.ViewDate.Year}年$!{result.ViewDate.Month}月$!{result.ViewDate.Day}日の予定のみ #end #ALcell_br($career)
#if ($!{result.getInt($!{result.EditRepeatFlag.getValue()})} == 0)
繰り返しの設定#ALcell_br($career)
<input name="repeat_type" type="radio" value="D" #if ($!{result.RepeatType.toString()} == "D") checked="checked" #end>毎日#ALcell_br($career)
<input name="repeat_type" type="radio" value="W" #if ($!{result.RepeatType.toString()} == "W") checked="checked" #end>毎週
<BLOCKQUOTE>
<input name="week_0" type="checkbox" #if ($!{result.Week0.toString()} == "TRUE") checked="checked" #end value="TRUE">日<input name="week_1" type="checkbox" #if ($!{result.Week1.toString()} == "TRUE") checked="checked" #end value="TRUE">月<input name="week_2" type="checkbox" #if ($!{result.Week2.toString()} == "TRUE") checked="checked" #end value="TRUE">火<input name="week_3" type="checkbox" #if ($!{result.Week3.toString()} == "TRUE") checked="checked" #end value="TRUE">水#ALcell_br($career)<input name="week_4" type="checkbox" #if ($!{result.Week4.toString()} == "TRUE") checked="checked" #end value="TRUE">木<input name="week_5" type="checkbox" #if ($!{result.Week5.toString()} == "TRUE") checked="checked" #end value="TRUE">金<input name="week_6" type="checkbox" #if ($!{result.Week6.toString()} == "TRUE") checked="checked" #end value="TRUE">土
</BLOCKQUOTE>
<input name="repeat_type" type="radio" value="M" #if ($!{result.RepeatType.toString()} == "M") checked="checked" #end>毎月
<BLOCKQUOTE>#ALcell_textfield($career 'month_day' "$!{result.MonthDay}" 3 2 'istyle="4"') 日</BLOCKQUOTE>
<hr size="1">
繰り返し期間を#ALcell_br($career)
<input name="limit_flag" type="radio" value="OFF" #if ($!{result.LimitFlag.toString()} == "OFF") checked="checked" #end>指定しない#ALcell_br($career)
<input name="limit_flag" type="radio" value="ON"  #if ($!{result.LimitFlag.toString()} == "ON") checked="checked" #end>指定する#ALcell_br($career)
<BLOCKQUOTE>#ALcell_textfield($career 'limit_start_date' "$!{result.LimitStartDateDate}" 8 8 'istyle="4"') から#ALcell_textfield($career 'limit_end_date' "$!{result.LimitEndDateDate}" 8 8 'istyle="4"')
#ALcell_br($career)(例)2005/1/1→20050101
</BLOCKQUOTE>
#ALcell_hr($career '1')
<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.StartDateDate}">
<input type="hidden" name="end_date_date" value="$!{result.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.StartDateDate}">
日付：#ALcell_textfield($career 'start_date_date' "$!{result.StartDateDate}" 8 8 'istyle="4"')
#ALcell_br($career)(例)#ALcell_br($career)2005/1/1→20050101
#ALcell_hr($career '1')
時間：#ALcell_br($career)
#ALcell_textfield($career 'start_date_time' "$!{result.StartDateTime}" 4 4 'istyle="4"') から#ALcell_textfield($career 'end_date_time' "$!{result.EndDateTime}" 4 4 'istyle="4"')
#ALcell_br($career)(例)10:30→1030#ALcell_br($career)（15分単位）
#end
<input type="hidden" name="edit_repeat_flag" value="$!{result.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()})
繰り返しの設定#ALcell_br($career)
<input name="repeat_type" type="radio" value="D" #if ($!{result.RepeatType.toString()} == "D") checked="checked" #end>毎日#ALcell_br($career)
<input name="repeat_type" type="radio" value="W" #if ($!{result.RepeatType.toString()} == "W") checked="checked" #end>毎週
##<blockquote>
<input name="week_0" type="checkbox" #if ($!{result.Week0.toString()} == "TRUE") checked="checked" #end value="TRUE">日<input name="week_1" type="checkbox" #if ($!{result.Week1.toString()} == "TRUE") checked="checked" #end value="TRUE">月<input name="week_2" type="checkbox" #if ($!{result.Week2.toString()} == "TRUE") checked="checked" #end value="TRUE">火<input name="week_3" type="checkbox" #if ($!{result.Week3.toString()} == "TRUE") checked="checked" #end value="TRUE">水#ALcell_br($career)<input name="week_4" type="checkbox" #if ($!{result.Week4.toString()} == "TRUE") checked="checked" #end value="TRUE">木<input name="week_5" type="checkbox" #if ($!{result.Week5.toString()} == "TRUE") checked="checked" #end value="TRUE">金<input name="week_6" type="checkbox" #if ($!{result.Week6.toString()} == "TRUE") checked="checked" #end value="TRUE">土
##</blockquote>
#ALcell_br($career)
<input name="repeat_type" type="radio" value="M" #if ($!{result.RepeatType.toString()} == "M") checked="checked" #end>毎月
##<blockquote>
#ALcell_textfield($career 'month_day' "$!{result.MonthDay}" 3 2 'mode="numeric"') 日
##</blockquote>
#ALcell_hr($career '1')
繰り返し期間を#ALcell_br($career)
<input name="limit_flag" type="radio" value="OFF" #if ($!{result.LimitFlag.toString()} == "OFF") checked="checked" #end>指定しない#ALcell_br($career)
<input name="limit_flag" type="radio" value="ON"  #if ($!{result.LimitFlag.toString()} == "ON") checked="checked" #end>指定する#ALcell_br($career)
##<blockquote>
#ALcell_textfield($career 'limit_start_date' "$!{result.LimitStartDateDate}" 8 8 'mode="numeric"') から#ALcell_textfield($career 'limit_end_date' "$!{result.LimitEndDateDate}" 8 8 'mode="numeric"')
#ALcell_br($career)(例)2005/1/1→20050101
##</blockquote>
<input type="hidden" name="start_date_date" value="$!{result.StartDateDate}">
<input type="hidden" name="end_date_date" value="$!{result.StartDateDate}">
#ALcell_hr($career '1')
#end

#if ((! $!{result.isRepeat()}) && (! $!{result.isSpan()}))
日付：#ALcell_textfield($career 'start_date_date' "$!{result.StartDateDate}" 8 8 'mode="numeric"')
<input type="hidden" name="end_date_date" value="$!{result.StartDateDate}">
#ALcell_br($career)(例)#ALcell_br($career)2005/1/1→20050101
#ALcell_hr($career '1')
#end
#if(! $!{result.isSpan()})
時間：#ALcell_br($career)
#ALcell_textfield($career 'start_date_time' "$!{result.StartDateTime}" 4 4 'mode="numeric"') から#ALcell_textfield($career 'end_date_time' "$!{result.EndDateTime}" 4 4 'mode="numeric"')
#ALcell_br($career)(例)10:30→1030#ALcell_br($career)（15分単位）
#end
#if ($!{result.isSpan()})
期間の設定#ALcell_br($career)
#ALcell_textfield($career 'start_date_date' "$!{result.StartDateDate}" 8 8 'mode="numeric"') から#ALcell_textfield($career 'end_date_date' "$!{result.EndDateDate}" 8 8 'mode="numeric"')
<input type="hidden" name="start_date_time" value="0000">
<input type="hidden" name="end_date_time" value="0000">
#end
#end

#ALcell_hr($career '1')

#set($membersize = $!{result.MemberList.size()})
#if($membersize > 1)
参加ﾕｰｻﾞｰ：#ALcell_br($career)
#foreach($record in $!{result.MemberList})
#if ( ! ($!result.LoginUser.Name.toString() == $!record.Name.toString()) )
・$!{record.AliasName}#ALcell_br($career)
#end
#end
#*
<ul>
#foreach($record in $!{result.MemberList})
#if ( ! ($!result.LoginUser.Name.toString() == $!record.Name.toString()) )
#ALcell_li_header($career)$!{record.AliasName}#ALcell_li_footer($career)
#end
#end
</ul>
*#
#if($!{result.isOwner()} || $!{result.EditFlag.toString()} == "T")
#ALcell_br($career)
編集/削除の可否：#ALcell_br($career)
<input name="edit_flag" type="radio" value="T" #if ($!{result.EditFlag.toString()} == "T") checked="checked" #end>可#ALcell_br($career)
<input name="edit_flag" type="radio" value="F" #if ($!{result.EditFlag.toString()} == "F") checked="checked" #end>不可
#end
#if($mode!="new_form" && $!result.isMember())
#ALcell_br($career)
仮ｽｹｼﾞｭｰﾙへの変更：#ALcell_br($career)
<input name="change_tmpreserve_flag" type="radio" value="T" #if ($!{result.ChangeTmpreserveFlag.toString()} == "T") checked="checked" #end>戻す#ALcell_br($career)
<input name="change_tmpreserve_flag" type="radio" value="F" #if ($!{result.ChangeTmpreserveFlag.toString()} == "F") checked="checked" #end>戻さない
#end
#ALcell_hr($career '1')
#end

#set($fmembersize = $!{result.FacilityMemberList.size()})
#if($fmembersize > 0)
共有施設：#ALcell_br($career)
#foreach($record in $!{result.FacilityMemberList})
・$!{record.FacilityName}#ALcell_br($career)
#end
#ALcell_hr($career '1')
#end

#if($!{result.EntityId} && $!{result.EntityId} != 'new')
#ALcell_submit($career "eventSubmit_doSchedule_form_note_edit" "次へ")
<input type="hidden" name="entityid" value="$!{result.EntityId}">
#else
#ALcell_submit($career "eventSubmit_doSchedule_form_note" "次へ")
#end
#if(! $!{result.isSpan()})
#ALcell_submit($career "eventSubmit_doSchedule_form_group" "参加ﾕｰｻﾞｰ選択")
#ALcell_submit($career "eventSubmit_doSchedule_form_facility" "共有施設選択")
#end
<input type="hidden" name="view_date" value="$!{result.ViewDate.toString()}">
#set($usercount = 1)
#set($membersize = $!{result.MemberList.size()})
<input type="hidden" name="shareusers" value="#foreach($record in $!{result.MemberList})$!{record.Name}#if($usercount<$membersize),#set($usercount = $usercount + 1)#end#end">
#set($facilitycount = 1)
#set($fmembersize = $!{result.FacilityMemberList.size()})
<input type="hidden" name="sharefacs" value="#foreach($record in $!{result.FacilityMemberList})$!{record.FacilityId}#if($facilitycount<$fmembersize),#set($facilitycount = $facilitycount + 1)#end#end">
#ALcell_formfooter()
#ALcell_hr($career '1')
#ALcell_linklist($career $linklist)
