docbrown/app/views/admin/settings/forms/_smtp.html.erb
Ridhwana aa6d80bc5d
Only enable user invitations page when SMTP is enabled (#15219)
* first pass of styling of the page

* feat: scroll to the position in the config controller in stimulus

* feat: add the tooltip and a cursor thats not allowed

* feat: add a disabled property for all that needs smtp to be enabled

* feat: update the form styling

* feat: update the form

* specs: update the label name

* fix: syntax error

* chore: update the newline

* spec: test the invitation flow

* fix test

* feat: update the form as per suggestions

* spec: update the tests to match the new workflow

* oops committed debugging code

* chore: add a before to set the smtp_enabled method

* feat: update the boldness and fontsize of the link

* feat: remove size
2021-10-29 17:41:30 +02:00

24 lines
1.2 KiB
Text

<%= form_for(Settings::SMTP.new,
url: admin_settings_smtp_settings_path,
html: { data: { action: "submit->config#updateConfigurationSettings" } }) do |f| %>
<div class="card mt-3" id="smtp-section">
<%= render partial: "admin/shared/card_header",
locals: { header: "SMTP Settings", state: "collapse", target: "smtpSettingsBodyContainer", expanded: false } %>
<div id="smtpSettingsBodyContainer" class="card-body collapse hide" aria-labelledby="smtpSettingsBodyContainer">
<fieldset class="grid gap-4">
<% Settings::SMTP::OPTIONS.each do |config_key| %>
<div class="crayons-field">
<%= admin_config_label config_key %>
<%= admin_config_description Constants::Settings::SMTP::DETAILS[config_key][:description] %>
<%= f.text_field config_key,
class: "crayons-textfield",
value: Settings::SMTP.public_send(config_key),
placeholder: Constants::Settings::SMTP::DETAILS[config_key][:placeholder] %>
</div>
<% end %>
</fieldset>
<%= render "update_setting_button", f: f %>
</div>
</div>
<% end %>