<fieldset class="noborder">
    {include file='r/hidden.tpl' name="drawings_edit"}{* What entry do we edit - If empty = add *}
    {include file='r/hidden.tpl' name="drawings_replace"}{* What entry do we replace - Revision *}
    {include file='r/hidden.tpl' name="drawings_set_sub_other"}{* Set sub no. *}
    {if $approved_when_active}
        {$is_valid_onchange = "onchange=\"$('#drawings_approved').prop('checked', $(this).prop('checked'))\""}
    {else}
        {$is_valid_onchange = ""}
    {/if}
    {include file='r/checkbox.tpl' name="drawings_is_valid" title="drawings_is_valid" filter_extra=$is_valid_onchange}  
    
    {include file='r/select-project.tpl' name="drawings_project" title="drawings_project" collapse='formcoll' class="is_project required"
        list=$projects_list id="id" text="project"
        add_icons_file="project" filter_favourite_list=$projects_favourite_list}
    
    {include file='r/select.tpl' name="drawings_drawing_type" title="drawings_drawing_type" collapse='formcoll' class="required"
        list=$drawing_types id="id" text="name"}
</fieldset>

<fieldset class="noborder">
    {include file='r/input.tpl' name="drawings_plan_no" title="drawings_plan_no"  class="required t-long" add_icons_file="warning" past_span_text="" maxlength=255}
    {include file='r/input.tpl' name="drawings_plan_index" title="drawings_plan_index" collapse='formcoll' class="" maxlength=10}
    {include file='r/input.tpl' name="drawings_sub_plan" title="drawings_sub_plan1" collapse='formcoll' class="" maxlength=50}
</fieldset>

<fieldset class="borderbottom">
    {include file='r/input.tpl' name="drawings_plan_content" title="drawings_plan_content" class="required t-long" maxlength=255}
    {include file='r/input.tpl' name="drawings_redline_remarks" title="drawings_redline_remarks1" class=" t-long" maxlength=100}
</fieldset>
<fieldset class="borderbottom">
    {include file='r/date.tpl' name="drawings_date" title="drawings_date" collapse='formcoll'}
    {include file='r/ajaxselect.tpl' name='drawings_received_from' title="drawings_received_from"
        class="addressselect fulltext_search t-mid" collapse='formcoll'
        add_icons_file="project_participants"
        filter_project_participants_project_field="drawings_project"}
    
    {include file='r/input.tpl' name="drawings_scale" title="drawings_scale" collapse='formcoll' class="t-small"}
    
    {include file='r/select.tpl' name="drawings_drawing_size" title="drawings_drawing_size" collapse='formcoll'
        class="on_change_update ocu-p:drawingandproductdirectory ocu-m:get_area ocu-f:drawings_area"
        list=$drawing_sizes id="id" text="name"}
    
    {include file='r/input.tpl' name="drawings_area" title="drawings_area" class=""}
    
    {include file='r/file_type.tpl' name="drawings_cad_file" title="drawings_cad_file" targettype="files" targetdata="temp"
        add_icons_file='drawings_filetype' drawings_filetype_type='drawings'}
    {include file='r/file_type.tpl' name="drawings_plot_file" title="drawings_plot_file" targettype="files" targetdata="temp"
        add_icons_file='drawings_filetype' drawings_filetype_type='drawings'}
    
    {include file='r/textarea.tpl' name="drawings_purpose" title="drawings_purpose" class="t-long"}
    
    {include file='r/input.tpl' name="drawings_clipboard" title="drawings_clipboard" class="t-long" maxlength=120}
    
    {include file='r/select.tpl' name='drawings_signed_by' title="drawings_signed_by" class="" collapse='formcoll'
        list=$drawing_staff_list id="id" text="staff_name"}
</fieldset>
<fieldset class="noborder">
    {include file='r/checkbox.tpl' name="drawings_approved" title="drawings_approved" collapse='formcoll'}
    {include file='r/date.tpl' name="drawings_approval_deadline" title="drawings_approval_deadline" collapse='formcoll'}
    {include file='r/many.tpl' name="drawings_approved_external" title="drawings_approved_external" class="follow-item:drawings_approved_external_btn"
        add_icons_file="drawings_approved_external" deactivate_possible=true readonly="true"}
</fieldset>

{include file='Basic/edit_popform_addi.tpl' edit_addi_list=$drawings_addi_list  
    edit_addi_section='drawings' edit_addi_target='drawings' edit_addi_collapse='formcoll'}
