mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-21 00:47:46 +01:00
Use button_to
instead of link_to
for post in service settings
This commit is contained in:
parent
75b93d3535
commit
f13e84319e
1 changed files with 5 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
- APP_CONFIG['sharing'].each do |service, service_options|
|
- APP_CONFIG['sharing'].each do |service, service_options|
|
||||||
- if service_options['enabled'] && @services.none? { |x| x.provider == service.to_s }
|
- if service_options['enabled'] && @services.none? { |x| x.provider == service.to_s }
|
||||||
%p= link_to t('views.settings.service.connect', service: service.capitalize), "/auth/#{service}", method: :post
|
%p= button_to t('views.settings.service.connect', service: service.capitalize), "/auth/#{service}", method: :post, class: 'btn btn-info'
|
||||||
|
|
||||||
- if @services.count.positive?
|
- if @services.count.positive?
|
||||||
%ul.list-group
|
%ul.list-group
|
||||||
|
@ -16,10 +16,12 @@
|
||||||
%i{ class: "fa fa-#{service.provider}" }
|
%i{ class: "fa fa-#{service.provider}" }
|
||||||
%strong= service.provider.capitalize
|
%strong= service.provider.capitalize
|
||||||
(#{service.nickname})
|
(#{service.nickname})
|
||||||
= link_to t('views.settings.service.disconnect'),
|
= button_to t('views.settings.service.disconnect'),
|
||||||
service_path(service),
|
service_path(service),
|
||||||
data: { confirm: t('views.settings.service.confirm', service: service.provider.capitalize) },
|
data: { confirm: t('views.settings.service.confirm', service: service.provider.capitalize) },
|
||||||
method: :delete
|
method: :delete,
|
||||||
|
class: 'btn btn-link',
|
||||||
|
form: { class: 'd-inline' }
|
||||||
|
|
||||||
.col-md-6.mt-2
|
.col-md-6.mt-2
|
||||||
= bootstrap_form_for(service, as: 'service', url: update_service_path(service)) do |f|
|
= bootstrap_form_for(service, as: 'service', url: update_service_path(service)) do |f|
|
||||||
|
|
Loading…
Reference in a new issue