summaryrefslogtreecommitdiff
path: root/client/html/pool_edit.tpl
blob: c9f2adb9319d950fb107f4ace2201ed9a156000d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<div class='content-wrapper pool-edit'>
    <form>
        <ul class='input'>
            <li class='names'>
                <% if (ctx.canEditNames) { %>
                    <%= ctx.makeTextInput({
                        text: 'Names',
                        value: ctx.pool.names.join(' '),
                        required: true,
                    }) %>
                <% } %>
            </li>
            <li class='category'>
                <% if (ctx.canEditCategory) { %>
                    <%= ctx.makeSelect({
                        text: 'Category',
                        keyValues: ctx.categories,
                        selectedKey: ctx.pool.category,
                        required: true,
                    }) %>
                <% } %>
            </li>
            <li class='description'>
                <% if (ctx.canEditDescription) { %>
                    <%= ctx.makeTextarea({
                        text: 'Description',
                        value: ctx.pool.description,
                    }) %>
                <% } %>
            </li>
            <li class='posts'>
                <% if (ctx.canEditPosts) { %>
                    <%= ctx.makeTextInput({
                        text: 'Posts',
                        placeholder: 'space-separated post IDs',
                        value: ctx.pool.posts.map(post => post.id).join(' ')
                    }) %>
                <% } %>
            </li>
        </ul>

        <% if (ctx.canEditAnything) { %>
            <div class='messages'></div>

            <div class='buttons'>
                <input type='submit' class='save' value='Save changes'>
            </div>
        <% } %>
    </form>
</div>