diff options
| author | Hunternif <hunternif@gmail.com> | 2019-04-23 02:24:30 +0700 |
|---|---|---|
| committer | Hunternif <hunternif@gmail.com> | 2019-04-23 02:55:48 +0700 |
| commit | f1bcb815d6714bbb0a2f534d958c1863be1fd1cf (patch) | |
| tree | 8b214808e541b832200b001c5e8815dd45c3414f /client/html | |
| parent | 7ae11f483ff1e1fc3cf44775b07d666a7fe28a7f (diff) | |
client: add button to delete metric
Diffstat (limited to 'client/html')
| -rw-r--r-- | client/html/tag_metric.tpl | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/client/html/tag_metric.tpl b/client/html/tag_metric.tpl index a8bad06..3f06d0c 100644 --- a/client/html/tag_metric.tpl +++ b/client/html/tag_metric.tpl @@ -17,12 +17,24 @@ }) %> </div> - <div class='buttons'> - <% if (!ctx.tag.metric && ctx.canCreateMetric) { %> - <input type='submit' value='Create metric'/> - <% } else if (ctx.tag.metric && ctx.canEditMetricBounds) { %> - <input type='submit' value='Update metric'/> - <% } %> + <% if (ctx.tag.metric && ctx.canDeleteMetric) { %> + <div class='confirmation'> + <%= ctx.makeCheckbox({name: 'confirm-delete', + text: 'I confirm that I want to delete this metric.'}) %> + </div> + <% } %> + + <div class='messages'></div> + + <div class='buttons'><!-- + --><% if (!ctx.tag.metric && ctx.canCreateMetric) { %><!-- + --><input type='submit' value='Create metric'/><!-- + --><% } else if (ctx.tag.metric && ctx.canEditMetricBounds) { %><!-- + --><input type='submit' value='Update metric'/><!-- + --><% } %><!-- + --><% if (ctx.tag.metric && ctx.canDeleteMetric) { %><!-- + --><input type='button' name='delete' class='delete' value='Delete metric'/><!-- + --><% } %> </div> </form> </div> |