<tal:block metal:use-macro="python:here.getFormsTool().getForm('site_macro_schema_edit').macros['page']">

<h1 metal:fill-slot="title" i18n:translate="">Edit File</h1>

<!-- Custom fields -->
<tal:block metal:fill-slot="custom_properties">
<!-- File Upload -->
<fieldset style="background-color: #F9FCFE" tal:define="req_lang request/lang|nothing">
<legend>
	<span i18n:translate="">Attached file</span>
	<span tal:condition="python:here.get_pluggable_item_property_mandatory(here.meta_type, 'file')" class="mandatory_field"> *</span>
</legend>

<div class="field-inline" tal:condition="python:here.size(req_lang)>0">
	<input type="radio" name="source" id="source-none" value="" checked="checked" />
	<label for="source-none" i18n:translate="">Keep</label>
	<a tal:define="download_url python:here.getEditDownloadUrl(lang=req_lang);
		downloadfilename python:here.downloadfilename(lang=req_lang, version=True);
		size python:here.utShowSizeKb(here.size(req_lang));
		content_type python:here.getVersionContentType(req_lang);
		icon python:here.rstk['icon_for_content_type'](content_type);
		title python:icon['title'];
		url python:icon['url']"
		tal:attributes="href download_url">
		<img tal:attributes="src python:url;
							alt title;
							title title" />
		<span tal:replace="string:${downloadfilename} (${title}, ${size} Kb)"/>
	</a>
</div>
<div class="field-inline">
	<input type="radio" name="source" id="source-file" value="file" tal:attributes="checked python:test(here.size(req_lang)<=0, 'checked', None)"/>
	<label for="source-file" i18n:translate="">Upload file</label>
	<input type="file" name="file" id="file" value="" size="50" onclick="document.getElementById('source-file').checked='checked'"/>
</div>	
<div class="field-inline">
	<input type="radio" name="source" id="source-url" value="url" />
	<label for="source-url" i18n:translate="">Get from URL</label>
	<input type="text" name="url" id="url" value="" size="50" onclick="document.getElementById('source-url').checked='checked'"/>
</div>
<div class="field-inline">
	<input type="checkbox" name="version" id="version" checked="checked"/>
	<label for="version" i18n:translate="">Check this to create a new version and maintain the previous one(s)</label>
</div>
</fieldset>

</tal:block>
</tal:block>
