46 lines
1.7 KiB
HTML
46 lines
1.7 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType('nextcloud-credentials', {
|
|
category: 'config',
|
|
defaults: {
|
|
cname: {value: '', required: false},
|
|
address: {value: '', required: true},
|
|
insecure: {value: '', required: false}
|
|
},
|
|
credentials: {
|
|
user: {type:'text'},
|
|
pass: {type:'password'}
|
|
},
|
|
label: function() {
|
|
if (this.cname.length) {
|
|
return this.cname + ' (' + this.address + ')'
|
|
}
|
|
return this.address
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<script type="text/x-red" data-template-name="nextcloud-credentials">
|
|
<div class="form-row">
|
|
<label for="node-config-input-cname"><i class="fa fa-tag"></i> Name</label>
|
|
<input type="text" id="node-config-input-cname">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-config-input-address"><i class="fa fa-server"></i> Server</label>
|
|
<input type="text" id="node-config-input-address" placeholder="https://your.server.com">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-config-input-insecure"><i class="fa fa-server"></i> Security</label>
|
|
<input type="checkbox" value="1" id="node-config-input-insecure"
|
|
style="display: inline-block; width: auto; vertical-align: top">
|
|
<span style="width: 70%">Accept self signed certificates</span>
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-config-input-user"><i class="fa fa-server"></i> Username</label>
|
|
<input type="text" id="node-config-input-user">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-config-input-pass"><i class="fa fa-key"></i> Password</label>
|
|
<input type="password" id="node-config-input-pass">
|
|
</div>
|
|
</script>
|