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

## ---------------------------------------------------------------------------
#if($mode=="new_form")
#set ($action_str = "追加する")
#set ($event_submit = "eventSubmit_doTodo_insert")
#set ($subtitle = 'ToDo追加')
#else
#set ($action_str = "更新する")
#set ($subtitle = 'ToDo編集')
#set ($event_submit = "eventSubmit_doTodo_update")
#end
#set ($home = ["ﾒﾆｭｰToDoへ戻る", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doTodo_menu','1')"])
#ALcell_pagetitle_iphone($career $subtitle)
#ALcell_errmsg($career $errmsgs)
#ALcell_formheader($jslink $portlet)
$!result.getFieldName("category_id")
<select name="category_id">
#foreach( $record in $result.CategoryList )
<option value="$!record.CategoryId"#if ($!result.CategoryId.toString() == $!record.CategoryId.toString()) selected#end>$!record.CategoryName
#end
</select>
<hr size="1">
$!result.getFieldName('todo_name')#ALcell_must()
#ALcell_textfield('todo_name' $!result.TodoName 14 50 1 '' '')
<hr size="1">
$!result.getFieldName("start_date")
<select name="start_date_year" size="1">
<option value="0">------
#set($end_year = $!result.CurrentYear + 1)
#foreach ( $num in [2004..$!{end_year}] )
<option value="$num"#if ($!result.StartDate.Year == "$num") selected#end>$num年
#end
</select>
<select name="start_date_month" size="1">
<option value="0"#if ($!result.StartDate.Month == "0") selected#end>------
#foreach ( $num in [1..12] )
<option value="$num"#if ($!result.StartDate.Month == "$num") selected#end>$num月
#end
</select>
<select name="start_date_day" size="1">
<option value="0"#if ($!result.StartDate.Day == "0") selected#end>------
#foreach ( $num in [1..31] )
<option value="$num"#if ($!result.StartDate.Day == "$num") selected#end>$num日
#end
</select>
<input name="start_date_check" type="checkbox" value="TRUE"#if ($!result.StartDateCheck.toString() == "TRUE") checked#end>指定しない
<hr size="1">
$!result.getFieldName("end_date")
<select name="end_date_year" size="1">
<option value="0">------
#foreach ( $num in [2004..$!{end_year}] )
<option value="$num"#if ($!result.EndDate.Year == "$num") selected#end>$num年
#end
</select>
<select name="end_date_month" size="1">
<option value="0"#if ($!result.EndDate.Month == "0") selected#end>------
#foreach ( $num in [1..12] )
<option value="$num"#if ($!result.EndDate.Month == "$num") selected#end>$num月
#end
</select>
<select name="end_date_day" size="1">
<option value="0"#if ($!result.EndDate.Day == "0") selected#end>------
#foreach ( $num in [1..31] )
<option value="$num"#if ($!result.EndDate.Day == "$num") selected#end>$num日
#end
</select>
<input name="end_date_check" type="checkbox" value="TRUE"#if ($!result.EndDateCheck.toString() == "TRUE") checked#end>指定しない
<hr size="1">
$!result.getFieldName("priority")<br>
<input name="priority" type="radio" value="1"#if ($!result.Priority.toString() == "1") checked#end>高い
<input name="priority" type="radio" value="2"#if ($!result.Priority.toString() == "2") checked#end>やや高い
<input name="priority" type="radio" value="3"#if ($!result.Priority.toString() == "3") checked#end>普通
<input name="priority" type="radio" value="4"#if ($!result.Priority.toString() == "4") checked#end>やや低い
<input name="priority" type="radio" value="5"#if ($!result.Priority.toString() == "5") checked#end>低い
<hr size="1">
$!result.getFieldName("state")
<select name="state">
<option value="0"#if ($!result.State.toString() == "0") selected#end>未着手
<option value="10"#if ($!result.State.toString() == "10") selected#end>10%
<option value="20"#if ($!result.State.toString() == "20") selected#end>20%
<option value="30"#if ($!result.State.toString() == "30") selected#end>30%
<option value="40"#if ($!result.State.toString() == "40") selected#end>40%
<option value="50"#if ($!result.State.toString() == "50") selected#end>50%
<option value="60"#if ($!result.State.toString() == "60") selected#end>60%
<option value="70"#if ($!result.State.toString() == "70") selected#end>70%
<option value="80"#if ($!result.State.toString() == "80") selected#end>80%
<option value="90"#if ($!result.State.toString() == "90") selected#end>90%
<option value="100"#if ($!result.State.toString() == "100") selected#end>完了
</select>
<hr size="1">
$!result.getFieldName("note")
#ALcell_textarea('note' $!result.Note 6 14)
<hr size="1">
$!result.getFieldName("public_flag")<br>
<input name="public_flag" type="radio" value="T"#if ($!result.PublicFlag.toString() == "T") checked#end>公開
<input name="public_flag" type="radio" value="F"#if ($!result.PublicFlag.toString() == "F") checked#end>非公開
<hr size="1">
#submit($event_submit $action_str)#submit('eventSubmit_doTodo_list' 'キャンセルする')
#ALcell_formfooter()
<hr>
#ALcell_menuhome($home)
<br>
