-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheditar.php
More file actions
62 lines (58 loc) · 2.41 KB
/
editar.php
File metadata and controls
62 lines (58 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
require_once 'Classes/Tarefa.php';
require_once 'helpers.php';
if(isset($_GET['id'])){
$id = $_GET['id'];
$model = new Tarefa();
$dados = $model->getTask($id);
if (!$dados) {
die('Tarefa não encontrada.');
}
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"
integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<title>To Do List - Cadastrar Tarefa</title>
</head>
<body>
<nav class="navbar navbar-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Editar Tarefa</a>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col">
<form action="updateTask.php" method="post">
<div class="form-group">
<label for="tarefa">O que deve ser feito?</label>
<input type="text" class="form-control" name="tarefa" id="tarefa" required="" value="<?= $dados['tarefa'] ?>">
</div>
<div class="form-group">
<label for="descricao">Descrição</label>
<input type="text" class="form-control" name="descricao" id="descricao" required="" value="<?= $dados['descricao'] ?>">
</div>
<div class="form-group">
<label for="prazo">Prazo</label>
<input type="date" class="form-control" name="data" id="prazo" required="" value="<?= $dados['data'] ?>">
</div>
<input type="hidden" name="id" value="<?= $dados['id'] ?>">
<button type="submit" class="btn btn-primary">Enviar</button>
<a href="pesquisa.php" class="btn btn-secondary">Voltar</a>
</form>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"
integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns"
crossorigin="anonymous"></script>
</body>
</html>