Commit ecf98a84 authored by Nicolas Fella's avatar Nicolas Fella Committed by Dimitris Kardarakos

Disable save button when summary is empty

parent 0764f0a9
Pipeline #6209 passed with stage
in 5 minutes and 3 seconds
......@@ -203,18 +203,14 @@ Kirigami.Page {
text: i18n("Save")
icon.name : "dialog-ok"
enabled: summary.text
onTriggered: {
if(summary.text) {
console.log("Saving task");
var controller = todoController.createObject(parent, {});
var vtodo = { "uid": root.uid, "summary":root.summary, "startDate": root.startdt , "startHour": root.startHour + (root.startPm ? 12 : 0), "startMinute": root.startMinute, "allDay": root.allDay, "description": root.description,"location": root.location, "completed": root.completed};
controller.addEdit(root.calendar, vtodo);
taskeditcompleted();
}
else {
showPassiveNotification("Summary should not be empty");
}
console.log("Saving task");
var controller = todoController.createObject(parent, {});
var vtodo = { "uid": root.uid, "summary":root.summary, "startDate": root.startdt , "startHour": root.startHour + (root.startPm ? 12 : 0), "startMinute": root.startMinute, "allDay": root.allDay, "description": root.description,"location": root.location, "completed": root.completed};
controller.addEdit(root.calendar, vtodo);
taskeditcompleted();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment