mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Check for valid time tracker URL
This commit is contained in:
parent
45ab98c62e
commit
e812234314
@ -2772,6 +2772,7 @@ $LANG = array(
|
||||
'slack_incoming_webhooks' => 'Slack incoming webhooks',
|
||||
'accept' => 'Accept',
|
||||
'accepted_terms' => 'Successfully accepted the latest terms of service',
|
||||
'invalid_url' => 'Invalid URL',
|
||||
|
||||
);
|
||||
|
||||
|
@ -146,13 +146,14 @@
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Save',
|
||||
}).then(function (value) {
|
||||
if (!value) {
|
||||
if (! value || value.indexOf('http') !== 0) {
|
||||
swal("{{ trans('texts.invalid_url') }}")
|
||||
return;
|
||||
}
|
||||
value = value.replace(/\/+$/, '') + '/time_tracker';
|
||||
localStorage.setItem('last:time_tracker:url', value);
|
||||
location.reload();
|
||||
})
|
||||
}).catch(swal.noop);
|
||||
}
|
||||
@endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user