Rename dynamic_editor macro to render_editor for consistency across templates
This commit is contained in:
parent
22dfc8411a
commit
42b87d08cc
3 changed files with 5 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{% import "fragments/_icon_fragment.html" as icons %}
|
||||
|
||||
{% macro dynamic_editor(id, title, mode='edit', content=none, enabled=true, create_url=none, refresh_url=none,
|
||||
{% macro render_editor(id, title, mode='edit', content=none, enabled=true, create_url=none, refresh_url=none,
|
||||
update_url=none, delete_url=none, field_name=none, record_id=none) %}
|
||||
<!-- Editor Fragment -->
|
||||
<div class="row mb-3" id="editor-container-{{ id }}" x-data='Editor({
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col p-3">
|
||||
{{ editor.dynamic_editor(
|
||||
{{ editor.render_editor(
|
||||
id = "notes",
|
||||
title = "Notes & Comments",
|
||||
mode = 'view' if item.id else 'edit',
|
||||
|
|
@ -280,7 +280,7 @@
|
|||
{% set title %}
|
||||
{{ note.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}{{ links.entry_link('worklog_entry', note.work_log_id) }}
|
||||
{% endset %}
|
||||
{{ editor.dynamic_editor(
|
||||
{{ editor.render_editor(
|
||||
id = 'updates' + (note.id | string),
|
||||
title = title,
|
||||
mode = 'view',
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{% for update in log.updates %}
|
||||
{{ editor.dynamic_editor(
|
||||
{{ editor.render_editor(
|
||||
id = update.id,
|
||||
title = update.timestamp.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
mode = 'view',
|
||||
|
|
@ -238,7 +238,7 @@
|
|||
) }}
|
||||
{% endfor %}
|
||||
<template id="editor-template">
|
||||
{{ editor.dynamic_editor('__ID__', '__TIMESTAMP__', 'edit', '') }}
|
||||
{{ editor.render_editor('__ID__', '__TIMESTAMP__', 'edit', '') }}
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue