From 174e3e720aa1aa991085f7e55b5ce687d450ef22 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 4 Dec 2017 20:30:57 -0800 Subject: [PATCH] Fixed #4521 - profile location not selected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is kind of a janky way to handle this - I created a new dropdown select, instead of adding even more convoluted code to the partial. The reasoon for this is because there may be situations where $user is passed in *addition* to $item, and we don’t want to erroneously use that location if we’re not supposed to be. --- resources/views/account/profile.blade.php | 2 +- .../edit/location-profile-select.blade.php | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 resources/views/partials/forms/edit/location-profile-select.blade.php diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php index 3b8cddba0f..cf57a72746 100755 --- a/resources/views/account/profile.blade.php +++ b/resources/views/account/profile.blade.php @@ -38,7 +38,7 @@ - @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id']) + @include ('partials.forms.edit.location-profile-select', ['translated_name' => trans('general.location')])
diff --git a/resources/views/partials/forms/edit/location-profile-select.blade.php b/resources/views/partials/forms/edit/location-profile-select.blade.php new file mode 100644 index 0000000000..f51c751e46 --- /dev/null +++ b/resources/views/partials/forms/edit/location-profile-select.blade.php @@ -0,0 +1,22 @@ + +
+ + {{ Form::label('location_id', $translated_name, array('class' => 'col-md-3 control-label')) }} +
+ +
+ + {!! $errors->first('location_id', '
:message
') !!} + +
+ + +