Added option to disable WYSIWYG editor

This commit is contained in:
Andris Reinman 2016-04-11 21:35:04 -07:00
parent 58cce00829
commit 02c8fb4dda
20 changed files with 147 additions and 64 deletions

View file

@ -145,14 +145,19 @@
<div class="form-group">
<label for="template-html" class="col-sm-2 control-label">Template content (HTML)</label>
<div class="col-sm-10">
<textarea class="form-control summernote" if="template-html" name="html" rows="8">{{html}}</textarea>
{{#if disableWysiwyg}}
<div class="code-editor" id="template-html">{{html}}</div>
<input type="hidden" name="html">
{{else}}
<textarea class="form-control summernote" id="template-html" name="html" rows="8">{{html}}</textarea>
{{/if}}
</div>
</div>
<div class="form-group">
<label for="template-text" class="col-sm-2 control-label">Template content (plaintext)</label>
<div class="col-sm-10">
<textarea class="form-control" if="template-text" name="text" rows="10">{{text}}</textarea>
<textarea class="form-control" id="template-text" name="text" rows="10">{{text}}</textarea>
</div>
</div>
</fieldset>

View file

@ -1,19 +1,32 @@
<p>Hey [FIRST_NAME/Customer],</p>
<!doctype html>
<html>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est.</p>
<head>
<meta charset="utf-8">
</head>
<p>Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus
libero lacus a est.</p>
<body>
<p>Cheers,
<br/> {{defaultSender}}
</p>
<p>
{{defaultPostaddress}}
<br/>
<a href="[LINK_PREFERENCES]" style="color: #666666; text-decoration: none;">Preferences</a>
<span style="color: #444444;">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="[LINK_UNSUBSCRIBE]" style="color: #666666; text-decoration: none;">Unsubscribe</a>
<span style="color: #444444;">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="[LINK_BROWSER]" style="color: #666666; text-decoration: none;">View this email in your browser</a>
</p>
<p>Hey [FIRST_NAME/Customer],</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est.</p>
<p>Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus
libero lacus a est.</p>
<p>Cheers,
<br/> {{defaultSender}}
</p>
<p>
{{defaultPostaddress}}
<br/>
<a href="[LINK_PREFERENCES]" style="color: #666666; text-decoration: none;">Preferences</a>
<span style="color: #444444;">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="[LINK_UNSUBSCRIBE]" style="color: #666666; text-decoration: none;">Unsubscribe</a>
<span style="color: #444444;">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="[LINK_BROWSER]" style="color: #666666; text-decoration: none;">View this email in your browser</a>
</p>
</body>
</html>

View file

@ -139,6 +139,7 @@
<script src="/javascript/tables.js"></script>
{{#if useEditor}}
<script src="/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="/summernote/summernote.min.js"></script>
<script src="/javascript/editor.js"></script>
{{/if}}

View file

@ -36,6 +36,16 @@
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-xs-4">
<div class="checkbox">
<label>
<input type="checkbox" name="disable-wysiwyg" {{#if disableWysiwyg}} checked {{/if}}> Disable WYSIWYG editor
</label>
</div>
</div>
</div>
</fieldset>
<fieldset>
@ -204,7 +214,8 @@
</p>
<p class="text-info">
To get VERP working you need to set up a DNS MX record that points to your Mailtrain hostname. You must also ensure that Mailtrain VERP interface is available from port 25 of your server (port 25 usually requires root user privileges). This way if anyone tries to send email to <code>someuser@{{verpHostname}}</code> then the email should end up to this server.
To get VERP working you need to set up a DNS MX record that points to your Mailtrain hostname. You must also ensure that Mailtrain VERP interface is available from port 25 of your server (port 25 usually requires root user privileges). This way if anyone
tries to send email to <code>someuser@{{verpHostname}}</code> then the email should end up to this server.
</p>
<p class="text-warning">

View file

@ -6,6 +6,10 @@
<p>
<a class="btn btn-primary" href="{{homepage}}" role="button">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> return to our website
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> continue to our website
</a>
or
<a class="btn btn-primary" href="{{preferences}}" role="button">
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span> manage you preferences
</a>
</p>

View file

@ -57,21 +57,26 @@
<div class="form-group">
<label for="template-html" class="col-sm-2 control-label">Template content (HTML)</label>
<div class="col-sm-10">
<textarea class="form-control summernote" if="template-html" name="html" rows="8">{{html}}</textarea>
{{#if disableWysiwyg}}
<div class="code-editor" id="template-html">{{html}}</div>
<input type="hidden" name="html">
{{else}}
<textarea class="form-control summernote" id="template-html" name="html" rows="8">{{html}}</textarea>
{{/if}}
</div>
</div>
<div class="form-group">
<label for="template-text" class="col-sm-2 control-label">Template content (plaintext)</label>
<div class="col-sm-10">
<textarea class="form-control" if="template-text" name="text" rows="10">{{text}}</textarea>
<textarea class="form-control" id="template-text" name="text" rows="10">{{text}}</textarea>
</div>
</div>
<div class="form-group">
<label for="template-description" class="col-sm-2 control-label">Description</label>
<div class="col-sm-10">
<textarea class="form-control" if="template-description" name="description" rows="3" placeholder="Optional comments about this template">{{description}}</textarea>
<textarea class="form-control" id="template-description" name="description" rows="3" placeholder="Optional comments about this template">{{description}}</textarea>
<span class="help-block">HTML is allowed</span>
</div>
</div>

View file

@ -63,14 +63,19 @@
<div class="form-group">
<label for="template-html" class="col-sm-2 control-label">Template content (HTML)</label>
<div class="col-sm-10">
<textarea class="form-control summernote" if="template-html" name="html" rows="8">{{html}}</textarea>
{{#if disableWysiwyg}}
<div class="code-editor" id="template-html">{{html}}</div>
<input type="hidden" name="html">
{{else}}
<textarea class="form-control summernote" id="template-html" name="html" rows="8">{{html}}</textarea>
{{/if}}
</div>
</div>
<div class="form-group">
<label for="template-text" class="col-sm-2 control-label">Template content (plaintext)</label>
<div class="col-sm-10">
<textarea class="form-control" if="template-text" name="text" rows="10">{{text}}</textarea>
<textarea class="form-control" id="template-text" name="text" rows="10">{{text}}</textarea>
</div>
</div>