diff options
Diffstat (limited to 'app/views/shared/_import_form.html.haml')
-rw-r--r-- | app/views/shared/_import_form.html.haml | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/views/shared/_import_form.html.haml b/app/views/shared/_import_form.html.haml index 36d8aab6d53..cf9ee1a5231 100644 --- a/app/views/shared/_import_form.html.haml +++ b/app/views/shared/_import_form.html.haml @@ -6,21 +6,27 @@ = f.label :import_url, class: 'label-bold' do %span = _('Git repository URL') - = f.text_field :import_url, value: import_url.sanitized_url, - autocomplete: 'off', class: 'form-control', placeholder: 'https://gitlab.company.com/group/project.git', required: true + = f.text_field :import_url, + value: import_url.sanitized_url, + autocomplete: 'off', + class: 'form-control gl-form-input', + placeholder: 'https://gitlab.company.com/group/project.git', + required: true, + pattern: '(?:git|https?):\/\/.*/.*\.git$', + title: _('Please provide a valid URL ending with .git') .row .form-group.col-md-6 = f.label :import_url_user, class: 'label-bold' do %span = _('Username (optional)') - = f.text_field :import_url_user, value: import_url.user, class: 'form-control', required: false, autocomplete: 'new-password' + = f.text_field :import_url_user, value: import_url.user, class: 'form-control gl-form-input', required: false, autocomplete: 'new-password' .form-group.col-md-6 = f.label :import_url_password, class: 'label-bold' do %span = _('Password (optional)') - = f.password_field :import_url_password, class: 'form-control', required: false, autocomplete: 'new-password' + = f.password_field :import_url_password, class: 'form-control gl-form-input', required: false, autocomplete: 'new-password' .info-well.prepend-top-20 .well-segment |