{% extends "flex_base_operation.html" %}
{% load i18n %}
{% block html_title %}
{{ form.title|escape }}
{% endblock %}
{% block addfields %}
{% autoescape off %} 
        <th height="20">
        	<label for="id_parent">{% trans "转交审批人"%}:</label>
        </th>
        <td>
        <input id="id_show_input" class="wZBaseCharField input_showDeptTree" type="text"  readonly="readonly"></input>
		<span class="btn_showDeptTree">
		    <img id="id_drop_dept" onclick="javascript:$(this).parent().find('#show_deptment').show().bgiframe();" src="/media/img/sug_down_on.gif"></img>
		    <div id="show_deptment" style="display: none;">
		        <div class="title" onclick="javascript:$(this).parent().parent().find('#show_deptment').hide();">
		            <span class="close btn" >
		                {% trans "确定"%}
		            </span>
		        </div>
		        <div id="id_dept" class="dispayN">
		            <ul id="position_tree_by_dept" class="tree"></ul>
		        </div>
		    </div>
		
		</span>
		<div>
		
		</div></td>
        <td><td/>
{% endautoescape %}
{% endblock %}
{% block addjs %}
	before_submit = function(){
		if($("#position_tree_by_dept").find('ul>li').length > 0 && $("#id_show_input").val().length == 0){
			$('#id_info').html("<ul class='errorlist'><li>"+gettext('请选择转交审批人!')+"</li></ul>")
			return false
		}else{
	          return true
	    }
	}
    {% block extra_js %}
    {% endblock %}
{% endblock %}
