{% extends "forms/tree.html" %} {% load exfiltry %} {% load exsyntax %} {% block pythoncode %} {% endblock %} {% block on_dialog_load %} function show_hide(typ){ if (typ=='S'){ $('label[for|="id_grand_parent"]').show(); $('label[for|="id_description"]').show(); $('select[name^="grand_parent"]').show(); $('input[name="description"]').show(); $('#id_key').show() } else{ $('label[for|="id_grand_parent"]').hide(); $('label[for|="id_description"]').hide(); $('select[name^="grand_parent"]').hide(); $('input[name="description"]').hide(); $('#id_key').hide() } } $('#id_type').change( function(){ var typ; typ = $(this)[0].options[$(this)[0].selectedIndex].value; show_hide(typ); return false } ); var id_type=$('#id_type')[0].options[$('#id_Typ')[0].selectedIndex].value; show_hide(id_type); if(id_type!=""){ $('label[for|="id_type"]').hide(); $('select[name="type"]').hide() } {% endblock %} {% block all %} {% with table_type='datatable' title="Accounts" %} {{ block.super }} {% endwith %} {% endblock %} {% block id_extra_tree %} {% view_row object object.name %} {% endblock %} {% block list_row_header %}