-
Notifications
You must be signed in to change notification settings - Fork 2
/
request_update.html
executable file
·119 lines (105 loc) · 2.7 KB
/
request_update.html
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
<script type="text/javascript">
function show_details(id)
{
$("#btn_show_details_" + id).hide();
$("#btn_hide_details_" + id).show();
$("#details_msg_" + id).show();
}
function hide_details(id)
{
$("#btn_hide_details_" + id).hide();
$("#details_msg_" + id).hide();
$("#btn_show_details_" + id).show();
}
function reject(id)
{
var reason = $("#reason_" + id).val();
var key = $("#random_key_" + id).val();
if (reason == "")
{
alert("الرجاء إدخال سبب الرفض.");
return false;
}
// Generate the request
var request = "request_update.php?do=reject&key=" + key + "&reason=" + encodeURIComponent(reason);
window.location.href = request;
}
function write_reason(id)
{
if ($("#reason_" + id).val() == "")
{
$("#accept_" + id).show();
}
else
{
$("#accept_" + id).hide();
}
}
function check_all()
{
$(".check").each(function(){
var id = $(this).attr("id");
$("#" + id).attr("checked", true);
});
}
function uncheck_all()
{
$(".check").each(function(){
var id = $(this).attr("id");
$("#" + id).attr("checked", false);
});
}
function show_all_details()
{
$(".check").each(function(){
var id = $(this).attr("data-id");
show_details(id);
});
}
function hide_all_details()
{
$(".check").each(function(){
var id = $(this).attr("data-id");
hide_details(id);
});
}
</script>
<div class="row">
<div class="large-12 columns">
<form action="request_update.php?do=assign" method="post" class="inputform">
<h4>تحديثات معلّقة {pendings_count}</h4>
<table class="table" width="100%">
<thead>
<tr>
<th></th>
<th class="hide-for-small"></th>
<th>التحديث</th>
<th class="hide-for-small">اٌُسند إلى</th>
<th>الإجراء</th>
</tr>
</thead>
<tbody>
{pendings}
</tbody>
</table>
{assign_to_div}
</form>
<div>
<h4>آخر {updates_count} تحديثات</h4>
<table class="table" width="100%">
<thead>
<tr>
<th class="hide-for-small"></th>
<th>التحديث</th>
<th>القرار</th>
<th class="hide-for-small">سبب الرفض (إن وُجد)</th>
<th class="hide-for-small">الإنجاز</th>
</tr>
</thead>
<tbody>
{not_pendings}
</tbody>
</table>
</div>
</div>
</div>