update license
This commit is contained in:
@@ -349,6 +349,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if current_user.role == 'administrator' || current_user.role == 'manager' || current_user.role == 'account' %>
|
||||
<% if isMobile.include? "Mobile" %>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 ">
|
||||
@@ -371,6 +372,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -10,34 +10,34 @@
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
|
||||
|
||||
<style>
|
||||
.page {
|
||||
padding-left: 0;
|
||||
max-width: 80%;
|
||||
margin: 2% auto;
|
||||
overflow-x: hidden;
|
||||
overflow-x: hidden;
|
||||
background-color: #2790a5;
|
||||
}
|
||||
|
||||
.page .box {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="page">
|
||||
<% flash.each do |type, message| %>
|
||||
<% if type == "notice"
|
||||
<% if type == "notice"
|
||||
color = "alert-success"
|
||||
elsif type == "error"
|
||||
color = "alert-danger"
|
||||
else
|
||||
color = "bg-black"
|
||||
end %>
|
||||
|
||||
|
||||
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
|
||||
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
|
||||
</p>
|
||||
|
||||
@@ -2,16 +2,11 @@
|
||||
<% date_count = (renewable_date.to_date - Date.today).to_i %>
|
||||
<% day = pluralize( date_count, 'day' )%>
|
||||
|
||||
<% if @license_status == 0
|
||||
text = 'Your license has been expired.'
|
||||
elsif @license_status == 2
|
||||
if date_count == 0
|
||||
text = "Your license will expire in tomorrow."
|
||||
else
|
||||
text = "Your license will expire in #{day}."
|
||||
end
|
||||
end
|
||||
%>
|
||||
<% if @license_status == 0 %>
|
||||
<% text = 'Your license has been expired.' %>
|
||||
<% else %>
|
||||
<% text = "Your license will expire in #{day}." %>
|
||||
<% end %>
|
||||
<style>
|
||||
.centered {
|
||||
position: fixed;
|
||||
@@ -29,13 +24,16 @@
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="card col-sm-8 centered">
|
||||
<div class="card-block">
|
||||
<h3 class="pt-2 d-inline">Review Your License</h3>
|
||||
<%= link_to origami_dashboard_url do %>
|
||||
<img src="/image/logo.png" style="margin-left: 25pc; width: 140px">
|
||||
<img src="/image/logo.png" class="mr-4 mt-2 float-right" style="width: 150px">
|
||||
<% end %>
|
||||
<p class="m-t--30" id="warning_text" style="font-weight: bold; font-size: 18px;"></p><br>
|
||||
<h3 class="mt-4 mb-4">Review Your License</h3>
|
||||
<% if flash[:message].present? %>
|
||||
<p class="text-danger" style="font-weight: bold; font-size: 18px;"><%= flash[:message] %></p>
|
||||
<% end %>
|
||||
<br>
|
||||
<% if text %>
|
||||
<h6 class="mb-2 "><%= text %></h6><br>
|
||||
<h6 class="mb-2"><%= text %></h6><br>
|
||||
<% end %>
|
||||
<h6 class="mb-2">Call Center Phone No: <a href="tel:+6494461709">+959 445 665 311</a></h6>
|
||||
<br>
|
||||
@@ -59,11 +57,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="col-md-12" style="padding-bottom: 20px;">
|
||||
<button type="button" class="btn btn-primary btn-lg float-right m-l-10 m-r-5" id="review_license">
|
||||
Review License
|
||||
</button>
|
||||
<%= link_to 'Go To Home', origami_dashboard_url, class: 'btn btn-default btn-lg float-right', id: 'go_to_home' %>
|
||||
<div class="col-md-12 mb-2">
|
||||
<%= form_with url: review_license_url, local: true do %>
|
||||
<%= submit_tag 'Review Licese', class: 'btn btn-primary btn-lg float-right m-l-10 m-r-5' %>
|
||||
<%= link_to 'Go To Home', root_url, class: 'btn btn-default btn-lg float-right' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2"></div>
|
||||
@@ -72,28 +70,9 @@
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.alert-danger, .navbar, #warning_text').hide()
|
||||
$('.alert-danger, .navbar').hide()
|
||||
$('html, section').css('background-color', '#61B8C9')
|
||||
// $('html').css('overflow-x', 'hidden')
|
||||
$('section.content').css('margin', '70px 0 0 0')
|
||||
|
||||
$('#review_license').on ('click', function() {
|
||||
$.ajax({
|
||||
url: '/renew',
|
||||
type: 'POST',
|
||||
success: function(res) {
|
||||
if (res.message.length != 0) {
|
||||
if (res.status == 1) {
|
||||
color = 'text-success'
|
||||
} else if (res.status == 2) {
|
||||
color = 'text-danger'
|
||||
} else {
|
||||
color = 'text-danger'
|
||||
$('#go_to_home').hide()
|
||||
}
|
||||
$('#warning_text').addClass(color).text(res.message).show()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@@ -16,7 +16,7 @@
|
||||
<% if license_status == 0 || license_status == 2 %>
|
||||
<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"%>
|
||||
<%= link_to 'Review License', review_license_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">×</span>
|
||||
</button>
|
||||
@@ -30,8 +30,8 @@
|
||||
navbar = $('.navbar');
|
||||
leftsidebar = $('#leftsidebar');
|
||||
if (<%= license_status %> == 1) {
|
||||
navbar.css("top", 0);
|
||||
leftsidebar.css("top", 0);
|
||||
navbar.css("top", "");
|
||||
leftsidebar.css("top", "");
|
||||
$('section.content').css('margin-top', '0 !important');
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user