Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 7d18d6b

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into lazyLoadFollowers
2 parents b5096a9 + 68b97b6 commit 7d18d6b

File tree

3 files changed

+140
-1
lines changed

3 files changed

+140
-1
lines changed

js/models/userMd.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ module.exports = Backbone.Model.extend({
4040

4141
moderators: [],
4242
moderator_guids: [], //list of moderator guids, created in the parse function
43-
nsfw: '' //show nsfw work content, yes or no
43+
nsfw: '', //show nsfw work content, yes or no
44+
smtp_notifications: false, // turn on smtp notifications
45+
smtp_server: '', // smtp server for notifications (e.g. smtp.gmail.com:587)
46+
smtp_sender: '', // email address FROM:
47+
smtp_recipient: '', // email address TO:
48+
smtp_username: '', // smtp server username
49+
smtp_password: '' // smtp server password or app password
4450
},
4551

4652
parse: function(response) {

js/templates/settings.html

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,134 @@ <h3 class="padding15 margin0 fontWeight500"><%= polyglot.t('Advanced') %></h3>
12711271

12721272
</div>
12731273

1274+
<div class="flexRow borderBottom custCol-border marginTop20">
1275+
<h3 class="padding15 margin0 fontWeight500"><%= polyglot.t('SMTPNotifications') %></h3>
1276+
</div>
1277+
1278+
<div class="flexRow">
1279+
1280+
<div class="flexCol-3 borderRight custCol-border">
1281+
<div class="fieldItem">
1282+
<label>
1283+
<%= polyglot.t('SMTPNotifications') %>
1284+
</label>
1285+
</div>
1286+
</div>
1287+
1288+
<div class="flexCol-9 borderRight0 custCol-border">
1289+
<div class="fieldItem flexRow">
1290+
<div class="flexRow">
1291+
<div class="flexCol-4">
1292+
<input type="radio" class="fieldItem" id="smtpNotificationsYes" name="smtp_notifications" value="true" /><label for="smtpNotificationsYes" class="radioLabel"><%= polyglot.t('Yes') %></label>
1293+
<input type="radio" class="fieldItem" id="smtpNotificationsNo" name="smtp_notifications" value="false" checked/><label for="smtpNotificationsNo" class="radioLabel"><%= polyglot.t('No') %></label>
1294+
</div>
1295+
<div class="flexCol-8">
1296+
<div class="marginLeft10 textSize11px txt-fade"><%= polyglot.t('SMTPNotificationsWarning') %></div>
1297+
</div>
1298+
</div>
1299+
</div>
1300+
</div>
1301+
1302+
</div>
1303+
1304+
<div class="flexRow">
1305+
1306+
<div class="flexCol-3 borderRight custCol-border">
1307+
<div class="fieldItem">
1308+
<label for="resolver">
1309+
<%= polyglot.t('SMTPServer') %>
1310+
</label>
1311+
</div>
1312+
</div>
1313+
1314+
<div class="flexCol-9 borderRight0 custCol-border">
1315+
<input name="smtp_server"
1316+
id="smtpServer"
1317+
type="text"
1318+
placeholder="<%= polyglot.t('SMTPServerExample') %>"
1319+
class="fieldItem"
1320+
value="<%= ob.user.smtp_server %>">
1321+
</div>
1322+
</div>
1323+
1324+
<div class="flexRow">
1325+
1326+
<div class="flexCol-3 borderRight custCol-border">
1327+
<div class="fieldItem">
1328+
<label for="resolver">
1329+
<%= polyglot.t('SMTPUsername') %>
1330+
</label>
1331+
</div>
1332+
</div>
1333+
1334+
<div class="flexCol-9 borderRight0 custCol-border">
1335+
<input name="smtp_username"
1336+
id="smtpUsername"
1337+
type="text"
1338+
class="fieldItem"
1339+
value="<%= ob.user.smtp_username %>">
1340+
</div>
1341+
</div>
1342+
1343+
<div class="flexRow">
1344+
1345+
<div class="flexCol-3 borderRight custCol-border">
1346+
<div class="fieldItem">
1347+
<label for="resolver">
1348+
<%= polyglot.t('SMTPPassword') %>
1349+
</label>
1350+
</div>
1351+
</div>
1352+
1353+
<div class="flexCol-9 borderRight0 custCol-border">
1354+
<input name="smtp_password"
1355+
id="smtpPassword"
1356+
type="text"
1357+
class="fieldItem"
1358+
value="<%= ob.user.smtp_password %>">
1359+
</div>
1360+
</div>
1361+
1362+
<div class="flexRow">
1363+
1364+
<div class="flexCol-3 borderRight custCol-border">
1365+
<div class="fieldItem">
1366+
<label for="resolver">
1367+
<%= polyglot.t('SMTPSender') %>
1368+
</label>
1369+
</div>
1370+
</div>
1371+
1372+
<div class="flexCol-9 borderRight0 custCol-border">
1373+
<input name="smtp_sender"
1374+
id="smtpSender"
1375+
type="text"
1376+
placeholder="<%= polyglot.t('SMTPSenderExample') %>"
1377+
class="fieldItem"
1378+
value="<%= ob.user.smtp_sender %>">
1379+
</div>
1380+
</div>
1381+
1382+
<div class="flexRow">
1383+
1384+
<div class="flexCol-3 borderRight custCol-border">
1385+
<div class="fieldItem">
1386+
<label for="resolver">
1387+
<%= polyglot.t('SMTPRecipient') %>
1388+
</label>
1389+
</div>
1390+
</div>
1391+
1392+
<div class="flexCol-9 borderRight0 custCol-border">
1393+
<input name="smtp_recipient"
1394+
id="smtpRecipient"
1395+
type="text"
1396+
placeholder="<%= polyglot.t('SMTPRecipientExample') %>"
1397+
class="fieldItem"
1398+
value="<%= ob.user.smtp_recipient %>">
1399+
</div>
1400+
</div>
1401+
12741402
<a class="btn btn-large js-saveAdvanced custCol-secondary pull-right marginRight15 marginTop15 marginBottom50 btn-secondary">
12751403
<span class="ion-checkmark fontSize11 marginRight2 textOpacity1"></span>
12761404
<%= polyglot.t('SaveChanges') %> (<%= config.keyShortcutPrefix + config.keyShortcuts.save.toUpperCase() %>)

js/views/settingsVw.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,15 @@ module.exports = Backbone.View.extend({
391391
vendorStatus = this.model.get('page').profile.vendor,
392392
fancyStatus = window.localStorage.getItem('notFancy');
393393

394+
smtp_notifications = (user.smtp_notifications == 1) ? true : false;
395+
394396
this.$el.find('#pageForm input[name=nsfw]').val([String(pageNSFW)]);
395397
this.$("#generalForm input[name=nsfw][value=" + localStorage.getItem('NSFWFilter') + "]").prop('checked', true);
396398
this.$("#generalForm input[name=notifications][value=" + notifications + "]").prop('checked', true);
397399
this.$("#storeForm input[name=vendor][value=" + vendorStatus + "]").prop('checked', true);
398400
this.$("#advancedForm input[name=notFancy][value=" + fancyStatus + "]").prop('checked', true);
399401
this.$("#advancedForm input[name=additionalPaymentData][value=" + localStorage.getItem('AdditionalPaymentData') + "]").prop('checked', true);
402+
this.$("#advancedForm input[name=smtp_notifications][value=" + smtp_notifications + "]").prop('checked', true);
400403

401404
currecyList = __.uniq(currecyList, function(item){return item.code;});
402405
currecyList = currecyList.sort(function(a,b){
@@ -452,6 +455,8 @@ module.exports = Backbone.View.extend({
452455

453456
//set moderator status
454457
this.$('#moderatorForm input[name=moderator]').val([String(moderatorStatus)]);
458+
459+
this.$('#advancedForm input[name=smtp_mo]').val([String(moderatorStatus)]);
455460
},
456461

457462
showModeratorFeeHolder: function(){

0 commit comments

Comments
 (0)