2018-02-20 21:23:49 -05:00
- ci_cd_only = local_assigns.fetch(:ci_cd_only, false)
2019-04-11 11:26:16 -04:00
- import_url = Gitlab::UrlSanitizer.new(f.object.import_url)
2018-02-20 21:23:49 -05:00
2019-04-13 12:00:10 -04:00
.import-url-data
2022-04-26 17:08:42 -04:00
.info-well.prepend-top-20
.well-segment
%ul
%li
= html_escape(_('The repository must be accessible over %{code_open}http://%{code_close}, %{code_open}https://%{code_close} or %{code_open}git://%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
%li= html_escape(_('When using the %{code_open}http://%{code_close} or %{code_open}https://%{code_close} protocols, please provide the exact URL to the repository. HTTP redirects will not be followed.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
%li
= _('If your HTTP repository is not publicly accessible, add your credentials.')
%li
= import_will_timeout_message(ci_cd_only)
%li
= import_svn_message(ci_cd_only)
= render_if_exists 'shared/ci_cd_only_link', ci_cd_only: ci_cd_only
2019-04-11 11:26:16 -04:00
.form-group
= f.label :import_url, class: 'label-bold' do
%span
= _('Git repository URL')
2021-05-26 17:10:49 -04:00
= 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
2022-04-05 14:09:00 -04:00
= render Pajamas::AlertComponent.new(variant: :danger,
2022-06-14 11:08:43 -04:00
alert_options: { class: 'gl-mt-3 js-import-url-error hide' },
2021-07-13 11:08:38 -04:00
dismissible: false,
2022-06-14 11:08:43 -04:00
close_button_options: { class: 'js-close-2fa-enabled-success-alert' }) do |c|
2022-05-05 20:07:56 -04:00
= c.body do
2021-09-30 11:12:24 -04:00
= s_('Import|There is not a valid Git repository at this URL. If your HTTP repository is not publicly accessible, verify your credentials.')
2022-04-26 17:08:42 -04:00
= render_if_exists 'shared/ee/import_form', f: f, ci_cd_only: ci_cd_only
2019-04-13 12:00:10 -04:00
.row
.form-group.col-md-6
2019-04-11 11:26:16 -04:00
= f.label :import_url_user, class: 'label-bold' do
%span
= _('Username (optional)')
2021-04-28 11:09:35 -04:00
= f.text_field :import_url_user, value: import_url.user, class: 'form-control gl-form-input', required: false, autocomplete: 'new-password'
2019-04-11 11:26:16 -04:00
2019-04-13 12:00:10 -04:00
.form-group.col-md-6
2019-04-11 11:26:16 -04:00
= f.label :import_url_password, class: 'label-bold' do
%span
2019-04-13 12:00:10 -04:00
= _('Password (optional)')
2021-04-28 11:09:35 -04:00
= f.password_field :import_url_password, class: 'form-control gl-form-input', required: false, autocomplete: 'new-password'