-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathedit.blade.php
executable file
·142 lines (137 loc) · 8.24 KB
/
edit.blade.php
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
@extends("layouts.default", ['page_title' => 'User | Edit'])
@section("head")
<link href="{{ mix('/assets/css/intlTelInput.css') }}" rel="stylesheet" type="text/css">
<link href="{{ mix('/assets/css/selectize.css') }}" rel="stylesheet" type="text/css">
<style>
</style>
@stop
@section("content")
<div class="container">
<div class="row">
<div class="col s12">
<h3>User</h3>
</div>
</div>
<div class="row">
<div class="col s12 m3 xl2">
@include("partials/sidenav-user")
</div>
<div class="col s12 m9 xl10">
<form id="edit-profile" method="post" enctype="multipart/form-data">
<div class="card-panel">
<div class="row">
<div class="input-field col s12">
<input id="username" name="username" type="text" data-parsley-required="true" data-parsley-trigger="change" data-parsley-minlength="4" data-parsley-pattern="/^[a-zA-Z0-9\-_]{0,40}$/" value="{{ $user->username ?? '' }}" placeholder="Username">
<label for="username" class="label-validation">Username</label>
<span class="helper-text"></span>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="email" name="email" type="email" data-parsley-required="true" data-parsley-trigger="change" value="{{ $user->email ?? '' }}" placeholder="Email">
<label for="email" class="label-validation">Email</label>
<span class="helper-text"></span>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="password" name="password" type="password" data-parsley-required="true" data-parsley-trigger="change">
<label for="password" class="label-validation">Existing Password</label>
<span class="helper-text"></span>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="newpassword" name="newpassword" type="password" data-parsley-trigger="change">
<label for="newpassword" class="label-validation">New Password</label>
<span class="helper-text"></span>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="newpassword_confirmation" name="newpassword_confirmation" type="password" data-parsley-trigger="change" data-parsley-equalto="#newpassword">
<label for="newpassword_confirmation" class="label-validation">New Password Confirmation</label>
<span class="helper-text"></span>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="full_name" name="full_name" type="text" data-parsley-required="true" data-parsley-trigger="change" data-parsley-minlength="4" value="{{ $user->full_name ?? '' }}" placeholder="Name">
<label for="full_name" class="label-validation">Full Name</label>
<span class="helper-text"></span>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<select id="country_code" name="country_code" data-parsley-trigger="change" placeholder="Country">
<option disabled="" selected="selected" value="">Country</option>
@foreach($countries as $country)
<option value="{{ $country['iso_3166_1_alpha2'] }}" @if($user->country_code == $country['iso_3166_1_alpha2']) selected @endif>{{ $country['name'] }}</option>
@endforeach
</select>
<label for="country_code" class="label-validation">Country</label>
<span class="helper-text"></span>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<select id="timezone" name="timezone" data-parsley-trigger="change">
<option disabled="" selected="selected" value="">Timezone</option>
@foreach($timezones as $timezone)
<option value="{{ $timezone }}" @if($user->timezone == $timezone) selected @endif> {{ $timezone }}</option>
@endforeach
</select>
<label for="timezone" class="label-validation">Timezone</label>
<span class="helper-text"></span>
</div>
</div>
<div class="row pbtm20">
<div class="input-field col s12">
<input id="phone" name="phone" type="tel" class="phone-input" data-parsley-required="false" data-parsley-trigger="change" data-parsley-pattern="^[\d\+\-\.\(\)\/\s]*$" data-parsley-phone-format="#phone" value="{{ $user->phone }}">
<label for="phone" class="label-validation">Phone</label>
<span class="helper-text"></span>
</div>
</div>
<div class="row">
<div class="radio-field col s12 left">
<label id="rbtn-label" class="rbtn-label" for="gender">Gender</label>
<p class="rbtn">
<label>
<input id="gender-male" name="gender" type="radio" value="male" data-parsley-required="true" data-parsley-trigger="change" @if($user->gender == "male") checked @endif>
<span>Male</span>
</label>
</p>
<p class="rbtn">
<label>
<input id="gender-female" name="gender" type="radio" value="female" @if($user->gender == "female") checked @endif>
<span>Female</span>
</label>
</p>
<span class="helper-text manual-validation"></span>
</div>
</div>
</div>
<div class="row">
<div class="input-field col s12">
{{ method_field('PATCH') }}
{{ csrf_field() }}
<button class="btn waves-effect waves-light col s12 m3 offset-m9" type="submit" name="action">Update</button>
</div>
</div>
</form>
</div>
</div>
</div>
@stop
@section("scripts")
<script type="text/javascript" src="{{ mix('/assets/js/intlTelInput.js') }}"></script>
<script type="text/javascript">
"use strict";
$(function() {
Unicorn.initSelectize('#country_code');
Unicorn.initSelectize('#timezone');
Unicorn.initPhoneInput('#phone');
Unicorn.initParsleyValidation('#edit-profile');
});
</script>
@stop