2022-02-10 21:15:20 +00:00
- can_edit_max_page_size=can?(current_user, :update_max_pages_size)
- can_enforce_https_only=Gitlab.config.pages.external_http || Gitlab.config.pages.external_https
- return unless can_edit_max_page_size || can_enforce_https_only
2020-07-27 12:09:50 +00:00
= form_for @project, url: project_pages_path(@project), html: { class: 'inline', title: pages_https_only_title } do |f|
2022-02-10 21:15:20 +00:00
- if can_edit_max_page_size
2021-07-19 15:09:40 +00:00
= render_if_exists 'shared/pages/max_pages_size_input', form: f
2019-12-30 06:08:13 +00:00
2022-02-10 21:15:20 +00:00
- if can_enforce_https_only
2019-12-30 06:08:13 +00:00
.form-group
.form-check
= f.check_box :pages_https_only, class: 'form-check-input', disabled: pages_https_only_disabled?
= f.label :pages_https_only, class: pages_https_only_label_class do
%strong
= s_('GitLabPages|Force HTTPS (requires valid certificates)')
2021-04-08 09:09:04 +00:00
- docs_link_start = "<a href='#{help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index', anchor: 'force-https-for-gitlab-pages-websites')}' target='_blank' rel='noopener noreferrer'>".html_safe
- link_end = '</a>'.html_safe
%p
= s_("GitLabPages|When enabled, all attempts to visit your website through HTTP are automatically redirected to HTTPS using a response with status code 301. Requires a valid certificate for all domains. %{docs_link_start}Learn more.%{link_end}").html_safe % { docs_link_start: docs_link_start, link_end: link_end }
2019-12-30 06:08:13 +00:00
2022-02-10 21:15:20 +00:00
.gl-mt-3
= f.submit s_('GitLabPages|Save changes'), class: 'btn btn-confirm gl-button'