OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#43263] The space between the form and the buttons on the 2nd and 3rd step of Nextcloud OAuth settings is not correct
Andreas Pfohlf44c303ede18
diff --git a/modules/storages/app/views/storages/admin/storages/_form.html.erb b/modules/storages/app/views/storages/admin/storages/_form.html.erbindex 026966fb646..f365dfaded2 100644--- a/modules/storages/app/views/storages/admin/storages/_form.html.erb+++ b/modules/storages/app/views/storages/admin/storages/_form.html.erb@@ -30,36 +30,34 @@ See COPYRIGHT and LICENSE files for more details.<!-- Included form for create and edit operations, please see the controller for comments --><%= error_messages_for_contract @object, @errors %>-<section class="form--section">- <fieldset class="form--fieldset">- <legend class="form--fieldset-legend"><%= I18n.t(:label_general) %></legend>- <div class="form--field -required">- <%= f.select :provider_type,- ::Storages::Storage::PROVIDER_TYPES.map { |provider_type| [I18n.t("storages.provider_types.#{provider_type}.name"), provider_type] },- {- selected: ::Storages::Storage::PROVIDER_TYPE_NEXTCLOUD,- container_class: '-slim'- },- {- disabled: @object.persisted? || ::Storages::Storage::PROVIDER_TYPES.count == 1- } %>- <span class="form--field-instructions"><%= t('storages.instructions.type') %> <%= t('storages.instructions.type_link_text') %></span>- </div>- <div class="form--field -required">- <%= f.text_field :name,- required: true,- placeholder: I18n.t('storages.provider_types.nextcloud.name_placeholder'),- container_class: '-slim' %>- <span class="form--field-instructions"><%= t('storages.instructions.name') %></span>- </div>- <div class="form--field -required">- <%= f.text_field :host,- label: t('storages.label_host'),- type: :url,- required: true,- pattern: ".{1,255}",- placeholder: "https://my-file-storage.com", container_class: '-wide' %>- <span class="form--field-instructions"><%= t('storages.instructions.host') %></span>- </div>- </fieldset>-</section>+<fieldset class="form--fieldset">+ <legend class="form--fieldset-legend"><%= I18n.t(:label_general) %></legend>+ <div class="form--field -required">+ <%= f.select :provider_type,+ ::Storages::Storage::PROVIDER_TYPES.map { |provider_type| [I18n.t("storages.provider_types.#{provider_type}.name"), provider_type] },+ {+ selected: ::Storages::Storage::PROVIDER_TYPE_NEXTCLOUD,+ container_class: '-slim'+ },+ {+ disabled: @object.persisted? || ::Storages::Storage::PROVIDER_TYPES.count == 1+ } %>+ <span class="form--field-instructions"><%= t('storages.instructions.type') %> <%= t('storages.instructions.type_link_text') %></span>+ </div>+ <div class="form--field -required">+ <%= f.text_field :name,+ required: true,+ placeholder: I18n.t('storages.provider_types.nextcloud.name_placeholder'),+ container_class: '-slim' %>+ <span class="form--field-instructions"><%= t('storages.instructions.name') %></span>+ </div>+ <div class="form--field -required">+ <%= f.text_field :host,+ label: t('storages.label_host'),+ type: :url,+ required: true,+ pattern: ".{1,255}",+ placeholder: "https://my-file-storage.com", container_class: '-wide' %>+ <span class="form--field-instructions"><%= t('storages.instructions.host') %></span>+ </div>+</fieldset>diff --git a/modules/storages/app/views/storages/admin/storages/edit.html.erb b/modules/storages/app/views/storages/admin/storages/edit.html.erbindex f467efdf2ff..6f681051642 100644--- a/modules/storages/app/views/storages/admin/storages/edit.html.erb+++ b/modules/storages/app/views/storages/admin/storages/edit.html.erb@@ -2,7 +2,7 @@<!-- We want to hide client_secret from the user while allowing the user to edit the other attributes --><% content_for :header_tags do %>- <meta name="required_script" content="storage_form" />+ <meta name="required_script" content="storage_form"/><% end %><% html_title t(:label_administration), t("project_module_storages"), t('label_edit_x', x: @object.name) %>@@ -15,57 +15,53 @@<% end %><% if @object.oauth_application %>- <section class="form--section">- <fieldset class="form--fieldset">- <legend class="form--fieldset-legend">OpenProject <%= t(:'storages.label_oauth_application_details') %></legend>- <div class="attributes-key-value">- <div class="attributes-key-value--key">OpenProject <%= t(:'storages.label_oauth_client_id') %></div>- <div class="attributes-key-value--value-container">- <div class="attributes-key-value--value -text">- <span><%= @object.oauth_application.uid %></span>- </div>- </div>- <div class="attributes-key-value--key">OpenProject <%= t(:'storages.label_oauth_client_secret') %></div>- <div class="attributes-key-value--value-container">- <div class="attributes-key-value--value -text">- <span>●●●●●●●●●●●●●●●●</span>- </div>- </div>+ <fieldset class="form--fieldset">+ <legend class="form--fieldset-legend">OpenProject <%= t(:'storages.label_oauth_application_details') %></legend>+ <div class="attributes-key-value">+ <div class="attributes-key-value--key">OpenProject <%= t(:'storages.label_oauth_client_id') %></div>+ <div class="attributes-key-value--value-container">+ <div class="attributes-key-value--value -text">+ <span><%= @object.oauth_application.uid %></span>+ </div>+ </div>+ <div class="attributes-key-value--key">OpenProject <%= t(:'storages.label_oauth_client_secret') %></div>+ <div class="attributes-key-value--value-container">+ <div class="attributes-key-value--value -text">+ <span>●●●●●●●●●●●●●●●●</span></div>+ </div>+ </div>- <%= link_to(t("storages.buttons.replace_openproject_oauth"),- replace_oauth_application_admin_settings_storage_path(@object),- method: :delete,- data: { confirm: t(:'storages.confirm_replace_oauth_application')},- class: 'button -with-icon icon-reload' ) %>- </fieldset>- </section>+ <%= link_to(t("storages.buttons.replace_openproject_oauth"),+ replace_oauth_application_admin_settings_storage_path(@object),+ method: :delete,+ data: { confirm: t(:'storages.confirm_replace_oauth_application') },+ class: 'button -with-icon icon-reload') %>+ </fieldset><% end %>-<section class="form--section">- <fieldset class="form--fieldset">- <legend class="form--fieldset-legend"><%= t("storages.provider_types.#{@object.provider_type}.name") %> <%= t(:'storages.label_oauth_client_details') %></legend>- <% if @object.oauth_client %>- <div class="attributes-key-value">- <div class="attributes-key-value--key"><%= t("storages.provider_types.#{@object.provider_type}.name") %> <%= t(:'storages.label_oauth_client_id') %></div>- <div class="attributes-key-value--value-container">- <div class="attributes-key-value--value -text">- <span><%= @object.oauth_client.client_id %></span>- </div>+<fieldset class="form--fieldset">+ <legend class="form--fieldset-legend"><%= t("storages.provider_types.#{@object.provider_type}.name") %> <%= t(:'storages.label_oauth_client_details') %></legend>+ <% if @object.oauth_client %>+ <div class="attributes-key-value">+ <div class="attributes-key-value--key"><%= t("storages.provider_types.#{@object.provider_type}.name") %> <%= t(:'storages.label_oauth_client_id') %></div>+ <div class="attributes-key-value--value-container">+ <div class="attributes-key-value--value -text">+ <span><%= @object.oauth_client.client_id %></span></div>- <div class="attributes-key-value--key"><%= t("storages.provider_types.#{@object.provider_type}.name") %> <%= t(:'storages.label_oauth_client_secret') %></div>- <div class="attributes-key-value--value-container">- <div class="attributes-key-value--value -text">- <span><%= short_secret(@object.oauth_client.client_secret) %></span>- </div>+ </div>+ <div class="attributes-key-value--key"><%= t("storages.provider_types.#{@object.provider_type}.name") %> <%= t(:'storages.label_oauth_client_secret') %></div>+ <div class="attributes-key-value--value-container">+ <div class="attributes-key-value--value -text">+ <span><%= short_secret(@object.oauth_client.client_secret) %></span></div></div>- <%= link_to(t("storages.buttons.replace_provider_type_oauth", provider_type: t("storages.provider_types.#{@object.provider_type}.name")),- new_admin_settings_storage_oauth_client_path(@object),- data: { confirm: t(:'storages.confirm_replace_oauth_client')},- class: 'button -with-icon icon-reload' ) %>- <% else %>- <%= link_to(t("js.label_create"), new_admin_settings_storage_oauth_client_path(@object), class: 'button -with-icon icon-add') %>- <% end %>- </fieldset>-</section>+ </div>+ <%= link_to(t("storages.buttons.replace_provider_type_oauth", provider_type: t("storages.provider_types.#{@object.provider_type}.name")),+ new_admin_settings_storage_oauth_client_path(@object),+ data: { confirm: t(:'storages.confirm_replace_oauth_client') },+ class: 'button -with-icon icon-reload') %>+ <% else %>+ <%= link_to(t("js.label_create"), new_admin_settings_storage_oauth_client_path(@object), class: 'button -with-icon icon-add') %>+ <% end %>+</fieldset>diff --git a/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb b/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erbindex 37ce9928d78..63ce79ca309 100644--- a/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb+++ b/modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb@@ -7,35 +7,39 @@<%= toolbar title: "#{t("storages.provider_types.#{@storage.provider_type}.name")} #{t("storages.label_oauth_client_details")}" %><%= labelled_tabular_form_for @oauth_client, url: admin_settings_storage_oauth_client_path do |f| -%>- <div class="form--field -required">- <%= f.text_field :client_id,- label: t('storages.label_oauth_client_id'),- required: true,- size: 40,- container_class: '-wide' %>- <span class="form--field-instructions">+ <fieldset class="form--fieldset">+ <div class="form--field -required">+ <%= f.text_field :client_id,+ label: t('storages.label_oauth_client_id'),+ required: true,+ size: 40,+ container_class: '-wide' %>+ <span class="form--field-instructions"><%= "#{t("storages.instructions.copy_from")}: " %>- <%= link_to "#{t("storages.instructions.#{@storage.provider_type}.integration")}",- URI::join(@storage.host, "settings/admin/openproject").to_s,- target: "_blank" %>+ <%= link_to "#{t("storages.instructions.#{@storage.provider_type}.integration")}",+ URI::join(@storage.host, "settings/admin/openproject").to_s,+ target: "_blank" %></span>- </div>- <div class="form--field -required">- <%= f.text_field :client_secret,- label: t('storages.label_oauth_client_secret'),- required: true,- size: 40,- container_class: '-wide' %>- <span class="form--field-instructions">+ </div>+ <div class="form--field -required">+ <%= f.text_field :client_secret,+ label: t('storages.label_oauth_client_secret'),+ required: true,+ size: 40,+ container_class: '-wide' %>+ <span class="form--field-instructions"><%= "#{t("storages.instructions.copy_from")}: " %>- <%= link_to "#{t("storages.instructions.#{@storage.provider_type}.integration")}",- URI::join(@storage.host, "settings/admin/openproject").to_s,- target: "blank" %>+ <%= link_to "#{t("storages.instructions.#{@storage.provider_type}.integration")}",+ URI::join(@storage.host, "settings/admin/openproject").to_s,+ target: "blank" %></span>- </div>+ </div>+ </fieldset>+<% if @storage.oauth_client %><%= styled_button_tag t(:button_replace), class: "-highlight -with-icon icon-checkmark" %><% else %><%= styled_button_tag t("storages.buttons.save_and_complete_setup"), class: "-highlight -with-icon icon-checkmark" %><% end %><% end %>+diff --git a/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb b/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erbindex 4d9b6227155..732033ebfa1 100644--- a/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb+++ b/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb@@ -6,7 +6,7 @@] %><%= toolbar title: "OpenProject #{t("storages.label_oauth_application_details")}" %>-<div class="op-toast -warning -with-bottom-spacing">+<div class="op-toast -warning"><div class="op-toast--content"><p><%= t('repositories.storage.oauth_application_details') %>@@ -23,63 +23,65 @@</div><%= labelled_tabular_form_for @oauth_application, url: '/' do |f| -%>- <div class="form--field">- <label class="form--label"><%= t('storages.label_oauth_client_id') %></label>+ <fieldset class="form--fieldset">+ <div class="form--field">+ <label class="form--label"><%= t('storages.label_oauth_client_id') %></label>- <div class="form--field-container">- <div class="form--text-field-container -wide">- <%= text_field_tag(- :uid,- @oauth_application.uid,- {- size: 40,- readonly: true,- id: 'client_id'- }- ) %>- </div>- <div class="form--field-affix">- <% csp_onclick('this.focus(); this.select();', '#client_id') %>- <copy-to-clipboard click-target=".client-id-copy-button"- clipboard-target="#client_id">- </copy-to-clipboard>- <button class="client-id-copy-button button -without-button-styling"- title="<%= t(:label_copy_to_clipboard) %>">- <%= op_icon('icon-copy') %>- <span class="hidden-for-sighted"><%= t(:label_copy_to_clipboard) %></span>- </button>+ <div class="form--field-container">+ <div class="form--text-field-container -wide">+ <%= text_field_tag(+ :uid,+ @oauth_application.uid,+ {+ size: 40,+ readonly: true,+ id: 'client_id'+ }+ ) %>+ </div>+ <div class="form--field-affix">+ <% csp_onclick('this.focus(); this.select();', '#client_id') %>+ <copy-to-clipboard click-target=".client-id-copy-button"+ clipboard-target="#client_id">+ </copy-to-clipboard>+ <button class="client-id-copy-button button -without-button-styling"+ title="<%= t(:label_copy_to_clipboard) %>">+ <%= op_icon('icon-copy') %>+ <span class="hidden-for-sighted"><%= t(:label_copy_to_clipboard) %></span>+ </button>+ </div></div></div>- </div>- <div class="form--field">- <label class="form--label"><%= t('storages.label_oauth_client_secret') %></label>+ <div class="form--field">+ <label class="form--label"><%= t('storages.label_oauth_client_secret') %></label>- <div class="form--field-container">- <div class="form--text-field-container -wide">- <%= text_field_tag(- :plaintext_secret,- @oauth_application.plaintext_secret,- {- size: 40,- readonly: true,- id: 'secret'- }- ) %>- </div>- <div class="form--field-affix">- <% csp_onclick('this.focus(); this.select();', '#secret') %>- <copy-to-clipboard click-target=".secret-copy-button"- clipboard-target="#secret">- </copy-to-clipboard>- <button class="secret-copy-button button -without-button-styling"- title="<%= t(:label_copy_to_clipboard) %>">- <%= op_icon('icon-copy') %>- <span class="hidden-for-sighted"><%= t(:label_copy_to_clipboard) %></span>- </button>+ <div class="form--field-container">+ <div class="form--text-field-container -wide">+ <%= text_field_tag(+ :plaintext_secret,+ @oauth_application.plaintext_secret,+ {+ size: 40,+ readonly: true,+ id: 'secret'+ }+ ) %>+ </div>+ <div class="form--field-affix">+ <% csp_onclick('this.focus(); this.select();', '#secret') %>+ <copy-to-clipboard click-target=".secret-copy-button"+ clipboard-target="#secret">+ </copy-to-clipboard>+ <button class="secret-copy-button button -without-button-styling"+ title="<%= t(:label_copy_to_clipboard) %>">+ <%= op_icon('icon-copy') %>+ <span class="hidden-for-sighted"><%= t(:label_copy_to_clipboard) %></span>+ </button>+ </div></div></div>- </div>+ </fieldset><% if @object.oauth_client %><%= link_to t("storages.buttons.done_continue_setup"), admin_settings_storage_path(@object), class: "-highlight -with-icon icon-checkmark button" %>