owncloud/core

View on GitHub
settings/js/panels/license.js

Summary

Maintainability
A
0 mins
Test Coverage
$(document).ready(function() {
    $('#license_input_button').click(function () {
        var license = $('#license_input_text').val();

        if (license !== '') {
            $.post(OC.generateUrl('/license/license'), {
                licenseString: license
            }).done(function () {
                location.reload();
            });
        }
    });

    $('#license_remove_button').click(function () {
            $.ajax({
                url: OC.generateUrl('/license/license'),
                type: 'DELETE',
            }).done(function () {
                location.reload();
            });
    });
});