Location: PHPKode > projects > PhpProjectMaster > www/template/admin/task/item_form.html
<script type="text/javascript">
<!--
function form_refresh(F){
 if (F.id.value>""){
    F.AddNew.value="1";
 }
 F.SaveRec.value="";
 F.is_refresh.value="1";
 F.submit();
}

var att_max_ctr=32;
var att_list_ctr=[1,1];

function upload_more_click(upl_list, btn, ctr){
 if (!ctr) ctr=0;
 att_list_ctr[ctr]++;
 $(upl_list).append('<br /><input type="file" name="file'+att_list_ctr+'" size="32" value="" class="text" onChange="input_changed()">');
 $(btn).appendTo(upl_list);

 if (att_list_ctr[ctr]>=att_max_ctr){
    $(btn).hide();
 }

 return false;
}

//-->
</script>

<~/common/form_msg>

<~prev_next_block ifge="t_id" value="0" inline>
<div align="center">
<a href="<~./script_name>?GoPrev=1&id=<~t_id>">&lt;&lt; `Previous `<~/common/n/nsel></a>
<~/common/dot>
<a href="<~./script_name>?GoNext=1&id=<~t_id>">`Next `<~/common/n/nsel> &gt;&gt;</a>
</div>
</~prev_next_block>

<table class="form">
<form action="<~./script_name>" method="post" name="DataF" enctype="multipart/form-data">
<input type="hidden" name="SaveRec" value="1">
<input type="hidden" name="AddNew" value="">
<input type="hidden" name="is_refresh" value="">
<input type="hidden" name="is_adv_show" value="<~is_adv_show>">
<input type="hidden" name="id" value="<~t_id>">

<tr>
<td class="label">&nbsp;</td>
<td class="content" align="right"><a href="#" onclick="return toggle_adv(document.DataF)" id="btn_toggle_adv"><~show_adv_text ifneq="is_adv_show" value="1" inline>`show advanced features`</~show_adv_text><~hide_adv_text ifeq="is_adv_show" value="1" inline>`hide advanced features`</~hide_adv_text></a></td>
</tr>

<~id_block ifge="t_id" value="0" inline>
<tr>
<td class="label"><~./screen_name> `ID`:</td>
<td class="content"><b><~t_id></b>&nbsp;</td>
</tr>
</~id_block>

<~itype_block ifeq="t_id" value="0" inline>
<tr>
<td class="label"><~/common/req>`Record Type`:</td>
<td class="content">
<select name="item[itype]" onchange="form_refresh(this.form)">
<~/common/sel/itype.sel select="itype">
</select>
</td>
</tr>
</~itype_block>

<~itype2_block ifge="t_id" value="0" inline>
<tr>
<td class="label">`Record Type`:</td>
<td class="content">
<b><~/common/sel/itype.sel selvalue="itype"></b>
</td>
</tr>
</~itype2_block>

<tr>
<td class="label"><~/common/req>`Project`:</td>
<td class="content">
<select name="item[p_id]" class="text" onchange="form_refresh(this.form);">
<option value=""> - `select` - 
<~select_p_id>
</select>
</td>
</tr>


<tr class="adv">
<td class="label">`Parent Task`:</td>
<td class="content">
<select name="item[parent_t_id]" class="text" onChange="input_changed()">
<option value="0"> - `none` - 
<~select_parent_t_id>
</select>
</td>
</tr>

<tr>
<td class="label"><~/common/req>`Title`:</td>
<td class="content"><input type="text" name="item[iname]" size="64" maxlength="255" value="<~iname htmlescape>" class="text" onChange="input_changed()"></td>
</tr>
<tr valign="top">
<td class="label">`Description`:
<~idesc_bugs ifeq="itype" value="1" inline>
<div><small>
`Please describe`:<br/>
- `steps to reproduce`<br/>
- `what expected`<br/>
- `what happened`<br/>
</small></div>
</~idesc_bugs>
</td>
<td class="content"><textarea name="item[idesc]" rows="5" cols="50" class="text" onChange="input_changed()"><~idesc htmlescape></textarea>
</td>
</tr>

<tr>
<td class="label"><~/common/req>`Assigned to`:</td>
<td class="content">
<select name="item[u_id]" class="text" onChange="input_changed()">
<option value=""> - `select` - 
<~select_u_id>
</select>
</td>
</tr>


<tr class="adv">
<td class="label">`Priority`:</td>
<td class="content">
<select name="item[prio_id]" class="text" onChange="input_changed()">
<option value=""> - `select` - 
<~select_prio_id>
</select>
</td>
</tr>

