update-profile.component.html
6.72 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
<div class="container-fluid">
<!-- navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<site-menu></site-menu>
</div>
</nav>
<!-- navigation -->
<div class="clearfix"></div>
<div class="row">
<!-- main-heading -->
<div class="col-sm-12 pageHeading">
<h4>Update Profile</h4>
</div>
<!-- main-heading -->
<!-- container -->
<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
<div class="container-fluid main-full">
<div class="row">
<div class="well">
<div class="row">
<div class="col-sm-12">
<h5 class="text-center text-success"><strong>**To update your profile fill all the text fields carefully.</strong></h5>
<div class="panel-body">
<!-- form -->
<form class="form-horizontal" #f="ngForm" [formGroup]="updateProfileForm" novalidate> <!--(ngSubmit)="submitForm(updateProfileForm.value)" #upForm="ngForm" -->
<div class="form-group">
<label for="firstName" class="col-sm-4 control-label">First Name <span class="red">*</span> :</label>
<div class="col-sm-7">
<input type="text" class="form-control" formControlName="firstName" id="firstName" [(ngModel)]="firstName" placeholder="First Name" required> <!--[(ngModel)]="user.firstName"-->
</div><div>{{firstName}}</div>
<div *ngIf="formErrors.firstName" class="alert alert-danger">
{{ formErrors.firstName }}
</div>
</div>
<div class="form-group">
<label for="lastName" class="col-sm-4 control-label">Last Name <span class="red">*</span> :</label>
<div class="col-sm-7">
<input class="form-control" formControlName="lastName" id="lastName" [(ngModel)]="lastName" placeholder="Last Name" required> <!--[(ngModel)]="user.lastName"-->
</div><div>{{lastName}}</div>
<div *ngIf="formErrors.lastName" class="alert alert-danger">
{{ formErrors.lastName }}
</div>
</div>
<div class="form-group">
<label for="email" class="col-sm-4 control-label">Email Id <span class="red">*</span> :</label>
<div class="col-sm-7">
<input class="form-control" formControlName="email" id="email" [(ngModel)]="email" placeholder="e.g. user@abc.com" required> <!--[(ngModel)]="user.email"-->
</div><div>{{email}}</div>
<div *ngIf="formErrors.email" class="alert alert-danger">
{{ formErrors.email }}
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-7 mar-top17">
<button type="submit" class="btn btn-primary btn-sm" data-toggle="modal" (click)="UpdateProfile()" data-target="#mymodal"><i class="fa fa-check"></i> Update</button> <!--(click)="UpdateProfile(firstName.value,lastName.value, email.value)" (click)="save(upForm.value, upForm.valid)" -->
<!--cancel-button-->
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" id="mymodal">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header annotation-modal-header ui-draggable-handle">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="">Alert</h4>
</div>
<div class="modal-body">
<h5>User profile has been updated successfully.</h5>
</div>
<div class="modal-footer">
<div class="row">
<div class="col-sm-12"><button class="btn btn-primary btn-sm" (click)="changeShowStatus()">Ok</button></div>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!--cancel-button-->
<button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-close"></i> Cancel</button>
</div>
</div>
</form>
<!-- form -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- container -->
</div>
</div>