<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html metal:use-macro="container/page_macro/macros/master_page">

<span tal:omit-tag="" metal:fill-slot="main_content_slot">
	  &gt; <a href=".." i18n:translate="">knowledge building</a>
	  &gt; <label tal:omit-tag="" tal:content="python:context.aq_parent.get_name()" />
	  &gt; <label tal:omit-tag="" i18n:translate="">creating a new message</label>
<!--	FIX:something missing, content.dtml maybe  
	  <span tal:omit-tag="" tal:content="structure python:context.aq_parent.aq_parent"/>
	  <span tal:omit-tag="" tal:content="structure python:content(ret_self().parent().parent(), REQUEST)"/>
	  
	Displays note
	
	<dtml-unless "ret_self().parent().parent().is_course_context()">
  <dtml-var expr="content(ret_self().parent().parent(), REQUEST)">
</dtml-unless>
-->
  
	  <form action="edit_note_form_handler" method="post" enctype="multipart/form-data" tal:define="tt context/get_tt_ref">
	  	  <table border="0" cellpadding="4" cellspacing="0" width="100%" bgcolor="#EEEEEE">
		  <tr>
		  	  <td>
				<span tal:replace="structure python:tt.get_tt_icon_tag(request)" />
				<strong tal:content="tt/get_name" />
				<br />
				<br />
				<label tal:omit-tag="" i18n:translate="">Message title:</label>
				<br />
				<input type="text" name="subject:string" size="45" value="" tal:attributes="value context/get_subject | default" /> 
			</td>
			<td align="right">
				<label tal:omit-tag="" tal:content="python:str(user)" />
				<span tal:omit-tag="" tal:replace="structure python:curUser.get_photo_tag(height='40')" />
			</td>
		  </tr>
		  <table>
		  
		  <table border="0" cellpadding="0" cellspacing="0" width="100%">
		  	<tr>
		  		<td align="right" tal:content="python:context.get_printable_current_time(request)"></td>
		  	</tr>
		  </table>
		  
		  <table border="0" cellpadding="0" cellspacing="0" width="100%">
		  <tr>
		  	<td valign="top" colspan="2" style="width:500px">
			<label i18n:translate="">Message:</label><br />
				<textarea name="body:string" cols="60" rows="20" tabindex="2" tal:content="context/body | context/get_body"></textarea>
			</td>

		 	<td rowspan="2">&nbsp;</td>
			<td rowspan="2" style="text-align:left" valign="top">
			  <span tal:omit-tag="" tal:condition="tt/has_checklist">
				<br />
				<h3 i18n:translate="">Guidance</h3>
				<span tal:replace="structure tt/render_checklist" />
			  </span>
			  
			  	<label tal:omit-tag="" i18n:translate="">Change the knowledge type, if needed</label>:&nbsp;
				<select name="tt_id">
						<option value="..." selected="selected" i18n:translate="">Knowledge type</option>
						<span tal:omit-tag="" tal:repeat="pfu context/get_possible_follow_ups">
							<option value="" 
									selected="selected" 
									tal:attributes="value pfu/get_id;selected python:pfu.get_id()==context.get_tt_id() and default" 
									tal:content="pfu/get_name"></option>
						</span>
				</select>
			</td>	
		  </tr>
		  <tr>
		  <tr tal:condition="context/has_image">
			<td valign="top" i18n:translate="">Current image:</td>
			<td><img src="" tal:attributes="src string:${context/hack_absolute_url}/get_image_data" /></td>
		  </tr>
		  <tr tal:condition="context/has_image">
		  	<td i18n:translate="">Replace image with:</td>
			<td><input type="file" name="image" tabindex="3" class="width240" /></td>
		  </tr>
		  <tr tal:condition="not:context/has_image">
		  	<td i18n:translate="">Add image:</td>
			<td><input type="file" name="image" tabindex="3" class="width240" /></td>
		  </tr>
		  <tr>
			<td style="width:120px" i18n:translate="">Title for the image:</td>
			<td>
				<input type="text" name="image_name:string" size="36" value="" 
					tal:attributes="value context/image_name | context/get_image_name" tabindex="4" class="width240" />
			</td>
		  </tr>
		  <tr>
			<td i18n:translate="">Add link:</td>
			<td>
				<input type="text" name="url:string" size="36" value=""
					tal:attributes="value context/my_url | context/get_url" tabindex="5" class="width240" />
			</td>
		  </tr>
		  <tr>
			<td i18n:translate="">Title of the link:</td>
			<td>
				<input type="text" name="url_name:string" value="" 
					tal:attributes="value url_name | context/get_url_name" size="36" tabindex="6" class="width240" />
			</td>
		  </tr>
		  <tr>
			<td colspan="2">&nbsp;</td>
		  </tr>
		  <tr>
              <td>&nbsp;</td>
              <td>
              	<input i18n:attributes="value" type="submit" value="Preview" name="preview" tabindex="7" />
              	<input i18n:attributes="value" type="submit" value="Cancel" name="cancel" tabindex="8" />
              </td>
		  </tr>
		  </table>
	  </form>
</span>

</html>
