Skip to content

Commit

Permalink
[5.3] MACF-85: Fix issue where 'SMTP email address' is not displayed (#…
Browse files Browse the repository at this point in the history
…260)

* MACF-85: Fix issue where 'SMTP email address' is not displayed

* do not send 'custom_smtp_address' in the payload
  • Loading branch information
pcandia committed Jun 10, 2024
1 parent 4458cf4 commit f32cdeb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions submodules/faxbox/faxbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ define(function(require) {
$this.addClass('disabled');

if (monster.ui.valid(form_html)) {
delete data.faxbox.custom_smtp_address;
self.faxboxSave(form_data, data.faxbox, function(data) {
$this.removeClass('disabled');
callbacks && callbacks.hasOwnProperty('save_success') && callbacks.save_success(data);
Expand Down Expand Up @@ -632,6 +633,12 @@ define(function(require) {
faxboxId: faxboxId
},
success: function(data) {
var custom_smtp_address = _.get(data, 'metadata.custom_smtp_address');

if (custom_smtp_address) {
data.data.custom_smtp_address = custom_smtp_address;
}

callback && callback(data.data);
}
});
Expand Down
4 changes: 2 additions & 2 deletions submodules/faxbox/views/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ <h3>{{ i18n.callflows.faxbox.notification_emails }}</h3>
</div>
</div>

{{#if faxbox._read_only.custom_smtp_address}}
{{#if faxbox.custom_smtp_address}}
<div class="clearfix">
<label for="custom_smtp_address">{{ i18n.callflows.faxbox.smtp_email_address }}</label>
<div class="input">
<span class="text">{{faxbox._read_only.custom_smtp_address}}</span>
<span class="text">{{faxbox.custom_smtp_address}}</span>
</div>
</div>
{{/if}}
Expand Down

0 comments on commit f32cdeb

Please sign in to comment.