  [% META title = 'Admin &raquo; Edit User Function' -%]

  [% # PROCESS dumper.tt dump = c.config('msg') %]

  [% PROCESS admin/user_nav.tt page = 'user_function' %]

  [% user_functions_dfv_js %]

	<h2 align="center">Edit User Function</h2>

    [% IF dfv_errors %]
        <p class="error">[% c.cfg('msg').dfv_errors %]</p>
    [% END %]

    <p>[% site.html.back_button %]</p>

    <form method="post" action="[% app_url %]/admin/user_function/update/[% function.id %]"
        [% user_functions_onsubmit %] name="user_function" id="user_function">

    <table>
        <tr>
            <th>Function name</th>
            <th>Description</th>
            <th>Active</th>
		</tr>
		<tr>
            <td>
                <input type="text" size="20" name="function_name"
					readonly value="[% function.function_name | html %]" />
                [% error_function_name %]
            </td>
            <td>
                <input type="text" size="50" name="function_detail" value="[% function.function_detail | html %]" />
                [% error_function_detail %]
            </td>
			<td>
				<select name="active">
				[% FOREACH option IN ['yes', 'no'] %]
                     <option value="[% option %]" [% 'selected' IF option == function.active %]>
                        [% option %]
                    </option>
			    [% END %]
				</select>
			</td>
            <td>
                [% site.html.submit %]
            </td>
        </tr>
    </table>

    </form>
