docbrown/app/views/admin/settings/forms/_monetization.html.erb
Mac Siri afa73e06e3
Replace Webpacker with Esbuild (#20470)
* Migrate to esbuild WIP

* Add exclude

* Remove redundant file

* Move file

* Move to javascript_include_tag

* Lint fix

* WIP

* WIP

* Add watch mode to esbuild WIP

* Get jest working

* Remove babel

* Revert "Remove babel"

This reverts commit 6da35260aa19d6f97f586deb66c0ecaf48433b73.

* More WIP

* Got image to load

* WIP

* Resolve audit

* Lint fix

* WIP

* Fix jest spec

* [CI] Remove asset-restore for test build stage

* Production compliant

* Temp disable sourcemap

* Update glob

* Add esbuild helper to stimulus

* Import fragment

* Temp disable coverage to see failing tests

* Fix broken spec

* Address lint

* Set proper es6 target

* Use esbuild for everything

* wait what

* Revert "Set proper es6 target"

This reverts commit 98f5278093421baa8ffe2ca580845b01c1a1eadf.

* Revert "Use esbuild for everything"

This reverts commit 0ac46738f07ffcb6af095ccb1ffa5e439b7fefa3.

* Replace uglifier with terser

* New compiled assets version

* Remvoe honeybadger-io/webpack

* Remove cypress coverage checks for now

* Update jsconfig.json

* Update docker-compose

* Remove public/packs-test from ci cache
2024-01-25 20:29:21 +00:00

56 lines
2.8 KiB
Text

<%= form_for(Settings::General.new,
url: admin_settings_general_settings_path,
html: { data: { action: "submit->config#updateConfigurationSettings" } }) do |f| %>
<details class="crayons-card">
<summary class="crayons-subtitle-2 p-6">Monetization</summary>
<div class="p-6 pt-0">
<fieldset class="grid gap-4">
<div class="crayons-field">
<%= admin_config_label :stripe_api_key, "Stripe API key" %>
<%= admin_config_description Constants::Settings::General.details[:stripe_api_key][:description] %>
<%= f.text_field :stripe_api_key,
class: "crayons-textfield",
value: Settings::General.stripe_api_key,
placeholder: Constants::Settings::General.details[:stripe_api_key][:placeholder] %>
</div>
<div class="crayons-field">
<%= admin_config_label :stripe_publishable_key %>
<%= admin_config_description Constants::Settings::General.details[:stripe_publishable_key][:description] %>
<%= f.text_field :stripe_publishable_key,
class: "crayons-textfield",
value: Settings::General.stripe_publishable_key,
placeholder: Constants::Settings::General.details[:stripe_publishable_key][:placeholder] %>
</div>
<div class="crayons-field">
<%= admin_config_label :payment_pointer %>
<%= admin_config_description Constants::Settings::General.details[:payment_pointer][:description] %>
<%= f.text_field :payment_pointer,
class: "crayons-textfield",
value: Settings::General.payment_pointer,
placeholder: Constants::Settings::General.details[:payment_pointer][:placeholder] %>
</div>
<% if FeatureFlag.enabled?(Geolocation::FEATURE_FLAG) %>
<div class="crayons-field">
<%= admin_config_label :billboard_enabled_countries %>
<%= admin_config_description Constants::Settings::General.details[:billboard_enabled_countries][:description] %>
<div id="billboard-enabled-countries-editor"></div>
</div>
<div class="crayons-field hidden">
<%= f.text_field :billboard_enabled_countries,
class: "crayons-textfield geolocation-multiselect",
value: billboard_enabled_countries_for_editing,
autocomplete: "off",
data: { all_countries: billboard_all_countries_for_editing } %>
</div>
<%= javascript_include_tag "admin/billboardEnabledCountries", defer: true %>
<% end %>
</fieldset>
<%= render "update_setting_button", f: f %>
</div>
</details>
<% end %>