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

## ---------------------------------------------------------------------------
#set($subtitle = "勤務時間設定")
#set ($indicator_id = "indicator-dlg-")
#if  ($mode=="new_form")
#set ($action_str = "追加する")
#set ($subtitle = '勤務形態追加')
#set ($event_submit = "eventSubmit_doExttimecard_system_insert")
#else
#set ($action_str = "更新する")
#set ($subtitle = '勤務形態編集')
#set ($event_submit = "eventSubmit_doExttimecard_system_update")
#end
## ---------------------------------------------------------------------------
#ALdialogheaderCloseJS($subtitle "aipo.exttimecardsystem.hideDialog()")
#ALspacebothheader()
#ALerrmsg($errmsgs)
<div id="messageDiv"></div>
#ALajaxIndicator("$indicator_id" "$!portlet.ID" "")
#ALajaxscreenformheader("extTimecardSystemForm" $jslink $portlet "ExtTimecardSystemFormJSONScreen" "aimluck.io.submit(this, '$indicator_id', '$!portlet.ID',aipo.exttimecardsystem.onReceiveMessage)")
#ALtableheaderWide()
#ALtdcaption("#ALrequired('勤務形態')")
#ALtditemheader()
#ALtextfield('system_name' $!result.SystemName '70%' 30 'enabled')
#ALtditemfooter()
#ALtdcaption("#ALrequired('勤務時間')")
#ALtditemheader()
<select name="start_hour" size="1" >
#foreach ( $num in [0..23] )
<option value="$num" #if ($!result.StartTimeHour.toString() == "$num") selected="selected" #end>$num時</option>
#end
</select>
<select name="start_minute" size="1">
#foreach ( $num in [0..59] )
#if($num % 5 == 0)
<option value="$num" #if ($!result.StartTimeMinute.toString() == "$num") selected="selected" #end>$num分</option>
#end
#end
</select>～<select name="end_hour" size="1" >
#foreach ( $num in [0..23] )
<option value="$num" #if ($!result.EndTimeHour.toString() == "$num") selected="selected" #end>$num時</option>
#end
</select>
<select name="end_minute" size="1">
#foreach ( $num in [0..59] )
#if($num % 5 == 0)
<option value="$num" #if ($!result.EndTimeMinute.toString() == "$num") selected="selected" #end>$num分</option>
#end
#end
</select>
#ALtditemfooter()
#ALtdcaptionAtt("#ALrequired('休憩時間')" "rowspan='2'")
#ALtditemheader()
<h3>勤務時間内の場合</h3>
<input class="text" name="worktime_in" value="$!result.WorktimeIn" type="text" size="3" maxlength="3" style="ime-mode: disabled;">
分の勤務に対して、休憩時間は
<input class="text" name="resttime_in" value="$!result.ResttimeIn" type="text" size="3" maxlength="3" style="ime-mode: disabled;"> 分
<div class="spaceTop">#ALcaution('休憩時間は0から480の間で半角英数字で入力してください。')</div>
#ALtditemfooter()
#ALtditemheader()
<h3>勤務時間外の場合</h3>
<input class="text" name="worktime_out" value="$!result.WorktimeOut" type="text" size="3" maxlength="3" style="ime-mode: disabled;">
分の勤務に対して、休憩 時間は
<input class="text" name="resttime_out" value="$!result.ResttimeOut" type="text" size="3" maxlength="3" style="ime-mode: disabled;"> 分
<div class="spaceTop">#ALcaution('休憩時間は0から480の間で半角英数字で入力してください。')</div>
#ALtditemfooter()
#ALtdcaption("#ALrequired('日付切替時刻')")
#ALtditemheader()
<select name="change_hour" size="1">
#foreach ( $num in [0..23] )
<option value="$num" #if ($!result.ChangeHour.toString() == "$num") selected="selected" #end>$num時</option>
#end
</select>
<div class="spaceTop">この時刻を過ぎると次の日のタイムカードに切り替えます。</div>
#ALtditemfooter()
#ALtdcaption("勤務時間")
#ALtditemheader()
<input type="checkbox" name="outgoing_add_flag" value="T" id="outgoing_add_flag" #if($result.OutgoingAddFlag.toString() == 'T')checked="checked"#end/>
<label for="outgoing_add_flag_id">外出を勤怠時間に含める</label>
#ALtditemfooter()
#ALtablefooter()
#ALbuttonheader()
#ALsubmit($event_submit $action_str)
#ALajaxbuttonClose()
#ALbuttonfooter()
#if($mode=="new_form")
<input type="hidden" name="mode" value="insert" />
#else
<input type="hidden" name="mode" value="update" />
#end
#ALformfooter()
#ALspacebothfooter()
#ALdialogfooter()
