-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks_page.php
163 lines (154 loc) · 8.07 KB
/
tasks_page.php
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php
session_start();
include_once __DIR__ .'/static/public/CSRF-Protector-PHP/libs/csrf/csrfprotector.php';
//Initialise CSRFGuard library
csrfProtector::init();
include dirname(__FILE__).'/loggedUserData.php';
if(!isset($logged_user)){
header('location: ../index.php'); // Redirecting To Home Page
}
?>
<!DOCTYPE html>
<html>
<head>
<title>TASKS</title>
<!-- https://codepen.io/sazzad/pen/antDJ -->
<?php include ("head.php"); ?>
<script type="text/javascript" src="static/appspecific/js/permitNavLinks.js"></script>
<script type="text/javascript" src="static/appspecific/js/tasks.js"></script>
<style type="text/css">
#taskNavItag {
aria-hidden: true;
font-size: 32px;
color: blue;
}
</style>
</head>
<body>
<?php include ("hiddenInputs.php"); ?>
<!-- Top container -->
<?php include ("navLinks.php"); ?>
<div id="modalContainer" class="container">
<div class="row mb-4">
<!-- The Modal -->
<div class="modal hide fade" id="recordListModalID">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h8 id="taskModalTitle" class="modal-title">Add Task</h8>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<form id="taskListModalForm" class="form-horizontal">
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="form_task" class="pb-0 mb-0">Task Name</label>
<input type="text" name="form_task" class="form-control" placeholder="Task todo" required="required" >
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="form_creator" class="pb-0 mb-0">Created By</label>
<input type="text" name="form_creator" value='<?php echo $logged_userName?>' class="form-control" readonly>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="form_owner" class="pb-0 mb-0">Task Owner</label>
<select id='ownerSelect' name="form_owner" class="form-control">
<option id="ta_opt_0" value="">Select</option>
</select>
<div class="help-block with-errors"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="form_duedate" class="pb-0 mb-0">Due Date (default today)</label>
<input id="duedefault" type="date" name="form_duedate" class="form-control">
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-4" id="showStatesOnEdit">
<div class="form-group">
<label for="form_status" class="pb-0 mb-0">Update Status:</label>
<select id='statusSelect' name="form_status" class="form-control">
<option value="Open" selected>Open</option>
<option value="Completed">Completed</option>
<option value="OnHold">OnHold</option>
</select>
<div class="help-block with-errors"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label for="form_comment" class="pb-0 mb-0">Comment</label>
<textarea name="form_comment" class="form-control" placeholder="Any comments?" rows="4"></textarea>
<div class="help-block with-errors"></div>
</div>
</div>
</div>
<div class="btn-group">
<button class="btn btn-success btn-sm mr-2" type="submit">Submit</button>
<button id="modalClearBtn" type="reset" class="btn btn-sm" value="clear" onclick="resetTaskForm()">Clear</button>
</div>
</form>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button id="modalCloseBtn" type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid p-4">
<div class="row">
<div class="table-responsive">
<table id="taskListTbl" class="table table-bordered table-sm table-striped">
<thead>
<tr>
<th>Task</th>
<th>Created By</th>
<th>Owner</th>
<th>Due By</th>
<th>Status</th>
<th>Comments</th>
<th>Edit</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<?php include ("footer.php"); ?>
<script>
function resetTaskForm() {
document.getElementById("taskListModalForm").reset();
}
$('#chooseFile').bind('change', function () {
var filename = $("#chooseFile").val();
if (/^\s*$/.test(filename)) {
$(".file-upload").removeClass('active');
$("#noFile").text("No file chosen...");
}
else {
$(".file-upload").addClass('active');
$("#noFile").text(filename.replace("C:\\fakepath\\", ""));
}
});
</script>
<script type="text/javascript" src="static/appspecific/js/openNavLinks.js"></script>
</body>
</html>