<~severity_block ifeq="itype" value="1" inline>
<tr class="adv">
<td class="label">`Severity`:</td>
<td class="content">
<select name="item[severity]">
<~/common/sel/severity.sel select="severity">
</select>
</td>
</tr>
</~severity_block>

<~build_block ifeq="itype" value="1" inline>
<tr class="adv">
<td class="label">`Build Opened`:</td>
<td class="content"><input type="text" name="item[build_opened]" size="16" maxlength="64" value="<~build_opened htmlescape>" class="text" onChange="input_changed()"></td>
</tr>
<tr class="adv">
<td class="label">`Build Fixed`:</td>
<td class="content"><input type="text" name="item[build_fixed]" size="16" maxlength="64" value="<~build_fixed htmlescape>" class="text" onChange="input_changed()"></td>
</tr>
</~build_block>

<tr class="adv">
<td class="label">`% completed`:</td>
<td class="content"><input type="text" name="item[perc_compl]" size="13" maxlength="13" value="<~perc_compl>" onKeyPress="chkDigits(1)" class="text" onChange="input_changed()">
</td></tr>


<tr class="adv">
<td class="label">`Start Date`:</td>
<td class="content">
<~start_time_input>
</td>
</tr>

<tr class="adv">
<td class="label">`End Date (initially planned)`:</td>
<td class="content">
<~end_time_input>
</td>
</tr>

<~end_time2_block ifge="t_id" value="0" inline>
<tr class="adv">
<td class="label">`End Date (currently planned)`:</td>
<td class="content">
<~end_time2_input>
</td>
</tr>
</~end_time2_block>

<~end_time_actual_block ifge="end_time_actual" value="" inline>
<tr class="adv">
<td class="label">`End Date (actual)`:</td>
<td class="content">
<b><~end_time_actual></b>
</td>
</tr>
</~end_time_actual_block>


<tr valign="top" class="adv">
<td class="label">`Attach files`:</td>
<td class="content">
<div id="upload_list_task"><input type="file" name="file1" size="32" value="" class="text" onChange="input_changed()">
<span id="btn_att_more_task">&nbsp;<a href='#' onclick="return upload_more_click('#upload_list_task', '#btn_att_more_task')">`more`</a></span>
</div>

<div id="att_list">
<~att_list_dr repeat inline>
 <div>
 <a href="<~ROOT_URL>/php/att.php?download=1&id=<~att_id>"><~iname></a>
 <~/common/dot><~fsize_human>
 <~/common/dot><a href="#" onclick="return delete_btn('<~./script_name>?DelRecAtt=1&id=<~t_id>&att_id=<~att_id>')">`delete`</a>
 </div>
</~att_list_dr>
</div>
</td>
</tr>

<tr>
<td class="label">`Status`:</td>
<td class="content">
<select name="item[status]">
<~/common/sel/status0.sel select="status" ifeq="itype" value="0">
<~/common/sel/status1.sel select="status" ifeq="itype" value="1">
<~/common/sel/status0.sel select="status" ifeq="itype" value="2">
</select>
</td>
</tr>

<tr class="adv">
<td class="label">`Private`:</td>
<td class="content"><input type="checkbox" name="item[is_private]" value="1" <~/common/checked ifeq="is_private" value="1">></td>
</tr>

<~add_block ifge="add_u_id" value="0" inline>
<tr>
<td class="label">`Added on`:</td>
<td class="content"><~add_time> by <~add_u_id_name></td>
</tr>
</~add_block>

<~upd_block ifge="upd_u_id" value="0" inline>
<tr>
<td class="label">`Updated on`:</td>
<td class="content"><~upd_time> by <~upd_u_id_name></td>
</tr>
</~upd_block>

<tr>
<td colspan="2" class="label">

<~/common/req_msg>
<input type="submit" value=" <~str_update ifneq="t_id" value="0" inline>`Update`</~str_update><~str_insert ifeq="t_id" value="0" inline>`Insert`</~str_insert> ">&nbsp;
<input type="submit" name="AndAddNext" value=" <~str_update ifneq="t_id" value="0" inline>`Update`</~str_update><~str_insert ifeq="t_id" value="0" inline>`Insert`</~str_insert> `and Add New` <~/common/n/nsel>">&nbsp;
<input type="button" value=" `Cancel` " onClick="cancel_form('<~../script_name>')">

</td>
</tr>
</form>
</table>
<br>
Return current item: PhpProjectMaster