* Starting out
* Building away...
* Hooking buttons up
* Hook Auth Provider buttons to Array Field
* trying to fix NoNameError
* Remains InviteOnlyMode disable and tests
* Smashing remaining tasks
* Last of tasks
* add tests
* Complete specs and tests 😅
* Fix bug
* Additional guard
* pass event to functions
* Position Email Auth first
* Fix bug in Email Auth Modal
* Fix spacing issue
* Update docs for adminModal.js
* Show/hide Enabled Indicator with Enable/Undo buttons
* Complete Auth Providers functionality
* Update app/javascript/admin/controllers/config_controller.js
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Update app/javascript/admin/controllers/config_controller.js
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Update app/controllers/admin/configs_controller.rb
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Update helper names
* better implementation of EnabledIndicator show/hide
* Small copy changes
* Update spec/helpers/authentication_helper_spec.rb
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Update app/views/admin/configs/show.html.erb
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Update app/helpers/authentication_helper.rb
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
54 lines
2.6 KiB
Text
54 lines
2.6 KiB
Text
<div class="config-authentication__item">
|
|
<div class="config-authentication__item--container">
|
|
<div class="config-authentication__item--body">
|
|
<fieldset class="config-authentication-form">
|
|
<div class="crayons-field">
|
|
<%= admin_config_label :"#{provider.provider_name}_key" %>
|
|
<p class="crayons-field__description">
|
|
<%= Constants::SiteConfig::DETAILS[:"#{provider.provider_name}_key"][:description] %>
|
|
</p>
|
|
<%= f.text_field :"#{provider.provider_name}_key",
|
|
class: "crayons-textfield",
|
|
value: SiteConfig.public_send("#{provider.provider_name}_key"),
|
|
placeholder: Constants::SiteConfig::DETAILS[:"#{provider.provider_name}_key"][:placeholder] %>
|
|
</div>
|
|
<div class="crayons-field">
|
|
<%= admin_config_label :"#{provider.provider_name}_secret" %>
|
|
<p class="crayons-field__description">
|
|
<%= Constants::SiteConfig::DETAILS[:"#{provider.provider_name}_secret"][:description] %>
|
|
<p>
|
|
<%= f.text_field :"#{provider.provider_name}_secret",
|
|
class: "crayons-textfield",
|
|
value: SiteConfig.public_send("#{provider.provider_name}_secret"),
|
|
placeholder: Constants::SiteConfig::DETAILS[:"#{provider.provider_name}_secret"][:placeholder] %>
|
|
</div>
|
|
<div class="mt-6">
|
|
<% if authentication_enabled_providers.include?(provider) %>
|
|
<button
|
|
class="crayons-btn crayons-btn--danger <%= tooltip_class_on_auth_provider_disablebtn %>"
|
|
data-action="click->config#activateAuthProviderModal"
|
|
data-tooltip="<%= tooltip_text_email_or_auth_provider_btns %>"
|
|
data-auth-provider="<%= provider.provider_name %>"
|
|
data-auth-provider-official="<%= provider.official_name %>"
|
|
<%= disabled_attr_on_auth_rpovider_disablebtn %>>
|
|
Disable
|
|
</button>
|
|
<button
|
|
class="crayons-btn crayons-btn--secondary"
|
|
data-auth-provider="<%= provider.provider_name %>"
|
|
data-action="click->config#hideAuthProviderSettings">
|
|
Close
|
|
</button>
|
|
<% else %>
|
|
<button
|
|
class="crayons-btn crayons-btn--secondary"
|
|
data-auth-provider="<%= provider.provider_name %>"
|
|
data-action="click->config#disableAuthProvider">
|
|
Undo
|
|
</button>
|
|
<% end %>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</div>
|