scinote-web/app/views/users/settings/webhooks/_webhook_form.html.erb

28 lines
1.2 KiB
Text
Raw Normal View History

<div class="webhook-form-row">
<span class="form-text webhook-form-trigger-text"><%= t("webhooks.index.webhook_trigger") %></span>
<div class="webhook-method-container">
<%= f.select :http_method, options_for_select(Webhook.http_methods.map{ |k,_v| [k.upcase, k] }, f.object.http_method) %>
</div>
<span class="form-text"><%= t("webhooks.index.target") %></span>
<div class="sci-input-container url-input-container form-group">
<%= f.text_field :url, class: "sci-input-field url-input", placeholder: t("webhooks.index.url_placeholder"), data: {original_value: f.object.url } %>
</div>
<button class="btn btn-light cancel-action">
2023-06-08 23:33:50 +08:00
<i class="sn-icon sn-icon-close"></i>
<%= t('general.cancel') %>
</button>
<%= f.button class: "btn btn-primary save-webhook" do %>
<i class="fas fa-save"></i>
<%= t('general.save') %>
<% end %>
</div>
<div class="webhook-form-row">
<span class="form-text webhook-form-secret-key-text"><%= t("webhooks.index.secret_key") %></span>
<div class="webhook-secret-key-container">
<div class="sci-input-container form-group">
<%= f.text_field :secret_key, class: "sci-input-field" %>
<small><%= t("webhooks.index.secret_key_hint") %></small>
</div>
</div>
</div>