-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwnsm-b2b-credentials.html
37 lines (36 loc) · 1.29 KB
/
wnsm-b2b-credentials.html
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
<script type="text/javascript">
RED.nodes.registerType('wnsm-b2b-credentials', {
category: 'config',
defaults: {
name: { required: true }
},
credentials: {
username: { type: 'text', required: true },
password: { type: 'password', required: true }
},
oneditprepare: function() {
$('#node-config-input-username').change(function(e) {
if (e.originalEvent) {
$('#node-config-input-name').val($('#node-config-input-username').val())
}
})
},
label: function() {
return this.name
}
})
</script>
<script type="text/html" data-template-name="wnsm-b2b-credentials">
<div class="form-row">
<label for="node-config-input-username"><i class="fa fa-user"></i> Username</label>
<input type="text" id="node-config-input-username" placeholder="log.wien username (email address)">
</div>
<div class="form-row">
<label for="node-config-input-password"><i class="fa fa-key"></i> Password</label>
<input type="password" id="node-config-input-password" placeholder="log.wien password">
</div>
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Symbolic name for credentials">
</div>
</script>