condition.remove(self.conn)
return '/conditions'
condition = Condition.by_id(self.conn, id_, create=True)
+ condition.is_active = self.form_data.get_all_str('is_active') != []
condition.title.set(self.form_data.get_str('title'))
condition.description.set(self.form_data.get_str('description'))
condition.save(self.conn)
<form action="condition?id={{condition.id_ or ''}}" method="POST">
title: <input name="title" value="{{condition.title.newest|e}}" />
description: <input name="description" value="{{condition.description.newest|e}}" />
+is active: <input name="is_active" type="checkbox" {% if condition.is_active %}checked{% endif %} />
<input class="btn-harmless" type="submit" name="update" value="update" />
<div class="btn-to-right">