{if $prj_id == ''}
    <span class="default">
    {t}This page can only be accessed in relation to a project. Please go to the project page and choose
"Edit Fields to Display" to access this page.{/t}<br />
    <a href="{$rel_url}manage/projects.php">{t}Manage Projects{/t}</a>
    </span>
{else}
<form name="display_form" method="post" action="{$smarty.server.PHP_SELF}?prj_id={$prj_id}">
<table width="100%" bgcolor="{$cell_color}" border="0" cellspacing="0" cellpadding="1" align="center">
    <tr>
        <td>
            <table bgcolor="#FFFFFF" width="100%" cellspacing="1" cellpadding="2" border="0">
                <tr>
                    <td class="default" colspan="2">
                        <b>{t}Edit Fields to Display{/t}</b> {include file="help_link.tpl.html" topic="field_display"}
                    </td>
                </tr>
                {if $result != ""}
                <tr>
                    <td colspan="2" bgcolor="{$cell_color}" align="center" class="error">
                      {if $result == -1}
                        {t}An error occurred while trying to update field display settings.{/t}
                      {elseif $result == 1}
                        {t}Thank you, field display settings were updated successfully.{/t}
                      {/if}
                    </td>
                </tr>
                {/if}
                {foreach from=$fields item=field_title key=field_name}
                {cycle values=$cycle assign="row_color"}
                <tr>
                    <td bgcolor="{$cell_color}" align="center" class="default_white" width="150">
                        {$field_title} {t}Field{/t}:
                    </td>
                    <td bgcolor="{$row_color}">
                        <select name="min_role[{$field_name}]" class="default">
                            {html_options options=$user_roles selected=$display_settings[$field_name]}
                        </select>
                    </td>
                </tr>
                {/foreach}
                <tr>
                <tr>
                    <td bgcolor="{$cell_color}" colspan="2">
                        <input class="button" type="submit" value="{t}Set Display Preferences{/t}">
                        <input class="button" type="reset" value="{t}Reset{/t}">
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
</form>
{/if}

