Skip to content

Commit 0f11663

Browse files
Email Subject added in the subscription (#115)
* emailSubject added * reviewed changes * deleting and resolving * Update subscription.html
1 parent f4e312c commit 0f11663

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/main/resources/static/js/subscription.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jQuery(document).ready(function () {
135135
this.authenticationType = ko.observable(data.authenticationType);
136136
this.userName = ko.observable(data.userName);
137137
this.password = ko.observable(data.password);
138+
this.emailSubject = ko.observable(data.emailSubject).extend({notify:'always'});
138139

139140
// Default to REST_POST
140141
if (this.notificationType() == "" || this.notificationType() == null) {
@@ -244,6 +245,7 @@ jQuery(document).ready(function () {
244245
{ "text": "REST POST (Raw Body : JSON)", value: "templateRestPostJsonRAWBodyTrigger" },
245246
{ "text": "Mail Trigger", value: "templateEmailTrigger" }
246247
]);
248+
247249
self.choosen_subscription_template = ko.observable();
248250
self.authenticationType = ko.observable();
249251
self.restPost = ko.observable(false);

src/main/resources/static/resources/subscription_templates.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ template_vars["templateEmailTrigger"] =
9191
"created": "",
9292
"notificationMeta" : "mymail@company.com",
9393
"notificationType" : "MAIL",
94+
"emailSubject" : "",
9495
"restPostBodyMediaType" : "",
9596
"notificationMessageKeyValues" : [
9697
{

src/main/resources/templates/subscription.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,19 @@ <h3 class="modal-title text-center" id="formHeader">Subscription Form</h3>
133133
</label>
134134
</div>
135135
</div>
136+
<!-- Form post emailSubject field -->
137+
<div class="form-group" data-bind="visible: !$root.restPost()">
138+
<label class="h5 control-label font-weight-bold">Subject</label>
139+
<img class="cursor-pointer popup-large" id="restPostMediaTypeInfo" alt="RestPostMediaType Info" src="assets/images/information.png" data-toggle="tooltip" data-placement="top"
140+
title=
141+
"This will be the subject of the email,<br>
142+
which will be sent as a subscription notification. <br>
143+
Default value is set by admin in property file" />
144+
<div>
145+
<input id="emailSubjectID" data-bind="textInput:$data.emailSubject, onChange"
146+
name="emailSubject" placeholder="emailSubject" class="form-control" type="text"/>
147+
</div>
148+
</div>
136149

137150
<div class="form-group" data-bind="visible: $root.restPost()">
138151
<label class="pl-1 control-label font-weight-bold">RestPostMediaType</label>
@@ -152,6 +165,7 @@ <h3 class="modal-title text-center" id="formHeader">Subscription Form</h3>
152165
<span data-bind="text: label"></span>
153166
</label>
154167
</div>
168+
155169
</div>
156170

157171
<div class="form-group">

0 commit comments

Comments
 (0)