Adds duplicate model function for Template that gets a Template by id and creates a new Template with the same data.
61 lines
2.8 KiB
Handlebars
61 lines
2.8 KiB
Handlebars
<ol class="breadcrumb">
|
|
<li><a href="/">{{#translate}}Home{{/translate}}</a></li>
|
|
<li><a href="/templates/">{{#translate}}Templates{{/translate}}</a></li>
|
|
<li class="active">{{#translate}}Edit Template{{/translate}}</li>
|
|
</ol>
|
|
|
|
<h2>{{#translate}}Edit Template{{/translate}} <a class="btn btn-default btn-xs" href="/templates/" role="button"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> {{#translate}}Back to templates{{/translate}}</a></h2>
|
|
|
|
<hr>
|
|
|
|
<form method="post" class="delete-form" id="templates-delete" action="/templates/delete">
|
|
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
|
<input type="hidden" name="id" value="{{id}}" />
|
|
</form>
|
|
|
|
<form method="post" class="duplicate-form" id="templates-duplicate" action="/templates/duplicate">
|
|
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
|
<input type="hidden" name="id" value="{{id}}" />
|
|
</form>
|
|
|
|
<form class="form-horizontal" method="post" action="/templates/edit">
|
|
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
|
<input type="hidden" name="id" value="{{id}}" />
|
|
|
|
<div class="form-group">
|
|
<label for="template-name" class="col-sm-2 control-label">{{#translate}}Template name{{/translate}}</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control input-lg" name="name" id="template-name" value="{{name}}" placeholder="{{#translate}}Name for this template, eg. Newsletter{{/translate}}">
|
|
</div>
|
|
</div>
|
|
|
|
{{> merge_tag_reference mergeTagReferenceFooterText='In addition to that any custom field can have its own merge tag.'}}
|
|
|
|
{{> plaintext}}
|
|
|
|
{{#if disableWysiwyg}}
|
|
{{> codeeditor}}
|
|
{{else}}
|
|
{{> (lookup . 'editorName') }}
|
|
{{/if}}
|
|
|
|
<div class="form-group">
|
|
<label for="template-description" class="col-sm-2 control-label">{{#translate}}Description{{/translate}}</label>
|
|
<div class="col-sm-10">
|
|
<textarea class="form-control" id="template-description" name="description" rows="3" placeholder="{{#translate}}Optional comments about this template{{/translate}}">{{description}}</textarea>
|
|
<span class="help-block">{{#translate}}HTML is allowed{{/translate}}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
<div class="pull-right">
|
|
<button type="submit" form="templates-duplicate" class="btn btn-default"> {{#translate}}Duplicate{{/translate}}</button>
|
|
<button type="submit" form="templates-delete" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> {{#translate}}Delete Template{{/translate}}</button>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> {{#translate}}Update{{/translate}}</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</form>
|