settings.blade.php
6.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
@inject('webpackAssets', 'FootyRoom\Support\WebpackAssets')
@extends('layouts.profile')
@section('title', 'Profile Settings')
@section('profileLeftColumn')
<div id="plc">
<div class="plc-wrap text-center">
<div class="photo-box">
<img id="profileImage" src="{{ $avatar . '?' . time() }}">
@if ($isVisitorProfile)
<center>
<div id="changePhoto">
<form id="changePhotoForm" method="post" action="/profile/settings/upload-avatar" enctype="multipart/form-data">
<input type="hidden" name="_csrf_token" value="{{ FootyRoom\Support\Utils\Helpers::csrfToken() }}">
<div id="changePhotoContainer">
<a id="changePhoto_label" class="btn btn-primary">change photo</a>
<input type="file" name="avatar" id="inputChangePhoto">
</div>
</form>
</div>
</center>
@endif
</div>
</div>
</div>
@endsection
@section('profile')
<div ng-controller="ProfileSettingsController"
ng-init="user = { nationalTeam: '{{ $nationalTeam }}', clubTeam: '{{ $clubTeam }}' }">
<div id="errorBox" class="error mb10 displayno">
<ul>
@if (isset($errors))
@foreach ($errors as $error)
{{ $error }}
@endforeach
@endif
</ul>
</div>
@if ($isPasswordUpdated)
<div class="success mb10">Your password has been updated successfully.</div>
@endif
<form action="/profile/settings" method="post" class="form-horizontal settings" name="userForm" ng-submit="submitForm($event)" novalidate>
<input type="hidden" name="_csrf_token" value="{{ FootyRoom\Support\Utils\Helpers::csrfToken() }}">
<div class="form-group">
<label class="col-xs-3 control-label">Full Name</label>
<div class="col-xs-9 col-md-6">
<input type="text" name="fullname" value="{{ $fullname }}" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label">Birthday</label>
<div class="col-xs-9 col-md-8">
{!! FootyRoom\Support\Utils\Helpers::dateSelect() !!}
</div>
<script>
$("#dobDay option:econtains('{{ @$dobDay }}')").attr('selected','selected');
$("#dobMonth option:contains('{{ @$dobMonth }}')").attr('selected','selected');
$("#dobYear option:contains('{{ @$dobYear }}')").attr('selected','selected');
</script>
</div>
<div class="form-group">
<label class="col-xs-3 control-label">Gender </label>
<div class="col-xs-9 col-md-6">
<select id="gender" name="gender" class="form-control">
<option>Unspecified</option>
<option>Male</option>
<option>Female</option>
<option>Guy</option>
<option>Girl</option>
<option>Dude</option>
<option>Chick</option>
</select>
</div>
<script>$("#gender option:contains('{{ $gender }}')").attr('selected','selected');</script>
</div>
<hr>
<div class="form-group" fr-has-error="userForm.clubTeam">
<label class="col-xs-3 control-label">Club</label>
<div class="col-xs-9 col-md-6">
<div class="clearfix">
<input id="clubTeam" ng-model="user.clubTeam" name="clubTeam" class="form-control" type="text" autocomplete="off" team-typeahead="club">
</div>
<p class="help-block if-has-error">You have to choose a team from the list or leave this field empty.</p>
</div>
</div>
<div class="form-group" fr-has-error="userForm.nationalTeam">
<label class="col-xs-3 control-label">Country</label>
<div class="col-xs-9 col-md-6">
<div class="clearfix">
<input id="nationalTeam" ng-model="user.nationalTeam" name="nationalTeam" class="form-control" type="text" autocomplete="off" team-typeahead="national">
</div>
<p class="help-block if-has-error">You have to choose a team from the list or leave this field empty.</p>
</div>
</div>
<hr>
<div class="form-group" ng-cloak>
<label class="col-xs-3 control-label">Facebook</label>
<div class="col-xs-9 col-md-6">
<div class="clearfix" ng-if="{{ ! @$isFacebookConnected }}">
<label class="control-label">
<b>Not connected:</b>
</label>
<a class="pointer" ng-click="fbConnect()">
<b> Connect</b>
</a>
</div>
<div class="clearfix" ng-if="{{ @$isFacebookConnected }}">
<label class="control-label">
<b>Connected:</b>
</label>
<a class="pointer" ng-click="fbDisconnect()">
<b> Disconnect</b>
</a>
</div>
<p class="help-block" ng-if="fbLoginError" ng-bind="fbLoginError" ng-cloak></p>
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label">Location</label>
<div class="col-xs-9 col-md-6">
<input name="location" type="text" value="{{ $location }}" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label">Website URL</label>
<div class="col-xs-9 col-md-6">
<input name="website" type="text" value="{{ $website }}" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label">Bio/About</label>
<div class="col-xs-9 col-md-6">
<textarea cols="35" rows="3" name="bioAbout" class="form-control">{{ $bioAbout }}</textarea>
</div>
</div>
<hr>
<div class="form-group">
<label class="col-xs-3 control-label">Current Password</label>
<div class="col-xs-9 col-md-6">
<input name="currentPassword" type="password" class="form-control">
</div>
</div>
<div class="form-group" fr-has-error="userForm.newPassword">
<label class="col-xs-3 control-label">New Password</label>
<div class="col-xs-9 col-md-6">
<input name="newPassword" type="password" ng-model="user.newPassword" class="form-control" ng-minlength="6">
<p class="help-block">Minimum six characters.</p>
</div>
</div>
<div class="form-group" fr-has-error="userForm.verifyPassword">
<label class="col-xs-3 control-label">Verify Password</label>
<div class="col-xs-9 col-md-6">
<input name="verifyPassword" type="password" ng-model="user.verifyPassword" class="form-control">
<p class="help-block if-has-error">Passwords don't match.</p>
</div>
</div>
<hr>
<div class="form-group">
<div class="col-xs-offset-3 col-xs-9 col-md-6">
<div class="checkbox">
<label>
<input type="checkbox" name="digest" {{ @$isSubscribedToDigest? 'checked' : '' }}> Subscribe to weekly digest. We'll email you the best content from FootyRoom once a week.
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-xs-9">
<input type="submit" value="Save" class="btn btn-primary pull-right">
</div>
</div>
</form>
</div>
@endsection