Skip to content

Commit

Permalink
Merge pull request #1557 from ZitaNemeckova/add_git_url
Browse files Browse the repository at this point in the history
Add git protocol to URL for Ansible repo
  • Loading branch information
Dan Clarizio authored Jun 16, 2017
2 parents 5eaf744 + 68a176d commit bcf147f
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.match(/^[-\w:.]+@.*:/);
};
}
}
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:// or https://) or be a valid SSH path (user@server:path)")
.form-group
%label.col-md-2.control-label
= _('SCM credentials')
Expand Down

0 comments on commit bcf147f

Please sign in to comment.