summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.html
blob: 798b4db1d274232548d9710e6d361d3175acc23a (plain)
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
<style>

.checkbox .skin {
    left: 0px;
    top: 0px;
}

.add-label-right{
    float: right;
    margin-top: -17px;
}

.endpoint-item-left{
width:75%;
padding-bottom:10px;
}
.icon-circle-action-remove {
 float: right;
    margin-top: -27px;
}
.item{
padding-bottom:15px;
}
.account-property{
padding-top:10px;
}
</style>

<div>

		<div class="b2b-modal-header">
			<h2 class="account-details-title" id="account-add-details-title">Account Details</h2>

			<div class="corner-button in">
				<button type="button" class="close" aria-label="Close" id="accountdetails-button-cancel"
					ng-click="$dismiss('cancel')"></button>
			</div>
		</div>

		<div class="b2b-modal-body">
				<div class="account-properties-main"
			scroll-top="accountAddDetails.scrollApi">
			<form id="accounts-details-form" name="serviceForm" novalidate
				autocomplete="off">
				<div class="item required">
					<div class="item-label">Account Name</div>
					<input id="account-details-input-name"
						type="text" name="name" ng-pattern="/^[\w -]*$/" maxlength="100"
						ng-model="accountAddDetails.account.applicationName"
						ng-change="accountAddDetails.updateAccountName()" required />

					<div class="error-container"
						ng-show="(accountAddDetails.emptyAccountName || serviceForm.name.$dirty)">
						<div ng-messages="serviceForm.name.$error" class="error-container">
							<small id="accounts-details-input-name-required"
								class="err-message" ng-message="required">account Name
								is required</small> <small id="accounts-details-input-name-pattern"
								class="err-message" ng-message="pattern">account Name
								must be letters, numbers, or underscore</small>
						</div>
					</div>

					<div class="error-container"
						ng-show="accountAddDetails.dupliateName == true">
						<small id="accounts-details-input-name-dupliated"
							class="err-message">Name not available - choose different
							name </small>
					</div>
				</div>

				<div class="item required">
					<div class="item-label">Username</div>
					<input id="account-details-input-username" 
						type="text" name="username" maxlength="100"
						ng-model="accountAddDetails.account.username"
						ng-change="accountAddDetails.updateUsername()" autocomplete="off" />

					<div class="error-container"
						ng-show="(accountAddDetails.emptyAccountUsername 
					|| (serviceForm.username.$dirty && accountAddDetails.account.username == ''))">
						<small id="account-details-input-username-required"
							class="err-message">Username is required</small>
					</div>

				</div>

				<div class="item">
					<div class="item-label">Password</div>
					<input id="account-details-input-password"
						type="password" name="password" maxlength="100"
						ng-model="accountAddDetails.account.password" autocomplete="off"/>
				</div>

				<div class="item">
					<div class="item-label">Retype Password</div>
					<input id="account-details-input-repassword"
						type="password" name="repassword" maxlength="100"
						ng-model="accountAddDetails.account.repassword"
						ng-change="accountAddDetails.confirmPassword()" />

					<div class="error-container"
						ng-show="accountAddDetails.passwordMatched == false">
						<small id="accounts-details-input-name-dupliated"
							class="err-message">Password does not match the confirm
							password</small>
					</div>
				</div>


				<div class="add-endpoint-item">
					<div class="item-label add-label-left">Add Endpoint</div>
					<div class="icon-add add-label-right" id="accountAddDetails-button-accordion"
						ng-click="accountAddDetails.addEndpoint()"></div>
				</div>
				<div class="item">
					<div class="item-label"
						ng-show="accountAddDetails.account.endpointList.length > 0">
						Account endpoint</div>

					<div id="account-details-user-paramters"
						ng-repeat="endpoint in accountAddDetails.account.endpointList">

						<div class="endpoint-item-left">
							<input id="account-details-input-endpoint-name"
								type="text" name="endpointName"
								maxlength="200" ng-model="endpoint.name" 
								ng-change="accountAddDetails.updateAccountEndpoint(endpoint)"/>
						</div>

						<div class="icon-circle-action-remove endpoint-item-middle"
							ng-click="accountAddDetails.removeEndpointItem(endpoint)"></div>
							
						<div class="error-container endpoint-item-right"
								ng-show="endpoint.valid == false">
								<small id="accounts-details-input-invalid-endpoint"
									class="err-message">Invalid end point format</small>
						</div>
							
					</div>

					<div class="account-property">
						<div class="property-label checkbox-label"> 
							<label for="accounts-checkbox-app-is-enabled" class="checkbox"> 
		                		<input type="checkbox" ng-model="accountAddDetails.account.active" id="accounts-checkbox-app-is-enabled"/> 
		                		<i class="skin"></i> 
		                		<span>Active</span> 
		            		</label> 
						</div>	
					</div>
					
				</div>

			</form>
		</div>
			</div>
			<br>
			<div class="b2b-modal-footer">
				<div class="cta-button-group cta-modal-footer-flex">		
					<div class="item">
						<div id="account-details-next-button" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Close</div>
						<div id="account-details-next-button" class="btn btn-alt btn-small" ng-click="accountAddDetails.saveChanges()">Save</div>
					</div>
				</div>
			</div>

</div>

<script>
$(document).ready(function(){
    $(".ngdialog-close").attr('id','dialog-close');
});
</script>