-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPROFILE.php
101 lines (99 loc) · 3.67 KB
/
PROFILE.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
<!-- some CSS styling changes and overrides -->
<style>
.kv-avatar .krajee-default.file-preview-frame,.kv-avatar .krajee-default.file-preview-frame:hover {
margin: 0;
padding: 0;
border: none;
box-shadow: none;
text-align: center;
}
.kv-avatar {
display: inline-block;
}
.kv-avatar .file-input {
display: table-cell;
width: 213px;
}
.kv-reqd {
color: red;
font-family: monospace;
font-weight: normal;
}
</style>
<!-- markup -->
<!-- note: your server code `/site/avatar_upload/1` will receive `$_FILES['avatar-1']` on form submission -->
<!-- the avatar markup -->
<form class="form form-vertical" action="/site/avatar-upload/1" method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-sm-4 text-center">
<div class="kv-avatar">
<div class="file-loading">
<input id="avatar-1" name="avatar-1" type="file" required>
</div>
</div>
<div class="kv-avatar-hint">
<small>Select file < 1500 KB</small>
</div>
</div>
<div class="col-sm-8">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="email">Email Address<span class="kv-reqd">*</span></label>
<input type="email" class="form-control" name="email" required>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="pwd">Password<span class="kv-reqd">*</span></label>
<input type="password" class="form-control" name="pwd" required>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="fname">First Name</label>
<input type="text" class="form-control" name="fname" required>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="lname">Last Name</label>
<input type="text" class="form-control" name="lname" required>
</div>
</div>
</div>
<div class="form-group">
<hr>
<div class="text-right">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</div>
</div>
</form>
<div id="kv-avatar-errors-1" class="text-center" style="display:none"></div>
<!-- the fileinput plugin initialization -->
<script>
var btnCust = '<button type="button" class="btn btn-secondary" title="Add picture tags" ' +
'onclick="alert(\'Call your custom code here.\')">' +
'<i class="bi-tag"></i>' +
'</button>';
$("#avatar-1").fileinput({
overwriteInitial: true,
maxFileSize: 1500,
showClose: false,
showCaption: false,
browseLabel: '',
removeLabel: '',
browseIcon: '<i class="bi-folder2-open"></i>',
removeIcon: '<i class="bi-x-lg"></i>',
removeTitle: 'Cancel or reset changes',
elErrorContainer: '#kv-avatar-errors-1',
msgErrorClass: 'alert alert-block alert-danger',
defaultPreviewContent: '<img src="/samples/default-avatar-male.png" alt="Your Avatar">',
layoutTemplates: {main2: '{preview} ' + btnCust + ' {remove} {browse}'},
allowedFileExtensions: ["jpg", "png", "gif"]
});
</script>