<div class="">
    <table id="occuopation_groups_list">
        <thead>
            <tr>
                <th class="edtdelp-btn noprint">
                    <span class="dialog_make_btn16 add smallbtns ui-corner-all"
                        onclick="staffadmin.occupation_grp.add();"
                        title="{$i.basic_add}"></span>
                </th>
                <th scope="col">{$i.basic_from}</th>
                <th scope="col">{$i.basic_to}</th>
                <th scope="col">{$i.staffadmin_occupation_grp}</th>
                <th scope="col">{$i.staffadmin_occupation_grp} {$i.staffadmin_description}</th>
                <th scope="col">
                    {$i.staffadmin_description}
                    {include file="r_basic/print.tpl" print_btn_extra='style="float:right; margin-left:1vw;"'}
                </th>
            </tr>
        </thead>
        <tbody>
        {foreach from=$occupation_groups item="item" name="occupation_groups"}
            <tr>
                <td class="noprint">
                    {if $smarty.foreach.occupation_groups.first == TRUE}
                        <span class="dialog_make_btn16 edit smallbtns ui-corner-all"
                            onclick="staffadmin.occupation_grp.edit({$item->id}, this);"
                            title="{$i.basic_edit}"></span>
                        <span class="dialog_make_btn16 delete smallbtns ui-corner-all"
                            onclick="staffadmin.occupation_grp.delete_entry({$item->id});"
                            title="{$i.basic_delete}"></span>
                    {/if}
                </td>
                <td>{$item->from_date->us_date()}</td>
                <td>{$item->to_date->us_date()}</td>
                <td>{$item->group_name}</td>
                <td>{$item->group_description}</td>
                <td>{$item->description}</td>
            </tr>
        {/foreach}
        </tbody>
    </table>
</div>

<form id="staffadmin_form_occupation_grp" style="display:none"
    action=""  method="POST" enctype="multipart/form-data"
    onsubmit="staffadmin.occupation_grp.save(); return false;">
    <input type="submit" style="display:none;visibility:hidden;" />
    <fieldset class="bordertop noprint">
        {include file='r/hidden.tpl' name="staffadmin_occupation_grp_edit"}{* What entry do we edit - If empty = add *}

         {include file='r/date.tpl' name="staffadmin_occupation_grp_from" title="basic_from" collapse='formcol' class="required dateUS"}
         {include file='r/date.tpl' name="staffadmin_occupation_grp_to" title="basic_to" collapse='formcol' class="dateUS"}

         {include file='r/select.tpl' name="staffadmin_occupation_grp_group" title="staffadmin_occupation_grp" list=$occupation_group_list id="id" text="name" collapse='formcoll' class="required" noempty=TRUE}
         
         {include file='r/textarea.tpl' name="staffadmin_occupation_grp_description" title="staffadmin_description" class="t-mid"}

        <a class="dialog_make_text_btn ui-corner-all" onclick="staffadmin.occupation_grp.save();">
                <span class="dialog_make_btn16 ok ui-corner-all"></span>
                {$i.basic_save}
            </a>
    </fieldset>
</form>