<% if (ctx.canEditPostSafety) { %>
<%= ctx.makeRadio({ name: 'safety', class: 'safety-safe', value: 'safe', selectedValue: ctx.post.safety, text: 'Safe'}) %> <%= ctx.makeRadio({ name: 'safety', class: 'safety-sketchy', value: 'sketchy', selectedValue: ctx.post.safety, text: 'Sketchy'}) %> <%= ctx.makeRadio({ name: 'safety', value: 'unsafe', selectedValue: ctx.post.safety, class: 'safety-unsafe', text: 'Unsafe'}) %>
<% } %> <% if (ctx.canEditPostRelations) { %>
<%= ctx.makeTextInput({ text: 'Relations', name: 'relations', placeholder: 'space-separated post IDs', pattern: '^[0-9 ]*$', value: ctx.post.relations.map(rel => rel.id).join(' '), }) %>
<% } %> <% if (ctx.canEditPostTags) { %>
<%= ctx.makeTextInput({ text: 'Tags', value: ctx.post.tags.join(' '), }) %>
<% } %> <% if (ctx.canEditPostFlags && ctx.post.type === 'video') { %>
<%= ctx.makeCheckbox({ text: 'Loop video', name: 'loop', checked: ctx.post.flags.includes('loop'), }) %>
<% } %>