* feat: add the feature flag route and controller * feat: add a ff page * feat: update to a post with a success banner * feat: test the feature * feat: update the styling * feat: change feature flag to extension witha few more improvements like adding a model not backed by a table * feat: update the text * refactor: if you enable a FF, it gets added under the hood as well * feat: accessibility name for label * use keyword args * use locales * Update app/views/admin/extensions/index.html.erb Co-authored-by: Suzanne Aitchison <suzanne@forem.com> * Update app/views/admin/extensions/index.html.erb Co-authored-by: Suzanne Aitchison <suzanne@forem.com> * Update app/views/admin/extensions/index.html.erb Co-authored-by: Suzanne Aitchison <suzanne@forem.com> * Update config/locales/controllers/admin/fr.yml Co-authored-by: Suzanne Aitchison <suzanne@forem.com> * Update app/controllers/admin/extensions_controller.rb Co-authored-by: Suzanne Aitchison <suzanne@forem.com> * fix: rubucop Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
16 lines
828 B
Text
16 lines
828 B
Text
<%= form_with(url: toggle_admin_extensions_path, method: :post, local: true) do |f| %>
|
|
<div class="crayons-card p-4 flex flex-col gap-4">
|
|
<% @extensions.each do |extension| %>
|
|
<div>
|
|
<div class="crayons-field crayons-field--checkbox">
|
|
<%= f.check_box extension.feature_flag_name, class: "crayons-checkbox", checked: extension.enabled?, aria: { describedby: "#{extension.feature_flag_name}-description" } %>
|
|
<%= f.label extension.feature_flag_name, extension.name, class: "crayons-field__label" %>
|
|
</div>
|
|
<p id="<%= extension.feature_flag_name %>-description" class="pl-7 crayons-field__description">
|
|
<%= sanitize extension.description %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
<button class="c-btn c-btn--primary self-start">Save</button>
|
|
</div>
|
|
<% end %>
|