-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmit-result.html
49 lines (49 loc) · 1.71 KB
/
submit-result.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
38
39
40
41
42
43
44
45
46
47
48
49
<script type="text/javascript">
RED.nodes.registerType('submit-result', {
category: 'common',
color: '#60A0FF',
inputs: 2,
outputs: 1,
icon: "submit-result.png",
label: function () {
return this.name || "submit result";
},
inputLabels: ["votingRoundID", "result"],
outputLabels: ["confirmation"],
align: 'left',
defaults: {
name: {value: "submit result"},
votingRoundID: {
value: "",
validate: function (v, opt) {
if (v.trim().length <= 32) {
return true;
}
return RED._("node-red:submit-result.errors.votingRoundID");
}
},
result: {
value: "",
validate: function (v, opt) {
if (v.trim().length <= 64) {
return true;
}
return RED._("node-red:submit-result.errors.result");
}
}
}
});
</script>
<script type="text/html" data-template-name="submit-result">
<div className="form-row">
<label htmlFor="node-input-votingRoundID"><i className="icon-tag"></i>Voting ID</label>
<input type="text" id="node-input-votingRoundID" placeholder="Voting Round ID">
</div>
<div className="form-row">
<label htmlFor="node-input-result"><i className="icon-tag"></i>Result</label>
<input type="text" id="node-input-result" placeholder="Result">
</div>
</script>
<script type="text/html" data-help-name="submit-result">
<p>Submit result vote for a solution on EWX</p>
</script>