stash
This commit is contained in:
parent
d49aec5a82
commit
42e1e6e8c7
1 changed files with 28 additions and 27 deletions
|
@ -1,37 +1,38 @@
|
||||||
<template>
|
<template>
|
||||||
<h3 class="text-center">Message Templates</h3>
|
<h3 class="text-center">Available Message Template Variables</h3>
|
||||||
<ul>
|
|
||||||
<div v-for="template in messageTemplatesIntermediate" :key="template.id" class="card bg-dark">
|
|
||||||
<div class="card-header">{{ template.name }}</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<FormatedText :value="template.message" :format="formatText"
|
|
||||||
@input="changeMessageTemplate(template.id, $event)"/>
|
|
||||||
<br>
|
|
||||||
<button class="btn btn-primary" @click="resetMessageTemplate(template.id)"
|
|
||||||
:disabled="messageTemplates.find(t => t.id === template.id).message === template.message">Reset
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-success" @click="saveMessageTemplate(template.id)"
|
|
||||||
:disabled="messageTemplates.find(t => t.id === template.id).message === template.message">Save
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card bg-dark">
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control" v-model="newTemplateName" placeholder="New Template Name">
|
|
||||||
<button class="btn btn-success input-group-btn" @click="createMessageTemplateAndReset()" ref="createButton">Create
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ul>
|
|
||||||
<h3 class="text-center">Message Template Variables</h3>
|
|
||||||
<p>
|
<p>
|
||||||
<span v-for="(variable, key) in messageTemplateVariables" :key="key" class="badge badge-primary"
|
<span v-for="(variable, key) in messageTemplateVariables" :key="key" class="badge badge-primary"
|
||||||
style="margin: 5px;">
|
style="margin: 5px;">
|
||||||
{{ variable }}
|
{{ variable }}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
<h3 class="text-center">Message Templates</h3>
|
||||||
|
<div v-for="template in messageTemplatesIntermediate" :key="template.id" class="card bg-dark"
|
||||||
|
style="margin-bottom: 10px;">
|
||||||
|
<div class="card-header">{{ template.name }}</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<FormatedText :value="template.message" :format="formatText"
|
||||||
|
@input="changeMessageTemplate(template.id, $event)"/>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<button class="btn btn-primary" @click="resetMessageTemplate(template.id)"
|
||||||
|
:disabled="messageTemplates.find(t => t.id === template.id).message === template.message">Reset
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-success" @click="saveMessageTemplate(template.id)"
|
||||||
|
:disabled="messageTemplates.find(t => t.id === template.id).message === template.message">Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card bg-dark">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control" v-model="newTemplateName" placeholder="New Template Name">
|
||||||
|
<button class="btn btn-success input-group-btn" @click="createMessageTemplateAndReset()"
|
||||||
|
ref="createButton">Create
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in a new issue