Add blacklist function
This commit is contained in:
parent
100fd41713
commit
c9136f8abd
14 changed files with 486 additions and 48 deletions
38
views/blacklist.hbs
Normal file
38
views/blacklist.hbs
Normal file
|
@ -0,0 +1,38 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">{{#translate}}Home{{/translate}}</a></li>
|
||||
<li class="active">{{#translate}}Blacklist{{/translate}}</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{#translate}}Blacklist{{/translate}}</h2>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/blacklist/ajax/add">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="next" value="/blacklist">
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control input-md" name="email" id="add-email-input" value="" placeholder="{{#translate}}Add email to blacklist{{/translate}}">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span>{{#translate}}Add{{/translate}}</button>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="delete-email-form" method="post" action="/blacklist/ajax/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="next" value="/blacklist">
|
||||
<input type="hidden" name="email" id="delete-email-input" value="">
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table data-topic-url="/blacklist" data-sort-column="1" data-sort-order="desc" class="table table-bordered table-hover data-table-ajax display nowrap" width="100%" data-row-sort="0,1,0">
|
||||
<thead>
|
||||
<th class="col-md-1">
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
{{#translate}}Email{{/translate}}
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
|
||||
</th>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
54
views/campaigns/blacklisted.hbs
Normal file
54
views/campaigns/blacklisted.hbs
Normal file
|
@ -0,0 +1,54 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">{{#translate}}Home{{/translate}}</a></li>
|
||||
<li><a href="/campaigns">{{#translate}}Campaigns{{/translate}}</a></li>
|
||||
{{#if parent}}
|
||||
<li><a href="/campaigns/view/{{parent.id}}">{{parent.name}}</a></li>
|
||||
{{/if}}
|
||||
<li><a href="/campaigns/view/{{id}}">{{name}}</a></li>
|
||||
<li class="active">{{#translate}}Blacklisted info{{/translate}}</li>
|
||||
</ol>
|
||||
|
||||
<h2><span class="glyphicon glyphicon-inbox" aria-hidden="true"></span> {{name}} <small>{{#translate}}Blacklisted info{{/translate}}</small> <a class="btn btn-default btn-xs" href="/campaigns/view/{{id}}?tab=overview" role="button"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> {{#translate}}View campaign{{/translate}}</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
{{#if description}}
|
||||
<div class="well well-sm">{{{description}}}</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<div class="panel panel-info">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading">{{#translate}}Subscribers who blacklisted by global blacklist:{{/translate}}</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table data-topic-url="/campaigns/status" data-topic-id="{{id}}/5" data-sort-column="1" data-sort-order="asc" class="table table-bordered table-hover data-table-ajax display nowrap" width="100%" data-row-sort="0,1,1,1,0,1,0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
{{#translate}}Address{{/translate}}
|
||||
</th>
|
||||
<th>
|
||||
{{#translate}}First Name{{/translate}}
|
||||
</th>
|
||||
<th>
|
||||
{{#translate}}Last Name{{/translate}}
|
||||
</th>
|
||||
<th>
|
||||
{{#translate}}Reason{{/translate}}
|
||||
</th>
|
||||
<th>
|
||||
{{#translate}}Time{{/translate}}
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -130,6 +130,13 @@
|
|||
</div>
|
||||
</dd>
|
||||
|
||||
<dt>{{#translate}}Blacklisted{{/translate}} <a href="/campaigns/status/{{id}}/blacklisted" title="{{#translate}}List subscribers who blacklisted by global blacklist{{/translate}}"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a></dt>
|
||||
<dd>
|
||||
<div style="margin-bottom: 20px;">
|
||||
{{blacklisted}}
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt>{{#translate}}Bounced{{/translate}} <a href="/campaigns/status/{{id}}/bounced" title="{{#translate}}List subscribers who bounced{{/translate}}"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a></dt>
|
||||
<dd>
|
||||
<div class="progress">
|
||||
|
|
|
@ -82,6 +82,11 @@
|
|||
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span> {{#translate}}Settings{{/translate}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/blacklist">
|
||||
<span class="glyphicon glyphicon-ban-circle" aria-hidden="true"></span> {{#translate}}Blacklist{{/translate}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/users/api">
|
||||
<span class="glyphicon glyphicon-retweet" aria-hidden="true"></span> {{#translate}}API{{/translate}}
|
||||
|
|
|
@ -17,6 +17,12 @@
|
|||
<input type="hidden" name="cid" value="{{cid}}">
|
||||
</form>
|
||||
|
||||
<form method="post" id="subscriber-blacklist" action="/blacklist/ajax/add">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="email" value="{{email}}">
|
||||
<input type="hidden" name="next" value="/lists/view/{{list.id}}">
|
||||
</form>
|
||||
|
||||
<form method="post" class="delete-form" id="subscriber-delete" action="/lists/subscription/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="list" value="{{list.id}}">
|
||||
|
@ -166,6 +172,7 @@
|
|||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="subscriber-blacklist" class="btn btn-danger"><span class="glyphicon glyphicon-ban-circle"></span>{{#translate}}Blacklist{{/translate}}</button>
|
||||
{{#if isSubscribed}}
|
||||
<button type="submit" form="subscriber-unsubscribe" class="btn btn-default"><i class="glyphicon glyphicon-ban-circle"></i> {{#translate}}Unsubscribe{{/translate}}</button>
|
||||
{{/if}}
|
||||
|
|
|
@ -142,10 +142,32 @@
|
|||
<pre>curl -XPOST {{serviceUrl}}api/delete/B16uVTdW?access_token={{accessToken}} \
|
||||
--data 'EMAIL=test@example.com'</pre>
|
||||
|
||||
<h3>POST /api/field/:listId – {{#translate}}Add new custom field{{/translate}}</h3>
|
||||
<h3>GET /api/blacklist/get – {{#translate}}Get list of blacklisted emails{{/translate}}</h3>
|
||||
|
||||
<p>
|
||||
{{#translate}}This API call creates a new custom field for a list.{{/translate}}
|
||||
{{#translate}}This API call get list of blacklisted emails.{{/translate}}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>GET</strong> {{#translate}}arguments{{/translate}}
|
||||
</p>
|
||||
<ul>
|
||||
<li><strong>access_token</strong> – {{#translate}}your personal access token{{/translate}}
|
||||
<li><strong>start</strong> – {{#translate}}Start position{{/translate}} (<em>{{#translate}}optional, default 0{{/translate}}</em>)</li>
|
||||
<li><strong>limit</strong> – {{#translate}}limit emails count in response{{/translate}} (<em>{{#translate}}optional, default 10000{{/translate}}</em>)</li>
|
||||
<li><strong>search</strong> – {{#translate}}filter by part of email{{/translate}} (<em>{{#translate}}optional, default ''{{/translate}}</em>)</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<strong>{{#translate}}Example{{/translate}}</strong>
|
||||
</p>
|
||||
|
||||
<pre>curl -XGET '{{serviceUrl}}api/blacklist/get?access_token={{accessToken}}&limit=10&start=10&search=gmail' </pre>
|
||||
|
||||
<h3>POST /api/blacklist/add – {{#translate}}Add email to blacklist{{/translate}}</h3>
|
||||
|
||||
<p>
|
||||
{{#translate}}This API call either add emails to blacklist{{/translate}}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -159,24 +181,39 @@
|
|||
<strong>POST</strong> {{#translate}}arguments{{/translate}}
|
||||
</p>
|
||||
<ul>
|
||||
<li><strong>NAME</strong> – {{#translate}}field name{{/translate}} (<em>{{#translate}}required{{/translate}}</em>)</li>
|
||||
<li><strong>TYPE</strong> – {{#translate}}one of the following types:{{/translate}}
|
||||
<ul>
|
||||
{{#each allowedTypes}}
|
||||
<li>
|
||||
<strong>{{type}}</strong> {{description}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>GROUP</strong> – {{#translate}}If the type is 'option' then you also need to specify the parent element ID{{/translate}}</li>
|
||||
<li><strong>GROUP_TEMPLATE</strong> – {{#translate}}Template for the group element. If not set, then values of the elements are joined with commas{{/translate}}</li>
|
||||
<li><strong>VISIBLE</strong> – yes/no, {{#translate}}if not visible then the subscriber can not view or modify this value at the profile page{{/translate}}</li>
|
||||
<li><strong>EMAIL</strong> – {{#translate}}email address{{/translate}} (<em>{{#translate}}required{{/translate}}</em>)</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<strong>{{#translate}}Example{{/translate}}</strong>
|
||||
</p>
|
||||
|
||||
<pre>curl -XPOST {{serviceUrl}}api/field/B16uVTdW?access_token={{accessToken}} \
|
||||
--data 'NAME=Birthday&TYPE=birthday-us&VISIBLE=yes'</pre>
|
||||
<pre>curl -XPOST '{{serviceUrl}}api/blacklist/add?access_token={{accessToken}}' \
|
||||
--data 'EMAIL=test@example.com&'</pre>
|
||||
|
||||
<h3>POST /api/blacklist/delete – {{#translate}}Delete email from blacklist{{/translate}}</h3>
|
||||
|
||||
<p>
|
||||
{{#translate}}This API call either delete emails from blacklist{{/translate}}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>GET</strong> {{#translate}}arguments{{/translate}}
|
||||
</p>
|
||||
<ul>
|
||||
<li><strong>access_token</strong> – {{#translate}}your personal access token{{/translate}}
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<strong>POST</strong> {{#translate}}arguments{{/translate}}
|
||||
</p>
|
||||
<ul>
|
||||
<li><strong>EMAIL</strong> – {{#translate}}email address{{/translate}} (<em>{{#translate}}required{{/translate}}</em>)</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<strong>{{#translate}}Example{{/translate}}</strong>
|
||||
</p>
|
||||
|
||||
<pre>curl -XPOST '{{serviceUrl}}api/blacklist/delete?access_token={{accessToken}}' \
|
||||
--data 'EMAIL=test@example.com&'</pre>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue