Commit 848fe44b authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '343553-adjust-license-upload-layout' into 'master'

Adjust license upload page style

See merge request gitlab-org/gitlab!77670
parents 6601ab2e a224cdf8
...@@ -11,6 +11,7 @@ class Admin::LicensesController < Admin::ApplicationController ...@@ -11,6 +11,7 @@ class Admin::LicensesController < Admin::ApplicationController
feature_category :license feature_category :license
def new def new
@content_class = 'limit-container-width' unless fluid_layout
@license ||= License.new(data: params[:trial_key]) @license ||= License.new(data: params[:trial_key])
end end
......
...@@ -25,38 +25,35 @@ ...@@ -25,38 +25,35 @@
.form-group.row .form-group
.col-sm-2 .form-check
.col-sm-10 = radio_button_tag :license_type, :file, @license.data.blank?, class: 'form-check-input'
.form-check = label_tag :license_type_file, class: 'form-check-label' do
= radio_button_tag :license_type, :file, @license.data.blank?, class: 'form-check-input' .option-title
= label_tag :license_type_file, class: 'form-check-label' do = _('Upload %{file_name} file').html_safe % { file_name: '<code>.gitlab-license</code>'.html_safe }
.option-title .form-group.license-file.gl-mt-4
Upload <code>.gitlab-license</code> file = f.label :data_file, _('License file'), class: 'gl-sr-only'
.form-check
= radio_button_tag :license_type, :key, @license.data.present?, class: 'form-check-input', data: { qa_selector: 'license_type_key_radio' }
= label_tag :license_type_key, class: 'form-check-label' do
.option-title
Enter license key
.form-group.row.license-file
.col-sm-2.col-form-label
= f.label :data_file, "License file"
.col-sm-10
= f.file_field :data_file, accept: ".gitlab-license,.gitlab_license,.txt", class: "form-control" = f.file_field :data_file, accept: ".gitlab-license,.gitlab_license,.txt", class: "form-control"
.form-check.gl-my-4
.form-group.row.license-key.hidden = radio_button_tag :license_type, :key, @license.data.present?, class: 'form-check-input', data: { qa_selector: 'license_type_key_radio' }
.col-sm-2.col-form-label = label_tag :license_type_key, class: 'form-check-label' do
= f.label :data, "License key" .option-title
.col-sm-10 = _('Enter license key')
.form-group.license-key.hidden
= f.label :data, _('License key'), class: 'gl-sr-only'
= f.text_area :data, class: "form-control license-key-field", data: { qa_selector: 'license_key_field' }, rows: 20 = f.text_area :data, class: "form-control license-key-field", data: { qa_selector: 'license_key_field' }, rows: 20
.form-group.row
.col-sm-2
.col-sm-10
= label_tag :accept_eula, nil, class: 'form-check-label' do %hr
= check_box_tag :accept_eula, nil, false, data: { qa_selector: 'accept_eula_checkbox' }
= _('Unless otherwise agreed to in writing with GitLab, by clicking "Upload License" you agree that your use of GitLab Software is subject to the %{eula_link_start}Terms of Service%{eula_link_end}.').html_safe % { eula_link_start: eula_link_start, eula_url: eula_url, eula_link_end: '</a>'.html_safe } %h4.gl-font-base= _("Terms of service")
.form-group
= label_tag :accept_eula, nil, class: 'form-check-label' do
= check_box_tag :accept_eula, nil, false, data: { qa_selector: 'accept_eula_checkbox' }
= _('Unless otherwise agreed to in writing with GitLab, by clicking "Upload License" you agree that your use of GitLab Software is subject to the %{eula_link_start}Terms of Service%{eula_link_end}.').html_safe % { eula_link_start: eula_link_start, eula_url: eula_url, eula_link_end: '</a>'.html_safe }
.form-actions .form-actions
= f.submit 'Upload License', class: 'gl-button btn btn-confirm', data: { qa_selector: 'license_upload_button' }, disabled: true, id: 'js-upload-license' = f.submit 'Upload License', class: 'gl-button btn btn-confirm', data: { qa_selector: 'license_upload_button' }, disabled: true, id: 'js-upload-license'
...@@ -13405,6 +13405,9 @@ msgstr "" ...@@ -13405,6 +13405,9 @@ msgstr ""
msgid "Enter in your Phabricator Server URL and personal access token below" msgid "Enter in your Phabricator Server URL and personal access token below"
msgstr "" msgstr ""
msgid "Enter license key"
msgstr ""
msgid "Enter merge request URLs" msgid "Enter merge request URLs"
msgstr "" msgstr ""
...@@ -21100,6 +21103,9 @@ msgstr "" ...@@ -21100,6 +21103,9 @@ msgstr ""
msgid "License file" msgid "License file"
msgstr "" msgstr ""
msgid "License key"
msgstr ""
msgid "License overview" msgid "License overview"
msgstr "" msgstr ""
...@@ -34912,6 +34918,9 @@ msgstr "" ...@@ -34912,6 +34918,9 @@ msgstr ""
msgid "Terms of Service and Privacy Policy" msgid "Terms of Service and Privacy Policy"
msgstr "" msgstr ""
msgid "Terms of service"
msgstr ""
msgid "Terraform" msgid "Terraform"
msgstr "" msgstr ""
...@@ -38180,6 +38189,9 @@ msgstr "" ...@@ -38180,6 +38189,9 @@ msgstr ""
msgid "Upload" msgid "Upload"
msgstr "" msgstr ""
msgid "Upload %{file_name} file"
msgstr ""
msgid "Upload CSV file" msgid "Upload CSV file"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment