Skip to content

Commit

Permalink
Add bug hyperlink validation. Fixes #1147
Browse files Browse the repository at this point in the history
  • Loading branch information
RMadjev authored and atodorov committed Oct 3, 2019
1 parent 6f42f65 commit 2c81c3f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tcms/static/js/testrun_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,11 +757,16 @@ function initialize_addlink_dialog() {
},
buttons: {
"OK": function() {
var name = jQ('#testlog_name').attr('value');
var url = jQ('#testlog_url').attr('value');
var is_defect = $('#is_defect').is(':checked');
var update_tracker = $('#update_tracker').is(':checked');
var case_id = dialog_p.dialog('option', 'case_id');
var name = jQ('#testlog_name').attr('value'),
url = jQ('#testlog_url').attr('value'),
is_defect = $('#is_defect').is(':checked'),
update_tracker = $('#update_tracker').is(':checked'),
case_id = dialog_p.dialog('option', 'case_id');

//check if url is valid
if (url.length === 0 || url.indexOf('://') === -1) {
return;
}

dialog_p.dialog('close');

Expand Down

0 comments on commit 2c81c3f

Please sign in to comment.