Skip to content

Commit 3420f3e

Browse files
committed
Merge branch 'refs/heads/develop'
2 parents 75fc552 + 11c657f commit 3420f3e

File tree

7 files changed

+113
-85
lines changed

7 files changed

+113
-85
lines changed

app/controllers/account/ProfileController.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Redirect;
66
use Sentry;
77
use Validator;
8+
use Location;
89
use View;
910

1011
class ProfileController extends AuthorizedController {
@@ -20,7 +21,11 @@ public function getIndex()
2021
$user = Sentry::getUser();
2122

2223
// Show the page
23-
return View::make('frontend/account/profile', compact('user'));
24+
25+
$location_list = array('' => 'Select One') + Location::lists('name', 'id');
26+
27+
// Show the page
28+
return View::make('frontend/account/profile', compact('user'))->with('location_list',$location_list);
2429
}
2530

2631
/**
@@ -34,6 +39,7 @@ public function postIndex()
3439
$rules = array(
3540
'first_name' => 'required|min:3',
3641
'last_name' => 'required|min:3',
42+
'location_id' => 'required',
3743
'website' => 'url',
3844
'gravatar' => 'email',
3945
);
@@ -55,7 +61,7 @@ public function postIndex()
5561
$user->first_name = Input::get('first_name');
5662
$user->last_name = Input::get('last_name');
5763
$user->website = Input::get('website');
58-
$user->country = Input::get('country');
64+
$user->location_id = Input::get('location_id');
5965
$user->gravatar = Input::get('gravatar');
6066
$user->save();
6167

app/views/backend/hardware/index.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,13 @@
109109
@endif
110110

111111
<td>
112+
@if ($asset->status_id < 1 )
112113
@if ($asset->assigned_to != 0)
113114
<a href="{{ route('checkin/hardware', $asset->id) }}" class="btn btn-primary">Checkin</a>
114115
@else
115116
<a href="{{ route('checkout/hardware', $asset->id) }}" class="btn btn-info">Checkout</a>
116117
@endif
118+
@endif
117119
</td>
118120
<td nowrap="nowrap">
119121
<a href="{{ route('update/hardware', $asset->id) }}" class="btn btn-warning"><i class="icon-pencil icon-white"></i></a>

app/views/backend/users/edit.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189

190190
<button type="reset" class="btn">Reset</button>
191191

192-
<button type="submit" class="btn-flat success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
192+
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
193193
</div>
194194
</div>
195195
</form>

app/views/frontend/account/change-email.blade.php

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77

88
{{-- Account page content --}}
99
@section('account-content')
10-
<div class="page-header">
11-
<h4>Change your Email</h4>
10+
<div class="row header">
11+
12+
<div class="col-md-12">
13+
<h3>Change Your Email</h3>
14+
</div>
1215
</div>
1316

17+
<div class="row form-wrapper">
18+
1419
<form method="post" action="" class="form-horizontal" autocomplete="off">
1520
<!-- CSRF Token -->
1621
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
@@ -19,32 +24,32 @@
1924
<input type="hidden" name="formType" value="change-email" />
2025

2126
<!-- New Email -->
22-
<div class="form-group{{ $errors->first('email', ' error') }}">
23-
<label class="control-label" for="email">New Email</label>
24-
<div class="controls">
25-
<input type="email" name="email" id="email" value="" />
26-
{{ $errors->first('email', '<span class="help-block">:message</span>') }}
27+
<div class="form-group {{ $errors->has('email') ? ' has-error' : '' }}">
28+
<label for="email" class="col-md-2 control-label">New Email</label>
29+
<div class="col-md-5">
30+
<input class="form-control" type="email" name="email" id="email" value="{{ Input::old('email', $user->email) }}" />
31+
{{ $errors->first('email', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
2732
</div>
2833
</div>
29-
3034
<!-- Confirm New Email -->
31-
<div class="form-group{{ $errors->first('email_confirm', ' error') }}">
32-
<label class="control-label" for="email_confirm">Confirm New Email</label>
33-
<div class="controls">
34-
<input type="email" name="email_confirm" id="email_confirm" value="" />
35-
{{ $errors->first('email_confirm', '<span class="help-block">:message</span>') }}
35+
<div class="form-group {{ $errors->has('email_confirm') ? ' has-error' : '' }}">
36+
<label for="email_confirm" class="col-md-2 control-label">New Email</label>
37+
<div class="col-md-5">
38+
<input class="form-control" type="email" name="email_confirm" id="email_confirm" />
39+
{{ $errors->first('email_confirm', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
3640
</div>
3741
</div>
3842

3943
<!-- Current Password -->
40-
<div class="form-group{{ $errors->first('current_password', ' error') }}">
41-
<label class="control-label" for="current_password">Current Password</label>
42-
<div class="controls">
43-
<input type="password" name="current_password" id="current_password" value="" />
44-
{{ $errors->first('current_password', '<span class="help-block">:message</span>') }}
44+
<div class="form-group {{ $errors->has('current_password') ? ' has-error' : '' }}">
45+
<label for="current_password" class="col-md-2 control-label">Current Password</label>
46+
<div class="col-md-5">
47+
<input class="form-control" type="password" name="current_password" id="current_password" />
48+
{{ $errors->first('current_password', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
4549
</div>
4650
</div>
4751

52+
4853
<hr>
4954

5055
<!-- Form actions -->

app/views/frontend/account/change-password.blade.php

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,41 @@
77

88
{{-- Account page content --}}
99
@section('account-content')
10-
<div class="page-header">
11-
<h4>Change your Password</h4>
10+
<div class="row header">
11+
12+
<div class="col-md-12">
13+
<h3>Change Your Password</h3>
14+
</div>
1215
</div>
1316

17+
<div class="row form-wrapper">
1418
<form method="post" action="" class="form-horizontal" autocomplete="off">
1519
<!-- CSRF Token -->
1620
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
1721

1822
<!-- Old Password -->
19-
<div class="form-group{{ $errors->first('old_password', ' error') }}">
20-
<label class="control-label" for="old_password">Old Password</label>
21-
<input type="password" name="old_password" id="old_password" class="form-control" value="" />
22-
{{ $errors->first('old_password', '<span class="help-block">:message</span>') }}
23+
<div class="form-group {{ $errors->has('old_password') ? ' has-error' : '' }}">
24+
<label for="old_password" class="col-md-2 control-label">Old Password</label>
25+
<div class="col-md-5">
26+
<input class="form-control" type="text" name="old_password" id="old_password" />
27+
{{ $errors->first('old_password', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
28+
</div>
2329
</div>
2430

25-
<!-- New Password -->
26-
<div class="form-group{{ $errors->first('password', ' error') }}">
27-
<label class="control-label" for="password">New Password</label>
28-
<div class="controls">
29-
<input type="password" name="password" id="password" class="form-control" value="" />
30-
{{ $errors->first('password', '<span class="help-block">:message</span>') }}
31+
<div class="form-group {{ $errors->has('password') ? ' has-error' : '' }}">
32+
<label for="password" class="col-md-2 control-label">New Password</label>
33+
<div class="col-md-5">
34+
<input class="form-control" type="password" name="password" id="password" />
35+
{{ $errors->first('password', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
3136
</div>
3237
</div>
3338

34-
<!-- Confirm New Password -->
35-
<div class="form-group{{ $errors->first('password_confirm', ' error') }}">
36-
<label class="control-label" for="password_confirm">Confirm New Password</label>
37-
<div class="controls">
38-
<input type="password" name="password_confirm" id="password_confirm" class="form-control" value="" />
39-
{{ $errors->first('password_confirm', '<span class="help-block">:message</span>') }}
39+
40+
<div class="form-group {{ $errors->has('password_confirm') ? ' has-error' : '' }}">
41+
<label for="password_confirm" class="col-md-2 control-label">New Password</label>
42+
<div class="col-md-5">
43+
<input class="form-control" type="password" name="password_confirm" id="password_confirm" />
44+
{{ $errors->first('password_confirm', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
4045
</div>
4146
</div>
4247

@@ -102,14 +107,15 @@
102107
</div>
103108
</div>
104109

105-
<!-- Form actions -->
110+
<!-- Form Actions -->
106111
<div class="form-group">
107-
<div class="controls">
108-
<a class="btn" href="{{ route('home') }}">Cancel</a>
109-
110-
<button type="submit" class="btn btn-info">Update</button>
112+
<label class="col-md-2 control-label"></label>
113+
<div class="col-md-7">
114+
<a class="btn btn-link" href="{{ route('home') }}">@lang('general.cancel')</a>
115+
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
111116
</div>
112117
</div>
118+
113119
</form>
114120
</div>
115121
</div>

app/views/frontend/account/profile.blade.php

Lines changed: 49 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,71 +7,80 @@
77

88
{{-- Account page content --}}
99
@section('account-content')
10-
<div class="page-header">
11-
<h4>Update your Profile</h4>
10+
<div class="row header">
11+
12+
<div class="col-md-12">
13+
<h3>Update Profile</h3>
14+
</div>
1215
</div>
1316

14-
<form method="post" action="" class="form-vertical" autocomplete="off">
17+
<div class="row form-wrapper">
18+
19+
<form method="post" class="form-horizontal" action="" class="form-vertical" autocomplete="off">
1520
<!-- CSRF Token -->
1621
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
1722

1823
<!-- First Name -->
19-
<div class="form-group{{ $errors->first('first_name', ' error') }}">
20-
<label class="control-label" for="first_name">First Name</label>
21-
<div class="controls">
22-
<input class="col-md-4" type="text" name="first_name" id="first_name" value="{{ Input::old('first_name', $user->first_name) }}" />
23-
{{ $errors->first('first_name', '<span class="help-block">:message</span>') }}
24+
<div class="form-group {{ $errors->has('first_name') ? ' has-error' : '' }}">
25+
<label for="first_name" class="col-md-2 control-label">First Name</label>
26+
<div class="col-md-5">
27+
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ Input::old('first_name', $user->first_name) }}" />
28+
{{ $errors->first('first_name', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
2429
</div>
2530
</div>
2631

2732
<!-- Last Name -->
28-
<div class="form-group{{ $errors->first('last_name', ' error') }}">
29-
<label class="control-label" for="last_name">Last Name</label>
30-
<div class="controls">
31-
<input class="col-md-4" type="text" name="last_name" id="last_name" value="{{ Input::old('last_name', $user->last_name) }}" />
32-
{{ $errors->first('last_name', '<span class="help-block">:message</span>') }}
33+
<div class="form-group {{ $errors->has('last_name') ? ' has-error' : '' }}">
34+
<label for="last_name" class="col-md-2 control-label">Last Name</label>
35+
<div class="col-md-5">
36+
<input class="form-control" type="text" name="last_name" id="last_name" value="{{ Input::old('last_name', $user->last_name) }}" />
37+
{{ $errors->first('last_name', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
3338
</div>
3439
</div>
3540

3641
<!-- Website URL -->
37-
<div class="form-group{{ $errors->first('website', ' error') }}">
38-
<label class="control-label" for="website">Website URL</label>
39-
<div class="controls">
40-
<input class="col-md-4" type="text" name="website" id="website" value="{{ Input::old('website', $user->website) }}" />
41-
{{ $errors->first('website', '<span class="help-block">:message</span>') }}
42+
<div class="form-group {{ $errors->has('website') ? ' has-error' : '' }}">
43+
<label for="website" class="col-md-2 control-label">Website</label>
44+
<div class="col-md-5">
45+
<input class="form-control" type="text" name="website" id="website" value="{{ Input::old('website', $user->website) }}" />
46+
{{ $errors->first('website', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
4247
</div>
4348
</div>
4449

45-
<!-- Country -->
46-
<div class="form-group{{ $errors->first('country', ' error') }}">
47-
<label class="control-label" for="country">Country</label>
48-
<div class="controls">
49-
<input class="col-md-4" type="text" name="country" id="country" value="{{ Input::old('country', $user->country) }}" />
50-
{{ $errors->first('country', '<span class="help-block">:message</span>') }}
50+
<!-- Location -->
51+
<div class="form-group {{ $errors->has('phone') ? 'error' : '' }}">
52+
<label class="col-md-2 control-label" for="location_id">Location</label>
53+
<div class="col-md-5">
54+
<div class="field-box">
55+
{{ Form::select('location_id', $location_list , Input::old('location_id', $user->location_id), array('class'=>'select2', 'style'=>'width:300px')) }}
56+
{{ $errors->first('location_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
57+
</div>
58+
</div>
5159
</div>
52-
</div>
5360

5461
<!-- Gravatar Email -->
55-
<div class="form-group{{ $errors->first('gravatar', ' error') }}">
56-
<label class="control-label" for="gravatar">Gravatar Email <small>(Private)</small></label>
57-
<div class="controls">
58-
<input class="col-md-4" type="text" name="gravatar" id="gravatar" value="{{ Input::old('gravatar', $user->gravatar) }}" />
59-
{{ $errors->first('gravatar', '<span class="help-block">:message</span>') }}
60-
</div>
61-
62-
<p>
63-
<img src="//secure.gravatar.com/avatar/{{ md5(strtolower(trim($user->gravatar))) }}" width="30" height="30" />
64-
<a href="http://gravatar.com">Change your avatar at Gravatar.com</a>.
62+
<div class="form-group {{ $errors->has('gravatar') ? ' has-error' : '' }}">
63+
<label for="gravatar" class="col-md-2 control-label">Gravatar Email <small>(Private)</small></label>
64+
<div class="col-md-5">
65+
<input class="form-control" type="text" name="gravatar" id="gravatar" value="{{ Input::old('gravatar', $user->gravatar) }}" />
66+
{{ $errors->first('gravatar', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
67+
<p><img src="//secure.gravatar.com/avatar/{{ md5(strtolower(trim($user->gravatar))) }}" width="30" height="30" />
68+
<a href="http://gravatar.com"><small>Change your avatar at Gravatar.com</small></a>.
6569
</p>
70+
</div>
6671
</div>
6772

68-
<hr>
69-
70-
<!-- Form actions -->
73+
<!-- Form Actions -->
7174
<div class="form-group">
72-
<div class="controls">
73-
<button type="submit" class="btn">Update your Profile</button>
75+
<label class="col-md-2 control-label"></label>
76+
<div class="col-md-7">
77+
<a class="btn btn-link" href="{{ route('home') }}">@lang('general.cancel')</a>
78+
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
7479
</div>
7580
</div>
81+
82+
83+
7684
</form>
85+
</div>
7786
@stop

app/views/frontend/layouts/account.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<div class="row">
66
<div class="col-md-3">
77
<ul class="nav nav-list">
8-
<li class="nav-header">Main Menu</li>
98
<li{{ Request::is('account/profile') ? ' class="active"' : '' }}><a href="{{ URL::route('profile') }}">Profile</a></li>
109
<li{{ Request::is('account/change-password') ? ' class="active"' : '' }}><a href="{{ URL::route('change-password') }}">Change Password</a></li>
1110
<li{{ Request::is('account/change-email') ? ' class="active"' : '' }}><a href="{{ URL::route('change-email') }}">Change Email</a></li>
11+
1212
</ul>
1313
</div>
1414
<div class="col-md-9">

0 commit comments

Comments
 (0)