2018-03-27 19:54:05 +05:30
- ci_cd_only = local_assigns.fetch(:ci_cd_only, false)
2019-07-31 22:56:46 +05:30
- import_url = Gitlab::UrlSanitizer.new(f.object.import_url)
2018-03-27 19:54:05 +05:30
2019-07-31 22:56:46 +05:30
.import-url-data
.form-group
= f.label :import_url, class: 'label-bold' do
%span
= _('Git repository URL')
2021-09-04 01:27:46 +05:30
= 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
2021-09-30 23:02:18 +05:30
= render 'shared/global_alert',
2021-11-18 22:05:49 +05:30
variant: :danger,
alert_class: 'gl-mt-3 js-import-url-error hide',
2021-09-30 23:02:18 +05:30
dismissible: false,
close_button_class: 'js-close-2fa-enabled-success-alert' do
.gl-alert-body
2021-11-18 22:05:49 +05:30
= s_('Import|There is not a valid Git repository at this URL. If your HTTP repository is not publicly accessible, verify your credentials.')
2019-07-31 22:56:46 +05:30
.row
.form-group.col-md-6
= f.label :import_url_user, class: 'label-bold' do
%span
= _('Username (optional)')
2021-06-08 01:23:25 +05:30
= f.text_field :import_url_user, value: import_url.user, class: 'form-control gl-form-input', required: false, autocomplete: 'new-password'
2019-07-31 22:56:46 +05:30
.form-group.col-md-6
= f.label :import_url_password, class: 'label-bold' do
%span
= _('Password (optional)')
2021-06-08 01:23:25 +05:30
= f.password_field :import_url_password, class: 'form-control gl-form-input', required: false, autocomplete: 'new-password'
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
.info-well.prepend-top-20
.well-segment
%ul
%li
2020-10-24 23:57:45 +05:30
= 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 }
2018-11-08 19:23:39 +05:30
%li
2019-07-31 22:56:46 +05:30
= _('If your HTTP repository is not publicly accessible, add your credentials.')
2018-11-08 19:23:39 +05:30
%li
= import_will_timeout_message(ci_cd_only)
%li
= import_svn_message(ci_cd_only)
2019-09-04 21:01:54 +05:30
= render_if_exists 'shared/ci_cd_only_link', ci_cd_only: ci_cd_only
= render_if_exists 'shared/ee/import_form', f: f, ci_cd_only: ci_cd_only