-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Template editing to Sidebar (#1612)
* Move Template editing to Sidebar * Removed logs * Linting fixes * i18n updates * renamed filed to remove email designation * package name update * add info box around React message
- Loading branch information
1 parent
0816308
commit 8217a5d
Showing
8 changed files
with
314 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import "./templates/email.html"; | ||
import "./templates/email.js"; | ||
import "./templates/settings.html"; | ||
import "./templates/settings.js"; |
60 changes: 0 additions & 60 deletions
60
imports/plugins/core/templates/client/templates/email.html
This file was deleted.
Oops, something went wrong.
116 changes: 0 additions & 116 deletions
116
imports/plugins/core/templates/client/templates/email.js
This file was deleted.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
imports/plugins/core/templates/client/templates/settings.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<template name="templateSettings"> | ||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<div class="col-md-12"> | ||
{{> React templateGrid }} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{{#if instance.state.get 'isEditing'}} | ||
{{#if instance.state.get 'editingId'}} | ||
{{#if typeEmail}} | ||
<div> | ||
{{#autoForm | ||
collection=Collections.Templates | ||
schema=emailTemplateSchema | ||
id="email-template-edit-form" | ||
template="bootstrap3-inline" | ||
doc=template | ||
}} | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-heading" data-i18n="templateUpdateForm.emailTemplates.updateEmailTemplate">Update email template</div> | ||
<div class="panel-body"> | ||
<div class="col-md-12 form-group"> | ||
{{>afQuickField name="title" class="form-control"}} | ||
{{>afQuickField name="name" class="form-control" disabled=true}} | ||
{{>afQuickField name="language" class="form-control" disabled=true}} | ||
{{>afQuickField name="subject" class="form-control"}} | ||
{{>afQuickField name="template" label="HTML" class="form-control" type="textarea" rows="15"}} | ||
</div> | ||
</div> | ||
|
||
<div class="panel-footer"> | ||
<div class="right"> | ||
{{> templateSubmitButton instance=instance }} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{{/autoForm}} | ||
</div> | ||
{{else}} | ||
<div> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading" data-i18n="templateUpdateForm.reactTemplates.updateReactTemplate">Update React template</div> | ||
<div class="panel-body"> | ||
<div class="col-md-12"> | ||
<div class="alert alert-info"> | ||
<span data-i18n="templateUpdateForm.reactTemplates.updateUnavailable">React templates cannot be edited through this interface</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
</template> | ||
|
||
|
||
<template name="templateSubmitButton"> | ||
<div class="clearfix"> | ||
<div class="pull-right"> | ||
<button type="button" class="btn btn-primary cancel" data-i18n="app.cancel">Cancel</button> | ||
<button type="submit" class="btn btn-primary" data-i18n="app.saveChanges">Save Changes</button> | ||
</div> | ||
</div> | ||
</template> |
Oops, something went wrong.