Skip to content

Commit

Permalink
Add git protocol to URL for Ansible repo
Browse files Browse the repository at this point in the history
Allow git protocol as valid input
  • Loading branch information
ZitaNemeckova committed Jun 16, 2017
1 parent deef2b6 commit dac0a63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/directives/url_validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ManageIQ.angular.app.directive('urlValidation', function() {
};

var validUrl = function(s) {
return s.substring(0, 8) === 'https://' || s.substring(0, 7) === 'http://';
return s.substring(0, 8) === 'https://' || s.substring(0, 7) === 'http://' || s.substring(0, 4) === 'git@';
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/ansible_repository/_repository_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
%span.help-block{"ng-show" => "angularForm.scm_url.$error.required"}
= _("Required")
%span.help-block{"ng-show" => "angularForm.scm_url.$error.urlValidation"}
= _("URL must include a protocol (http:// or https://)")
= _("URL must include a protocol (http://, https:// or git@)")
.form-group
%label.col-md-2.control-label
= _('SCM credentials')
Expand Down

0 comments on commit dac0a63

Please sign in to comment.