Files
frontend/marko/page/story-content/components/move-chapter-modal/index.marko
T
2018-10-31 23:31:40 +01:00

18 lines
717 B
Plaintext

$ const selected = (state.selected||{id:null});
<modal class="modal color-text nolabel" key="modal" enabled=(input.enabled) closable on-close("close") on-open("open") >
<h1>Move Chapter</h1>
<p key="error" class="color-error">${state.error}</p>
<label>Target story</label>
<select key="story" on-change("change", "selected") autofocus value=selected.id>
<option for(story in state.stories) value=story.id selected=(selected.id === story.id)>${story.name}</option>
</select>
<if-permitted not permission="story.move">
<p>Only stories you are allowed to move the chapter to appear in the above list.</p>
</if-permitted>
<button disabled=state.loading on-click("save")>Move</button>
</modal>