mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-22 22:52:35 +03:00
Added csrfToken to GlobalVariables definition.
This commit is contained in:
parent
d88c138d2d
commit
ad8c9b6522
9 changed files with 12 additions and 0 deletions
|
@ -92,6 +92,7 @@
|
|||
// ------------------------------------------------------------ ?>
|
||||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken' : <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'appointmentData' : <?php echo json_encode($appointment_data); ?>,
|
||||
'providerData' : <?php echo json_encode($provider_data); ?>,
|
||||
'serviceData' : <?php echo json_encode($service_data); ?>,
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken' : <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'availableProviders' : <?php echo json_encode($available_providers); ?>,
|
||||
'availableServices' : <?php echo json_encode($available_services); ?>,
|
||||
'baseUrl' : <?php echo '"' . $base_url . '"'; ?>,
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'availableProviders': <?php echo json_encode($available_providers); ?>,
|
||||
'availableServices': <?php echo json_encode($available_services); ?>,
|
||||
'baseUrl': <?php echo '"' . $base_url . '"'; ?>,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'baseUrl': <?php echo '"' . $base_url . '"'; ?>,
|
||||
'services': <?php echo json_encode($services); ?>,
|
||||
'categories': <?php echo json_encode($categories); ?>,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'baseUrl': <?php echo '"' . $base_url . '"'; ?>,
|
||||
'userSlug': <?php echo '"' . $role_slug . '"'; ?>,
|
||||
'settings': {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'baseUrl': <?php echo '"' . $base_url . '"'; ?>,
|
||||
'admins': <?php echo json_encode($admins); ?>,
|
||||
'providers': <?php echo json_encode($providers); ?>,
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'baseUrl': <?php echo '"' . $base_url . '"'; ?>
|
||||
};
|
||||
|
||||
|
@ -60,6 +61,7 @@
|
|||
|
||||
var postUrl = GlobalVariables.baseUrl + '/index.php/appointments/ajax_install';
|
||||
var postData = {
|
||||
'csrfToken': GlobalVariables.csrfToken,
|
||||
'admin': JSON.stringify(getAdminData()),
|
||||
'company': JSON.stringify(getCompanyData())
|
||||
};
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var GlobalVariables = {
|
||||
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'baseUrl': <?php echo '"' . $base_url . '"'; ?>,
|
||||
'AJAX_SUCCESS': 'SUCCESS',
|
||||
'AJAX_FAILURE': 'FAILURE'
|
||||
|
@ -78,6 +79,7 @@
|
|||
|
||||
var postUrl = GlobalVariables.baseUrl + '/index.php/user/ajax_forgot_password';
|
||||
var postData = {
|
||||
'csrfToken': GlobalVariables.csrfToken,
|
||||
'username': $('#username').val(),
|
||||
'email': $('#email').val()
|
||||
};
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'baseUrl': <?php echo '"' . $base_url . '"'; ?>,
|
||||
'destUrl': <?php echo '"' . $dest_url . '"'; ?>,
|
||||
'AJAX_SUCCESS': 'SUCCESS',
|
||||
|
@ -87,6 +88,7 @@
|
|||
|
||||
var postUrl = GlobalVariables.baseUrl + '/index.php/user/ajax_check_login';
|
||||
var postData = {
|
||||
'csrfToken': GlobalVariables.csrfToken,
|
||||
'username': $('#username').val(),
|
||||
'password': $('#password').val()
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue