Use location list helper for dropdown

This commit is contained in:
snipe
2016-01-15 15:21:34 -08:00
parent 9ad9e1d5a5
commit 28b89f3ddb
2 changed files with 4 additions and 9 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<?php
return array (
'app_version' => 'v2.1.0-pre',
'hash_version' => 'v2.1.0-pre-45-g51e4806',
'hash_version' => 'v2.1.0-pre-47-g39f40a3',
);
@@ -20,12 +20,7 @@ class ProfileController extends AuthorizedController
{
// Get the user information
$user = Sentry::getUser();
// Show the page
$location_list = array('' => 'Select One') + Location::lists('name', 'id');
// Show the page
$location_list = locationsList();
return View::make('frontend/account/profile', compact('user'))->with('location_list',$location_list);
}
@@ -63,7 +58,7 @@ class ProfileController extends AuthorizedController
$user->website = Input::get('website');
$user->location_id = Input::get('location_id');
$user->gravatar = Input::get('gravatar');
if (Input::file('avatar')) {
$image = Input::file('avatar');
$file_name = $user->first_name."-".$user->last_name.".".$image->getClientOriginalExtension();
@@ -75,7 +70,7 @@ class ProfileController extends AuthorizedController
if (Input::get('avatar_delete') == 1 && Input::file('avatar') == "") {
$user->avatar = NULL;
}
$user->save();
// Redirect to the settings page