{% load i18n %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
	<head>
		<script src="/media/jslib/jquery.js"></script>
		<script src="/media/jslib/jquery.validate.js"></script>
		<script src="{{ MEDIA_URL }}/jslib/i18n.js"></script>
		<script src="{{ MEDIA_URL }}/jslib/i18n_{{ LANGUAGE_CODE }}.js"></script>
		<script src="{{ MEDIA_URL }}/jslib/dwz.util.date.js"></script>
		<script src="{{ MEDIA_URL }}/jslib/dwz.datepicker.js"></script>
		<script src="{{ MEDIA_URL }}/jslib/jquery.plus.js"></script>
		<script src="{{ MEDIA_URL }}/jslib/jquery.ztree-2.6.min.js"></script>
		<script src="{{ MEDIA_URL }}/jslib/jquery.zcommon.js"></script>
		{% include "site_medias_css.html" %}	

	</head>
<body style=" background:white;">
<div style="margin:0px;padding:0px;">
	{% block content %}
		<form method="post" onkeydown="if(event.keyCode==13){return false;}"  id="id_edit_form" enctype="multipart/form-data"{% if action_url %} action="{{ action_url }}"{% endif %}>
			<input type="hidden" id="model_keys" name="pk" value="{{ model_keys }}" />
		{% block title %}
		<div id="id_span_title" class="portlet-header sfActive">
		<span class='icon_SiteMap'>&nbsp;</span>{% trans "当前位置：" %}
			{% if position %} 
				{{position}} 
			{% else %} 
				<span id="id_rel_log">{{ app_menu|translate_str }}</span> -> {{ title|translate_str|escape }}
			{% endif %}->{{ form.verbose_name|escape }}
		</div>
		{% endblock %}
				{% block help_panel %}
					<div class="form_help">
					{% if form.admin_help_text %}
					<div id="id_help_text">{% block help_image %}{% if form.admin_help_image %}<img src="{{ form.admin_help_image }}" align ="left" /> {% endif %}{% endblock %} {% autoescape off %}{{ form.admin_help_text }} {% endautoescape %} </div>
					{% endif %}
					<div id="id_help" style="text-align: right;">
						{% block help_difine %}{% endblock %}
						<a href='javascript:void(0);' ref="{{ MEDIA_URL }}/help/{{ LANGUAGE_CODE }}/{{ dataOpt.app_label }}/{{ model_name }}#{% if detail %}{{ detail }}{% else %}detail{% endif %}"  ></a>
					</div>
					<div class="clear"></div>
					</div>
					{% endblock %}<!-- help_panel -->
		<table cellpadding="3" style="margin:0px 10px 0px 10px; position:relative;" class="tbl_data_edit">
					<tr><td clospan="6">
					<div id="id_tabs">
					
					</div>
					</td></tr>
		
					<tr id="pre_addition_fields">
					{% block pre_addfields %}
					    <th></th>
						    <td>
							<table>
								<tr>
									<td><div id="objs_for_op" style="padding:2px;margin:0px 0px 2px 0px;">{% if form.tips_text %}{{ form.tips_text }}?{% endif %}</div>
									</td>
									<td><div id="id_op_for_model" data="{{op.for_model}}"></div><div id="id_store_select_emp">
										<table id="id_tbl"></table></div>
									</td>
								</tr>
							</table>
						</td>
					{% endblock %}</tr>
		
					{% block form %}
					{{ form.as_table }}
					{% endblock %}<!-- form -->
		
					<tr id="addition_fields">{% block addfields %}{% endblock %}</tr>
					</table>
		
					{% if request.is_ajax %}{% else %}
					
					{% endif %}


		</form>

		<input type="hidden" id="app_label" value="/{{app_label}}"/>
		<input type="hidden" id="data_model_url" value="/{{app_menu}}/{{model_name}}"/>
		<input type="hidden" id="operation_name" value="/{{detail}}"/>
		<input type="hidden" id="model_name" value="/{{model_name}}"/>
		<input type="hidden" id="title" value="{{title}}"/>
		<input type="hidden" id="model_data" value="{{model_data}}"/>
		<div id="id_info"></div>
		{% block edit_buttons %}
				<div class="editformbtn">
					<div class="lineH22 img_padding">
						<span class="action_OK"></span>
						<a class="Link_blue1" href="javascript:void(0)" id="OK">{% trans "确定" %}</a>
					</div>
					<div class="lineH22 img_padding">
						<span class="action_Cancel"></span>
						<a class="Link_blue1" href="javascript:void(0)" id="Cancel">{% trans "取消" %}</a>
					</div>
				</div>
		{% endblock %}
		{% block add_contents %}{% endblock %}
	{% endblock %}<!-- content ???-->
	</div>
</body>
</html>
<script src="{{ MEDIA_URL }}/flexigrid/flex_base_operation.js"></script>
<script src="{{ MEDIA_URL }}/flexigrid/flex_base_audit.js"></script>
<script>
$("body input.date").each(function(){
			var $this = $(this);
			var opts = {};
			if ($this.attr("format")) opts.pattern = $this.attr("format");
			if ($this.attr("yearstart")) opts.yearstart = $this.attr("yearstart");
			if ($this.attr("yearend")) opts.yearend = $this.attr("yearend");
			$this.datepicker(opts);
		})		
{% block addjs %}
		
{% endblock %}
</script>
