First take on recipient node
This commit is contained in:
40
numberRecipient.html
Normal file
40
numberRecipient.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('number-recipient', {
|
||||
category: 'config',
|
||||
defaults: {
|
||||
name: {value: ""},
|
||||
number: {value: "", required: true}
|
||||
},
|
||||
label: function() {
|
||||
return this.name || this.number || "Number Recipient";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-template-name="number-recipient">
|
||||
<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="Name">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-config-input-number"><i class="fa fa-phone"></i> Phone Number</label>
|
||||
<input type="text" id="node-config-input-number" placeholder="+1234567890">
|
||||
</div>
|
||||
<div class="form-tips">
|
||||
<strong>Tip:</strong> Enter the phone number with or without country code (e.g., +1234567890 or 1234567890).
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-help-name="number-recipient">
|
||||
<p>Configuration node for a WhatsApp chat recipient.</p>
|
||||
<h3>Details</h3>
|
||||
<p>This configuration node stores a phone number that can be reused across multiple chat output nodes.</p>
|
||||
<p>The phone number can be overridden at runtime by setting <code>msg.toNumber</code> in the flow.</p>
|
||||
<h3>Configuration</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>Name <span class="property-type">string</span></dt>
|
||||
<dd>A friendly name to identify this recipient (optional).</dd>
|
||||
<dt>Phone Number <span class="property-type">string</span></dt>
|
||||
<dd>The WhatsApp phone number. Can include country code with or without + prefix.</dd>
|
||||
</dl>
|
||||
</script>
|
||||
Reference in New Issue
Block a user