RSS Git Download  Clone
Raw Blame History
  [% META title = 'User » Change user location' -%]

    [% # PROCESS dumper.tt dump = user_locations %]
	[% # PROCESS dumper.tt dump = locations_map %]

    [% change_user_location_dfv_js %]

	<h2 align="center">Change user location</h2>

    [% user_profile = c.session.param('UserProfile');
		# PROCESS dumper.tt dump = user_profile %]
	
    <form method="post" action="[% app_url %]/user/do_change_location/[% user_profile.id %]"
      name="change_location" id="change_location" [% change_user_location_onsubmit %]>
		<table class="indent">
			<tr>
				<td class="label">Current location:</td>
				<td class="content">
					<input type="text" size="20" name="" [% site.html.disabled %]
                        value="[% locations_map.item(user_profile.user_location_id) %]" />
				</td>
			</tr>
			<tr>
				<td class="label">New location:</td>
				<td class="content">
					<select name="location_id">
						<option value="">-- select one --</option>
						[% FOREACH entry IN user_locations;
							NEXT UNLESS entry.active.match('yes');
							NEXT IF entry.id == user_profile.user_location_id %]
						<option value="[% entry.id %]"
							[% 'selected' IF entry.id == c.query.param('location_id') %]>
							[% entry.location_name %]
						</option>
						[% END %]
					</select>
					[% error_location_id %]
				</td>
			</tr>
            <tr>
                <td class="label">Password:</td>
                <td class="content">
                    <input type="password" name="password" size="20" />
					[% error_password %]
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center" class="borderless">
					[% site.html.submit %]
				</td>
            </tr>
        </table>
    </form>