This commit is contained in:
Andris Reinman 2016-05-31 17:32:36 +03:00
parent 3fa0e109af
commit 9bd6db2624
13 changed files with 201 additions and 51 deletions

View file

@ -87,6 +87,31 @@
{{#if isNormal}}
<dt>Preview campaign as</dt>
<dd>
<form method="post" action="/campaigns/preview/{{id}}" class="form-inline">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="campaign" value="{{cid}}">
<input type="hidden" name="list" value="{{list.cid}}">
<input type="hidden" name="listId" value="{{list.id}}">
<div class="form-group">
<select name="subscriber" class="form-control" required>
{{#each testUsers}}
<option value="{{cid}}">{{displayName}}</option>
{{/each}}
{{#if testUsers}}
<optgroup label="Actions">
<option value="_create">Add new test user ...</option>
</optgroup>
{{else}}
<option value="_create">No test users yet, create one here ...</option>
{{/if}}
</select>
</div>
<button type="submit" class="btn btn-default">Go</button>
</form>
</dd>
{{#unless isIdling}}
<dt>Delivered <a href="/campaigns/status/{{id}}/delivered" title="List subscribers who received this message"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a></dt>
<dd>{{delivered}}</dd>

View file

@ -131,6 +131,17 @@
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox" name="is-test" {{#if isTest}} checked {{/if}}> Test user?
<span class="help-block">If checked then this subscription can be used for previewing campaign messages</span>
</label>
</div>
</div>
</div>
<hr />
<div class="form-group">

View file

@ -144,6 +144,17 @@
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox" name="is-test" {{#if isTest}} checked {{/if}}> Test user?
<span class="help-block">If checked then this subscription can be used for previewing campaign messages</span>
</label>
</div>
</div>
</div>
<hr />
<div class="form-group">