<div><a href="field.php?op=new"><{$smarty.const._ADD}> <{$smarty.const._PROFILE_AM_FIELD}></a></div>
<form action="field.php" method="post" id="fieldform">
    <table>
        <th><{$smarty.const._PROFILE_AM_NAME}></th>
        <th><{$smarty.const._PROFILE_AM_TITLE}></th>
        <th><{$smarty.const._PROFILE_AM_DESCRIPTION}></th>
        <th><{$smarty.const._PROFILE_AM_TYPE}></th>
        <th><{$smarty.const._PROFILE_AM_CATEGORY}></th>
        <th><{$smarty.const._PROFILE_AM_WEIGHT}></th>
        <th></th>
        <{foreach item=category from=$fieldcategories}>
            <{foreach item=field from=$category}>
                <tr class="<{cycle values='odd, even'}>">
                    <td><{$field.field_name}></td>
                    <td><{$field.field_title}></td>
                    <td><{$field.field_description}></td>
                    <td><{$field.fieldtype}></td>
                    <td>
                        <{if $field.canEdit}>
                            <select name="category[<{$field.fieldid}>]"><{html_options options=$categories selected=$field.catid}></select>
                        <{/if}>
                    </td>
                    <td>
                        <{if $field.canEdit}>
                            <input type="text" name="weight[<{$field.fieldid}>]" size="5" maxlength="5" value="<{$field.field_weight}>" />
                        <{/if}>
                    </td>
                    <td>
                        <{if $field.canEdit}>
                            <input type="hidden" name="oldweight[<{$field.fieldid}>]" value="<{$field.field_weight}>" />
                            <input type="hidden" name="oldcat[<{$field.fieldid}>]" value="<{$field.catid}>" />
                            <input type="hidden" name="fieldids[]" value="<{$field.fieldid}>" />
                            <a href="field.php?id=<{$field.fieldid}>" title="<{$smarty.const._EDIT}>"><{$smarty.const._EDIT}></a>
                        <{/if}>
                        <{if $field.canDelete}>
                            &nbsp;<a href="field.php?op=delete&amp;id=<{$field.fieldid}>" title="<{$smarty.const._DELETE}>"><{$smarty.const._DELETE}></a>
                        <{/if}>
                    </td>
                </tr>
            <{/foreach}>
        <{/foreach}>
        <tr class="<{cycle values='odd, even'}>">
            <td colspan="5">
            </td>
            <td>
                <{$token}>
                <input type="hidden" name="op" value="reorder" />
                <input type="submit" name="submit" value="<{$smarty.const._SUBMIT}>" />
            </td>
            <td colspan="2">
            </td>
        </tr>
    </table>
</form>