| | 6371 | $currentcomponent->addjsfunc('onsubmit()', " |
|---|
| | 6372 | var exten = $('#extension').val(); |
|---|
| | 6373 | var ajax_result = true; |
|---|
| | 6374 | $('#error').remove(); |
|---|
| | 6375 | $.ajax({ |
|---|
| | 6376 | type: 'POST', |
|---|
| | 6377 | url: 'config.php', |
|---|
| | 6378 | data: 'handler=api&function=framework_get_conflict_url_helper&args=' + exten, |
|---|
| | 6379 | dataType: 'json', |
|---|
| | 6380 | cache: false, |
|---|
| | 6381 | async: false, |
|---|
| | 6382 | success: function(data, textStatus, XMLHttpRequest) { |
|---|
| | 6383 | if (data.length !== 0) { |
|---|
| | 6384 | $('#title').after('<div id=\"error\"><h5>"._("Conflicting Extensions")."</h5>' + data + '</div>'); |
|---|
| | 6385 | ajax_result = false; |
|---|
| | 6386 | } |
|---|
| | 6387 | }, |
|---|
| | 6388 | error: function(data) { |
|---|
| | 6389 | console.log('an error was recevied: ' + data); |
|---|
| | 6390 | // TODO: Should we stop the submital and do something here? |
|---|
| | 6391 | } |
|---|
| | 6392 | }); |
|---|
| | 6393 | if (!ajax_result) { |
|---|
| | 6394 | alert('". _("Extension number conflict, please choose another.") . "'); |
|---|
| | 6395 | $('#extension').focus(); |
|---|
| | 6396 | return false; |
|---|
| | 6397 | }", 9); |
|---|