blob: c165610b332a34cbc003c46b87dfc6624ccc9910 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
- expanded = true if !@application_setting.valid? && @application_setting.errors.any? { |k| k.to_s.start_with?('pendo_') }
%section.settings.as-pendo.no-animate#js-pendo-settings{ class: ('expanded' if expanded) }
.settings-header
%h4
= _('Pendo')
%button.btn.btn-default.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand')
%p
= _('Configure the %{link} integration.').html_safe % { link: link_to('Pendo', 'https://www.pendo.io/', target: '_blank') }
.settings-content
= form_for @application_setting, url: integrations_admin_application_settings_path(anchor: 'js-pendo-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting) if expanded
%fieldset
.form-group
.form-check
= f.check_box :pendo_enabled, class: 'form-check-input'
= f.label :pendo_enabled, _('Enable pendo tracking'), class: 'form-check-label'
.form-group
= f.label :pendo_url, _('Pendo endpoint'), class: 'label-light'
= f.text_field :pendo_url, class: 'form-control', placeholder: 'https://cdn.pendo.io/agent/static/your-api-key/pendo.js'
= f.submit _('Save changes'), class: 'btn btn-success'
|