fixed payment methods & license

This commit is contained in:
NyanLinHtut
2020-06-10 18:12:15 +06:30
parent f9db23b500
commit f6a35d214f
23 changed files with 187 additions and 202 deletions

View File

@@ -3,15 +3,15 @@
<% date_count = (renewable_date.to_date - Date.today).to_i %>
<% day = pluralize( date_count, 'day' )%>
<% if license_status == 0
<% if license_status == 0
text = 'Your license has expired.'
elsif license_status == 2
text = "Your license will expire in #{day}."
end
%>
<% if license_status == 0 || license_status == 2 %>
<div class="alert alert-danger fade show text-center" role="alert">
<strong style="margin-left: 40px !important"><%= text %></strong>
<div id="license-alert" class="alert alert-danger fade show text-center" role="alert">
<strong style="margin-left: 40px !important"><%= text %></strong>
<%= link_to 'Review License', expire_url, class: 'btn btn-sm btn-primary', style: "margin-left: 20px !important"%>
<button type="button" class="close btn-close" data-dismiss="alert" aria-label="Close" style="padding-top: 5px;">
<span aria-hidden="true" class="text-white">&times;</span>
@@ -22,14 +22,19 @@
<script>
$(document).ready(function() {
divLicnese = $('#license-alert');
navbar = $('.navbar');
leftsidebar = $('#leftsidebar');
if (<%= license_status %> == 1) {
$('.navbar').css("top", 0)
$('section.content').css('margin-top', '0 !important')
navbar.css("top", 0);
leftsidebar.css("top", 0);
$('section.content').css('margin-top', '0 !important');
}
else {
$('.navbar').css("top", '45px')
$('.block-header, .addorder-pages').css('margin-top', '115px')
$('.page-header, .m-top-100').css('margin-top', '100px')
navbar.css("top", divLicnese.outerHeight() + 'px');
leftsidebar.css("top", navbar.outerHeight() + divLicnese.outerHeight() + 'px');
$('.block-header, .addorder-pages').css('margin-top', '115px');
$('.page-header, .m-top-100').css('margin-top', '100px');
$('.alert-danger').css({
'top': 0,
'position': 'fixed',
@@ -38,10 +43,10 @@
})
}
$('.btn-close').on ('click', function() {
$('.navbar').css("top", '0')
navbar.css("top", '0')
$('.block-header, .addorder-pages').css('margin-top', '')
$('.page-header, .m-top-100').css('margin-top', '')
})
})
</script>
</script>