3 M.form_url.init = function(Y, options) {
4 options.formcallback = M.form_url.callback;
5 if (!M.core_filepicker.instances[options.client_id]) {
6 M.core_filepicker.init(Y, options);
8 Y.on('click', function(e, client_id) {
10 M.core_filepicker.instances[client_id].show();
11 }, '#filepicker-button-js-'+options.client_id, null, options.client_id);
14 M.form_url.callback = function (params) {
15 document.getElementById('id_externalurl').value = params.url;