29 lines
444 B
Plaintext
29 lines
444 B
Plaintext
|
|
h = require 'maquette' .h
|
|
Modal = require './modal.ls'
|
|
|
|
TaskRemovalModal = (project-id, todod-ws, task) ->
|
|
task ||= {}
|
|
|
|
self = {
|
|
title: task.title || ""
|
|
description: task.description || ""
|
|
}
|
|
|
|
modal = Modal {
|
|
+visible
|
|
content: h \div.is-danger [ "Do you want to remove the task ?" ]
|
|
|
|
on-validation: ->
|
|
if task.id
|
|
todod-ws.remove-task task.id
|
|
}
|
|
|
|
self.render = ->
|
|
modal.render!
|
|
|
|
self
|
|
|
|
|
|
module.exports = TaskRemovalModal
|