/
createTask.php
296 lines (296 loc) · 10.2 KB
/
createTask.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<?php
require_once("_inc/header.php");
$hr_db = new hr();
?>
<!-- start: BREADCRUMB -->
<div class="row">
<div class="col-md-12">
<ol class="breadcrumb">
<li>
<a href="#">
Dashboard
</a>
</li>
<li class="active">
Create Task
</li>
</ol>
</div>
</div>
<!-- end: BREADCRUMB -->
<!-- start: PAGE CONTENT -->
<div class="row">
<div class="col-md-12">
<!-- start: FORM VALIDATION 2 PANEL -->
<div class="panel panel-white">
<div class="panel-heading">
<h4 class="panel-title">Create <span class="text-bold">Task</span></h4>
<div class="panel-tools">
<div class="dropdown">
<a data-toggle="dropdown" class="btn btn-xs dropdown-toggle btn-transparent-grey">
<i class="fa fa-cog"></i>
</a>
<ul class="dropdown-menu dropdown-light pull-right" role="menu">
<li>
<a class="panel-collapse collapses" href="#"><i class="fa fa-angle-up"></i> <span>Collapse</span> </a>
</li>
<li>
<a class="panel-refresh" href="#">
<i class="fa fa-refresh"></i> <span>Refresh</span>
</a>
</li>
<li>
<a class="panel-config" href="#panel-config" data-toggle="modal">
<i class="fa fa-wrench"></i> <span>Configurations</span>
</a>
</li>
<li>
<a class="panel-expand" href="#">
<i class="fa fa-expand"></i> <span>Fullscreen</span>
</a>
</li>
</ul>
</div>
<a class="btn btn-xs btn-link panel-close" href="#">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="panel-body">
<h2><i class="fa fa-pencil-square"></i> NEW TASK</h2>
<hr>
<form action="<? $_SERVER['PHP_SELF']; ?>" role="form" id="form2">
<div class="row">
<div class="col-md-12">
<div class="errorHandler alert alert-danger no-display">
<i class="fa fa-times-sign"></i> You have some form errors. Please check below.
</div>
<div class="successHandler alert alert-success no-display">
<i class="fa fa-ok"></i> Task Creation is successful!
</div>
</div>
<div class="col-md-6">
<input type="hidden" value="<?php echo $_SESSION['tasks_empId']?>" id="creator_id">
<div class="form-group">
<label class="control-label">
JOB <span class="symbol required"></span>
</label>
<select class="form-control search-select selJob" id="selJob" name="selJob">
<?php
//get all jobs
$q = "SELECT * FROM `jobs` ORDER BY jobId";
$sq = $hr_db->query($q);
$sq = $hr_db->execute();
$getJobs = $hr_db->fetchAll();
if(!empty($getJobs)){
echo "<option value=''>Select...</option>";
foreach($getJobs as $jobs){
echo "<option value='".$jobs['jobId']."'>".$jobs['job']."</option>";
}
}
?>
</select>
</div>
<div class="form-group">
<label class="control-label">
EMPLOYEE <span class="symbol required"></span>
</label>
<select class="form-control search-select selEmps" id="selEmps" name="selEmps">
<option value="">Select...</option>
</select>
</div>
<div class="form-group">
<label class="control-label">
BRANCH
</label>
<select class="form-control search-select selBranchs" id="selBranchs" name="selBranchs">
<?php
//get all lcations
$q = "SELECT * FROM `locations` ORDER BY locId";
$sq = $hr_db->query($q);
$sq = $hr_db->execute();
$getLocations = $hr_db->fetchAll();
if(!empty($getLocations)){
echo "<option value=''>Select...</option>";
foreach($getLocations as $locations){
echo "<option value='".$locations['locId']."'>".$locations['loc']."</option>";
}
}
?>
</select>
</div>
<div class="form-group">
<label class="control-label">
FOLLOWERS
</label>
<select multiple="multiple" id="form-field-select-4" class="form-control search-select selFollowers" placeholder="select followers">
<?php
//get all employees
$q = "SELECT * FROM `users` ORDER BY emp_id";
$sq = $hr_db->query($q);
$sq = $hr_db->execute();
$getEmployees = $hr_db->fetchAll();
if(!empty($getEmployees)){
foreach($getEmployees as $employees){
echo "<option value='".$employees['emp_id']."'>".$employees['name']."</option>";
}
}
?>
</select>
</div>
<div class="form-group">
<label class="control-label">
TASK TITLE <span class="symbol required"></span>
</label>
<input type="text" placeholder="Insert task title" class="form-control" id="taskTitle" name="taskTitle">
</div>
<div class="form-group">
<label class="control-label">
FORMS
</label>
<select class="form-control search-select forms" id="forms" name="forms">
<option value="">Select...</option>
<option value="1">Form 1</option>
<option value="2">Form 2</option>
<option value="3">Form 3</option>
<option value="4">Form 4</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label">
Type <span class="symbol required"></span>
</label>
<div>
<label class="radio-inline">
<input type="radio" class="grey type-callback" value="1" name="taskType" id="repeatedType">
Repeated task
</label>
<label class="radio-inline">
<input type="radio" class="grey type-callback" value="2" name="taskType" id="normalType">
Normal task
</label>
</div>
</div>
<div id="tasksType">
<div class="form-group">
<div class="repeated" style="display:none">
<div class="radio">
<label>
<input type="radio" value="1" name="period" class="grey repeatedType">
Daily
</label>
</div>
<div class="radio">
<label>
<input type="radio" value="2" name="period" class="grey repeatedType">
Weekly
</label>
</div>
<div class="radio">
<label>
<input type="radio" value="3" name="period" class="grey repeatedType">
Monthly
</label>
</div>
<div class="radio">
<label>
<input type="radio" value="4" name="period" class="grey repeatedType">
Annually
</label>
</div>
</div>
</div>
<div class="normal" style="display:none">
<div class="form-group">
<label class="control-label">
Date Range <span class="symbol required"></span>
</label>
<div class="input-group">
<span class="input-group-addon"> <i class="fa fa-calendar"></i> </span>
<input type="text" class="form-control date-range" id="taskDate" name="taskDate">
</div>
</div>
</div>
</div><br />
<div class="form-group">
<div class="col-sm-12">
<button class="btn btn-dark-grey yUpload" type="button"> Upload files </button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label">
Description <span class="symbol required"></span>
</label>
<div class="noteWrap">
<div class="form-group">
<textarea class="summernote" placeholder="Write task description here..."></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div>
<span class="symbol required"></span>Required Fields
<hr>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<button class="btn btn-yellow btn-block" type="submit">
Create task <i class="fa fa-arrow-circle-right"></i>
</button>
</div>
</div>
</form>
</div>
</div>
<!-- end: FORM VALIDATION 2 PANEL -->
</div>
</div>
<!-- end: PAGE CONTENT-->
</div>
<div class="no-display" id="yfileUpload">
<div class="row">
<div class="col-md-12">
<div class="panel panel-white">
<div class="panel-body">
<!-- <form method="post" id="yTaskAttach" enctype="multipart/form-data"> -->
<div class="fileupload fileupload-new" data-provides="fileupload">
<input type="hidden" value="" name="">
<span class="btn btn-file btn-light-grey">
<i class="fa fa-folder-open-o"></i>
<span class="fileupload-new">Select file</span>
<span class="fileupload-exists">Upload anthor</span>
<input type="file" id="yfile" name="yfile" />
</span>
<span class="fileupload-preview"></span>
<a class="close fileupload-exists float-none" href="#" data-dismiss="fileupload"> × </a>
</div>
<input type="hidden" value="e" name="attach_id" class="attach_id">
<!-- </form> -->
<div id="yAttachResults">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="subviews">
<div class="subviews-container"></div>
</div>
</div>
<!-- end: PAGE -->
</div>
<!-- end: MAIN CONTAINER -->
<?php
require_once("_inc/footer.php");
?>