_form.html.haml 597 B

12345678910
  1. = render 'shared/error_messages', object: form.object
  2. .fields-group
  3. = form.input :url, wrapper: :with_block_label, input_html: { placeholder: 'https://' }
  4. .fields-group
  5. = form.input :events, collection: Webhook::EVENTS, wrapper: :with_block_label, include_blank: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', disabled: Webhook::EVENTS.filter { |event| !current_user.role.can?(Webhook.permission_for_event(event)) }
  6. .fields-group
  7. = form.input :template, wrapper: :with_block_label, input_html: { placeholder: '{ "content": "Hello {{object.username}}" }' }