node-red-contrib-opentext
Version:
node-red-contrib-opentext - An Opentext Core client
70 lines (62 loc) • 2.86 kB
HTML
<script type="text/html" data-template-name="ot2auth">
<!-- node-input-name -->
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="ot2auth.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]ot2auth.placeholder.name" style="width:70%;">
</div>
<!-- node-access_token_url -->
<div class="form-row" id="node-access_token_url">
<label for="node-input-access_token_url"><i class="fa fa-link fa-fw"></i> <span data-i18n="ot2auth.label.access_token_url"></span></label>
<input type="text" id="node-input-access_token_url" data-i18n="[placeholder]ot2auth.placeholder.access_token_url" style="width:70%;">
</div>
<!-- node-client_id -->
<div class="form-row" id="node-client_id">
<label for="node-input-client_id"><i class="fa fa-user fa-fw"></i> <span data-i18n="ot2auth.label.client_id"></span></label>
<input type="text" id="node-input-client_id" data-i18n="[placeholder]ot2auth.placeholder.client_id" style="width:70%;">
</div>
<!-- node-client_secret -->
<div class="form-row" id="node-client_secret">
<label for="node-input-client_secret"><i class="fa fa-lock fa-fw"></i> <span data-i18n="ot2auth.label.client_secret"></span></label>
<input type="password" id="node-input-client_secret" data-i18n="[placeholder]ot2auth.placeholder.client_secret" style="width:70%;">
</div>
</script>
<!-- text/javascript -->
<script type="text/javascript">
(function() {
var headerTypes = [
{value:"content-type",label:"Content-Type",hasValue: false},
{value:"location",label:"Location",hasValue: false},
{value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.png"}
]
var contentTypes = [
{value:"application/json",label:"application/json",hasValue: false},
{value:"application/xml",label:"application/xml",hasValue: false},
{value:"text/css",label:"text/css",hasValue: false},
{value:"text/html",label:"text/html",hasValue: false},
{value:"text/plain",label:"text/plain",hasValue: false},
{value:"image/gif",label:"image/gif",hasValue: false},
{value:"image/png",label:"image/png",hasValue: false},
{value:"other",label:RED._("node-red:httpin.label.other"),icon:"red/images/typedInput/az.png"}
];
RED.nodes.registerType("ot2auth", {
category: 'opentext',
color: "#E1E8F6",
defaults: {
name: {value: ""},
access_token_url: {value: ""},
client_id: {value: ""},
client_secret: {value: ""},
},
inputs: 1,
outputs: 1,
icon: "ot2auth.png",
align: "right",
label: function () {
return this.name || this._("ot2auth.ot2auth");
},
labelStyle: function () {
return this.name ? "node_label_italic" : "";
},
});
})();
</script>