Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apex_micro_site
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Ali Arshad
apex_micro_site
Commits
72195235
Commit
72195235
authored
Jan 24, 2018
by
Muhammad Usman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loader
parent
68a97e5d
Pipeline
#224
passed with stage
in 0 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
12 deletions
+82
-12
handle-post.php
.../wp-content/plugins/apex_global_lms/admin/handle-post.php
+1
-1
functions.php
WWW_DATA/wp-content/plugins/apex_global_lms/functions.php
+1
-0
lms.css
...A/wp-content/plugins/apex_global_lms/template/css/lms.css
+44
-0
lms.js
...ATA/wp-content/plugins/apex_global_lms/template/js/lms.js
+25
-11
learner-detail.php
...ntent/plugins/apex_global_lms/template/learner-detail.php
+11
-0
No files found.
WWW_DATA/wp-content/plugins/apex_global_lms/admin/handle-post.php
View file @
72195235
...
@@ -26,7 +26,7 @@ function vq_handle_order_post() {
...
@@ -26,7 +26,7 @@ function vq_handle_order_post() {
$price
=
isset
(
$_POST
[
'price'
])
?
$_POST
[
'price'
]
:
''
;
$price
=
isset
(
$_POST
[
'price'
])
?
$_POST
[
'price'
]
:
''
;
$payment_status
=
isset
(
$_POST
[
'payment_status'
])
?
$_POST
[
'payment_status'
]
:
''
;
$payment_status
=
isset
(
$_POST
[
'payment_status'
])
?
$_POST
[
'payment_status'
]
:
''
;
update_post_meta
(
get_the_ID
(),
'
price
'
,
$price
);
update_post_meta
(
get_the_ID
(),
'
total_amount
'
,
$price
);
update_post_meta
(
get_the_ID
(),
'payment_status'
,
$payment_status
);
update_post_meta
(
get_the_ID
(),
'payment_status'
,
$payment_status
);
}
}
...
...
WWW_DATA/wp-content/plugins/apex_global_lms/functions.php
View file @
72195235
...
@@ -130,6 +130,7 @@ function vq_lms_process_order()
...
@@ -130,6 +130,7 @@ function vq_lms_process_order()
$_amount
=
number_format
((
float
)
$totalCost
,
2
,
'.'
,
''
);
// kindly set this to the total amount of the
$_amount
=
number_format
((
float
)
$totalCost
,
2
,
'.'
,
''
);
// kindly set this to the total amount of the
update_post_meta
(
$oid
,
'total_amount'
,
$_amount
);
update_post_meta
(
$oid
,
'total_amount'
,
$_amount
);
update_post_meta
(
$oid
,
'payment_status'
,
'PENDING'
);
// transaction. Set the amount to 2 decimal
// transaction. Set the amount to 2 decimal
// point before generating signature.
// point before generating signature.
...
...
WWW_DATA/wp-content/plugins/apex_global_lms/template/css/lms.css
View file @
72195235
...
@@ -673,4 +673,47 @@
...
@@ -673,4 +673,47 @@
.inquire-box
input
.form-control
,
.inquire-box
select
.form-control
{
.inquire-box
input
.form-control
,
.inquire-box
select
.form-control
{
border-radius
:
0
;
border-radius
:
0
;
padding-left
:
8px
;
padding-left
:
8px
;
}
.bootstrap-iso
.paid
{
text-align
:
center
;
font-size
:
1rem
;
font-weight
:
bold
;
/* padding: 25px; */
background
:
#fff
;
border-radius
:
5px
;
width
:
150px
;
border
:
2px
solid
#0d650d
;
color
:
#0d650d
;
margin
:
20px
auto
auto
;
}
.bootstrap-iso
.loader
{
z-index
:
10
;
margin
:
auto
;
margin-top
:
10%
;
border
:
8px
solid
#f3f3f3
;
border-radius
:
50%
;
border-top
:
8px
solid
#000
;
width
:
120px
;
height
:
120px
;
-webkit-animation
:
spin
2s
linear
infinite
;
/* Safari */
animation
:
spin
2s
linear
infinite
;
}
/* Safari */
@-webkit-keyframes
spin
{
0
%
{
-webkit-transform
:
rotate
(
0deg
);
}
100
%
{
-webkit-transform
:
rotate
(
360deg
);
}
}
@keyframes
spin
{
0
%
{
transform
:
rotate
(
0deg
);
}
100
%
{
transform
:
rotate
(
360deg
);
}
}
.bootstrap-iso
.ldr
{
position
:
absolute
;
z-index
:
10
;
background
:
#fff
;
width
:
100%
;
height
:
100%
;
}
}
\ No newline at end of file
WWW_DATA/wp-content/plugins/apex_global_lms/template/js/lms.js
View file @
72195235
...
@@ -11,13 +11,19 @@
...
@@ -11,13 +11,19 @@
var
addLearnerBtn
=
$
(
"#lms-add-learner"
);
var
addLearnerBtn
=
$
(
"#lms-add-learner"
);
var
learners
=
[];
var
learners
=
[];
var
status
=
'PENDING'
;
var
p
status
=
'PENDING'
;
var
pid
=
-
1
;
var
pid
=
-
1
;
window
.
initializeLearners
=
function
(
obj
,
oid
,
ostatus
)
{
window
.
initializeLearners
=
function
(
obj
,
oid
,
ostatus
)
{
learners
=
obj
;
if
(
obj
===
null
&&
lmsLearners
.
length
){
pid
=
oid
;
initEvents
();
status
=
ostatus
;
addEmptyLearner
();
}
else
if
(
lmsLearners
.
length
){
learners
=
obj
;
pid
=
oid
;
pstatus
=
ostatus
;
}
renderLearnersPage
();
renderLearnersPage
();
};
};
...
@@ -97,7 +103,7 @@
...
@@ -97,7 +103,7 @@
if
(
item
.
courses
.
length
===
0
)
{
if
(
item
.
courses
.
length
===
0
)
{
couseHolder
.
html
(
'<div class="lms-single-course-holder">
\
couseHolder
.
html
(
'<div class="lms-single-course-holder">
\
<span class="name">No course selected.</span>
\
<span class="name">No course selected.</span>
\
<div class="clear"></div>
\
<div class="clear"><
k
/div>
\
</div>'
)
</div>'
)
}
}
item
.
courses
.
forEach
(
function
(
course
)
{
item
.
courses
.
forEach
(
function
(
course
)
{
...
@@ -114,6 +120,19 @@
...
@@ -114,6 +120,19 @@
item
.
element
=
learnerFormElement
;
item
.
element
=
learnerFormElement
;
lmsLearners
.
append
(
learnerFormElement
);
lmsLearners
.
append
(
learnerFormElement
);
})
})
if
(
pstatus
==
'PAID'
)
{
lmsLearners
.
find
(
"input"
).
each
(
function
(
index
,
item
){
$
(
item
).
attr
(
'disabled'
,
true
);
});
$
(
"span.remove"
).
remove
();
$
(
"#lmsProcessPayment"
)
.
after
(
'<div class="paid">PAID</div>'
)
.
attr
(
'disabled'
,
true
);
$
(
"#lmsProcessPayment"
).
remove
();
}
$
(
"#ldr"
).
remove
();
}
}
function
removeCourse
(
courseId
)
{
function
removeCourse
(
courseId
)
{
...
@@ -175,15 +194,10 @@
...
@@ -175,15 +194,10 @@
function
initEvents
()
{
function
initEvents
()
{
addLearnerBtn
.
click
(
function
(
e
)
{
addLearnerBtn
.
click
(
function
(
e
)
{
addEmptyLearner
();
addEmptyLearner
();
renderLearnersPage
();
});
});
}
}
if
(
lmsLearners
.
length
)
{
initEvents
();
addEmptyLearner
();
renderLearnersPage
();
}
lmsCheckoutForm
.
submit
(
function
(
e
)
{
lmsCheckoutForm
.
submit
(
function
(
e
)
{
...
...
WWW_DATA/wp-content/plugins/apex_global_lms/template/learner-detail.php
View file @
72195235
...
@@ -13,6 +13,14 @@ if(count($orderData) > 0 && $orderData != "") {
...
@@ -13,6 +13,14 @@ if(count($orderData) > 0 && $orderData != "") {
initializeLearners(orderData, id, status);
initializeLearners(orderData, id, status);
});
});
</script>"
;
</script>"
;
}
else
{
?>
<script>
jQuery
(
document
).
ready
(
function
()
{
initializeLearners
(
null
);
});
</script>
<?php
}
}
$courses
=
new
WP_Query
(
array
(
'post_type'
=>
'vq_course'
));
$courses
=
new
WP_Query
(
array
(
'post_type'
=>
'vq_course'
));
while
(
have_posts
())
:
while
(
have_posts
())
:
...
@@ -34,6 +42,9 @@ while (have_posts()):
...
@@ -34,6 +42,9 @@ while (have_posts()):
</div>
</div>
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row ldr"
id=
"ldr"
>
<div
class=
"loader"
></div>
</div>
<form
method=
"post"
id=
"lmsCheckoutForm"
>
<form
method=
"post"
id=
"lmsCheckoutForm"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-7"
>
<div
class=
"col-sm-7"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment