diff --git a/hasjob/models/jobpost.py b/hasjob/models/jobpost.py index 93c26457f..6421e6261 100644 --- a/hasjob/models/jobpost.py +++ b/hasjob/models/jobpost.py @@ -279,6 +279,11 @@ def withdraw(self): def close(self): self.status = POSTSTATUS.CLOSED + self.closed_datetime = db.func.utcnow() + + def delete(self): + self.status = POSTSTATUS.DELETED + self.closed_datetime = db.func.utcnow() def confirm(self): self.status = POSTSTATUS.CONFIRMED diff --git a/hasjob/templates/delete.html b/hasjob/templates/delete.html new file mode 100644 index 000000000..dcecc103b --- /dev/null +++ b/hasjob/templates/delete.html @@ -0,0 +1,19 @@ +{% extends "sheet.html" %} +{% from "baseframe/forms.html" import renderfield %} +{% block title %}{{ post.headline|e }}{% endblock %} +{% block content %} +
+ Deleted drafts will be gone forever, with no undo. Are you sure you want to delete? +
+ +