public added to task
This commit is contained in:
parent
2cd8a37bd3
commit
4de36c50f4
@ -23,6 +23,7 @@ class TaskSettingsView(BaseView):
|
|||||||
def post(self):
|
def post(self):
|
||||||
for key, value in self.request.POST.items():
|
for key, value in self.request.POST.items():
|
||||||
setattr(self.entities.task, key, value.strip())
|
setattr(self.entities.task, key, value.strip())
|
||||||
|
self.entities.task.public = 'public' in self.request.POST
|
||||||
self.entities.task.save()
|
self.entities.task.save()
|
||||||
return f"/admin/task?task_id={self.entities.task.id}"
|
return f"/admin/task?task_id={self.entities.task.id}"
|
||||||
|
|
||||||
|
@ -82,6 +82,14 @@
|
|||||||
<input type="text" name="time_estimation" value="{{ task.time_estimation }}" class="task-settings-input">
|
<input type="text" name="time_estimation" value="{{ task.time_estimation }}" class="task-settings-input">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Публичная задача
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="public" {% if task.public %}checked {% endif %}class="task-settings-input">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<button type="submit" class="btn btn-light" style="margin-top: 15px;"><i class="fa fa-save"></i> Сохранить</button>
|
<button type="submit" class="btn btn-light" style="margin-top: 15px;"><i class="fa fa-save"></i> Сохранить</button>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user