AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.216.192
Web Server : Apache
System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : lrsys ( 1015)
PHP Version : 5.6.40
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lrsys/www/lrsys_apps/leve/application/plugins/module_forms/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/www/lrsys_apps/leve/application/plugins/module_forms/assets/js//webservices.js
function modalAddFields() {

	var _url = $('#_url').val();
	var $modal = $('#ajax-modal');
	var addField = $('#btn-add-webservice-field');

	addField.on('click', function (event) {
		event.preventDefault();

		$('body').modalmanager('loading');
		setTimeout(function () {
			$modal.load(_url + 'module_forms/webservicesfields/modalAddFields', '', function () {
				$modal.modal({
					width: "600"
				});

				select2Webservices();

				$('body').on('click', '#btn-add-webservice-fields', function () {
					$('#form-add-webservice-fields').submit();
                })
			});
		}, 500);
	});
}

function modalEditFields() {

    var _url = $('#_url').val();
    var $modal = $('#ajax-modal');
    var addField = $('.btn-edit-webservice-field');

    addField.on('click', function (event) {
        event.preventDefault();

        var _id = $(this).data('id');

        $('body').modalmanager('loading');
        setTimeout(function () {
            $modal.load(_url + 'module_forms/webservicesfields/modalEditFields/' + _id, '', function () {
                $modal.modal({
                    width: "600"
                });

                select2Webservices();

                $('body').on('click', '#btn-add-webservice-fields', function () {
                    $('#form-add-webservice-fields')
						.attr('action', _url + 'module_forms/webservicesfields/update')
						.submit();
                })
            });
        }, 500);
    });
}

function select2Webservices() {
	$('#webservice_id').select2({
		theme: "bootstrap",
		ajax: {
			url: $('#_url').val() + "module_forms/webservices/getWebservices",
			dataType: "json",
			delay: 150,
			method: "POST",
			data: function (params) {
				var queryParams = {
					term: params.term
				};

				return queryParams;
			},
			processResults: function (data) {
				return {
					results: $.map(data, function (item) {
						return {
							text: item.title,
							id: item.id
						}
					})
				}
			},
			cache: true
		}
	});
}

function confirmDelete() {
	$('.delete-webservice, .delete-webservice-field').on('click', function (event) {
		event.preventDefault();

		var href = $(this).attr('href');

		var dialog = bootbox.confirm({
			message: _L['are_you_sure'],
			buttons: {
				confirm: {
					label: _L['Yes'],
					className: "btn-primary"
				},
				cancel: {
					label: _L['No'],
					className: "btn-danger"
				}
			},
			callback: function(result){
				if(result == true) {
					window.location.href = href;
				}
				else {
					dialog.modal('hide');
					return false;
				}
			}
		});

	});
}

function tooltip() {
	$('body').find('[data-toggle="tooltip"]').tooltip();
}

$(function() {
	modalAddFields();
	modalEditFields();
	confirmDelete();
	tooltip();
});

Anon7 - 2022
AnonSec Team