<SCRIPT language="javascript">
// FOR MEMENTO PLUS	
	{literal}
	// check that a date is written correctly
	checkDate_regexp = {/literal}{$internal_date_format_js}{literal}
	function checkDate(input) {
		result_array = checkDate_regexp.exec(input.value);
		if ((result_array != null) && (result_array[0] == input.value)) {
			return true;
		} else {
			alert('{/literal}{$ERROR.invalid_date|addslashes}{literal}');
			return false;
		}
	} // end of checkDate(input)
	{/literal}
</SCRIPT>

<!--
	0 :  	['0'] 	['field_conf_id']  	=	 1
	1 : 	['0'] 	['project_id'] 	=	17
	2 : 	['0'] 	['field_type_id'] 	=	2
	3 : 	['0'] 	['field_name'] 	=	title
	4 : 	['0'] 	['title'] 	=	Title
	5 : 	['0'] 	['description'] 	=	The title of the file.
	6 : 	['0'] 	['edit_order'] 	=	13
	7 : 	['0'] 	['list_order'] 	=	2
	8 : 	['0'] 	['default_value'] 	=	
	9 : 	['0'] 	['properties'] 	=	maxlen=255;
	10 : 	['0'] 	['created_by'] 	=	38
	11 : 	['0'] 	['created_date'] 	=	0
	12 : 	['0'] 	['last_modified_by'] 	=	38
	13 : 	['0'] 	['last_modified_date'] 	=	0
	14 : 	['0'] 	['field_type_title'] 	=	String
	15 : 	['0'] 	['field_type_description'] 	=	Accepts either a length limited or unlimited string
	16 : 	['0'] 	['_username1'] 	=	david.han-sze-chuen@airliquide.com
	17 : 	['0'] 	['_username2'] 	=	david.han-sze-chuen@airliquide.com
-->
<table border="0" width="100%">
  <tr>
    <td valign="top">	
		  <b>&nbsp;{$TITLE.edit_field} <i>{$project_name}</i></b>	
	  <hr size="1">
		<form method=post  action="{$goto_url}">
			<input type=hidden name="field_conf_id" value="{$data.field_conf_id}">
			<input type=hidden name="do" value="edit_field_validate">
			<table border="0">
			<tr>
				<!-- Field type title -->
				{$STRING.type_of_field} : {$data.field_type_title} 
					{* it shouldn't be allowed to add selectbox values to some system fields *}
					{if $isSelectBox and !in_array($data.field_name, array('assigned_to', 'project_id', 'created_by', 'last_modified_by'))}
						&nbsp;&nbsp;-&nbsp;&nbsp;<a href={$edit_selectbox_url}>{$STRING.edit_selectbox}</a>
					{/if}
			</tr>
			<tr>
				<td>
					<!-- Created by : _username1 -->
					{$STRING.FIELD_CONF.Title.created_by} : {$data._username1} <br>
					<!-- Created date -->
					{$STRING.FIELD_CONF.Title.created_date} : {$data.created_date|date:DATE_FORMAT_DETAILED} <br>
				</td>
				<td>
					<!-- Last modified by : _username2-->
					{$STRING.FIELD_CONF.Title.last_modified_by} : {$data._username2} <br>
					<!-- Last modified date -->
					{$STRING.FIELD_CONF.Title.last_modified_date} : {$data.last_modified_date|date:DATE_FORMAT_DETAILED} <br>
				</td>
			</tr>
			<tr>
				<td>
					<hr>
				</td>
				<td>
					<hr>
				</td>
			</tr>
			<tr>				
				<td>
					<!-- Title -->
					{$STRING.FIELD_CONF.Title.title} : {$input.title} <br>
					<!-- Description -->
					{$STRING.FIELD_CONF.Title.description} : <br>
					{$input.description}
				</td>
				<td>
					<!-- Edit order -->
					{$STRING.FIELD_CONF.Title.edit_order} : {$input.edit_order} <br>
					<!-- List Order -->
					{$STRING.FIELD_CONF.Title.list_order} : {$input.list_order}
				<br>
<br>					<!-- Default Value -->
					{$STRING.FIELD_CONF.Title.default_value} : <br>{$input.default_value} <br>
					<a href={$workflow_url}>{$STRING.advanced} </a>
				
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center" valign="top" >
<table border="0"><tr><td >
				<!-- Properties -->
				<b>{$STRING.FIELD_CONF.Title.properties} :</b>
</td></tr>
					<!--
					'maxlen' => 'sp[maxlen]]', 
				'int_size' => 'sp[int_size]', 
				'decimal_size' => 'sp[decimal_size]', 
				'read_only' =>'sp[read_only]', 
				'unique' => 'sp[unique]', 
				'internal_system_use' => 'sp[internal_system_use]', 
				'highlight_url' => 'sp[highlight_url]', 
				'time_type' => 'sp[time_type]'
				-->
				
					{if $input.properties.SB_twin_id}
						{$input.properties.SB_twin_id}
					{/if}
					{if $input.properties.internal_system_use}
						{$input.properties.internal_system_use}
					{/if}
					{if $input.properties.maxlen}
						{$input.properties.maxlen}
					{/if}					
					{if $input.properties.int_size}
						{$input.properties.int_size}
					{/if}
					{if $input.properties.decimal_size}
						{$input.properties.decimal_size}
					{/if}					
					{if $input.properties.unique}
						{$input.properties.unique}
					{/if}
					{if $input.properties.highlight_url}
						{$input.properties.highlight_url}
					{/if}
					{if $input.properties.time_type}
						{$input.properties.time_type}
					{/if}
					{if $input.properties.read_only}
						{$input.properties.read_only}
					{/if}
					{if $input.properties.declare}
						{$input.properties.declare}
					{/if}
					{if $input.properties.hidden}
						{$input.properties.hidden}
					{/if}
					{if $input.properties.label}
						{$input.properties.label}
					{/if}
					{if $input.properties.dashAfter}
						{$input.properties.dashAfter}
					{/if}
</table>
				</td>
			</tr>	
			<tr>
				<td>
					<br>
				</td>
				<td>
					<br>
				</td>
			</tr>
			<tr align="center">
				<td>
					<input type=submit value=OK>
				</td>
				<td>	
					<INPUT TYPE="Button" Value="{$STRING.back}" OnClick="window.location.href='{$back_url}'">
				</td>
			</tr>
			<tr>
				<td>
					<br>
				</td>
				<td>
					<br>
				</td>
			</tr>

			</table>			
			</form>			
    </td>
	</tr>
</table>
