Commit a1944072 authored by Marcin Sedlak-Jakubowski's avatar Marcin Sedlak-Jakubowski Committed by Heinrich Lee Yu

Review and revise Campfire integration UI text

parent 2723df2e
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
module Integrations module Integrations
class Campfire < Integration class Campfire < Integration
include ActionView::Helpers::UrlHelper
prop_accessor :token, :subdomain, :room prop_accessor :token, :subdomain, :room
validates :token, presence: true, if: :activated? validates :token, presence: true, if: :activated?
...@@ -13,15 +15,39 @@ module Integrations ...@@ -13,15 +15,39 @@ module Integrations
'Send notifications about push events to Campfire chat rooms.' 'Send notifications about push events to Campfire chat rooms.'
end end
def help
docs_link = link_to _('Learn more.'), Rails.application.routes.url_helpers.help_page_url('api/services', anchor: 'campfire'), target: '_blank', rel: 'noopener noreferrer'
s_('CampfireService|Send notifications about push events to Campfire chat rooms. %{docs_link}').html_safe % { docs_link: docs_link.html_safe }
end
def self.to_param def self.to_param
'campfire' 'campfire'
end end
def fields def fields
[ [
{ type: 'text', name: 'token', placeholder: '', required: true }, {
{ type: 'text', name: 'subdomain', placeholder: '' }, type: 'text',
{ type: 'text', name: 'room', placeholder: '' } name: 'token',
title: _('Campfire token'),
placeholder: '',
help: s_('CampfireService|API authentication token from Campfire.'),
required: true
},
{
type: 'text',
name: 'subdomain',
title: _('Campfire subdomain (optional)'),
placeholder: '',
help: s_('CampfireService|The %{code_open}.campfirenow.com%{code_close} subdomain.') % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
},
{
type: 'text',
name: 'room',
title: _('Campfire room ID (optional)'),
placeholder: '123456',
help: s_('CampfireService|From the end of the room URL.')
}
] ]
end end
......
...@@ -258,7 +258,8 @@ GET /projects/:id/services/buildkite ...@@ -258,7 +258,8 @@ GET /projects/:id/services/buildkite
## Campfire ## Campfire
Simple web-based real-time group chat Send notifications about push events to Campfire chat rooms.
Note that [new users can no longer sign up for Campfire](https://basecamp.com/retired/campfire).
### Create/Edit Campfire service ### Create/Edit Campfire service
...@@ -271,11 +272,11 @@ PUT /projects/:id/services/campfire ...@@ -271,11 +272,11 @@ PUT /projects/:id/services/campfire
Parameters: Parameters:
| Parameter | Type | Required | Description | | Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- | |---------------|---------|----------|---------------------------------------------------------------------------------------------|
| `token` | string | true | Campfire token | | `token` | string | true | Campfire API token. To find it, log into Campfire and select **My info**. |
| `subdomain` | string | false | Campfire subdomain | | `subdomain` | string | false | Campfire subdomain. Text between `https://` and `.campfirenow.com` when you're logged in. |
| `room` | string | false | Campfire room | | `room` | string | false | Campfire room. The last part of the URL when you're in a room. |
| `push_events` | boolean | false | Enable notifications for push events | | `push_events` | boolean | false | Enable notifications for push events. |
### Delete Campfire service ### Delete Campfire service
......
...@@ -5938,6 +5938,27 @@ msgstr "" ...@@ -5938,6 +5938,27 @@ msgstr ""
msgid "Callback URL" msgid "Callback URL"
msgstr "" msgstr ""
msgid "Campfire room ID (optional)"
msgstr ""
msgid "Campfire subdomain (optional)"
msgstr ""
msgid "Campfire token"
msgstr ""
msgid "CampfireService|API authentication token from Campfire."
msgstr ""
msgid "CampfireService|From the end of the room URL."
msgstr ""
msgid "CampfireService|Send notifications about push events to Campfire chat rooms. %{docs_link}"
msgstr ""
msgid "CampfireService|The %{code_open}.campfirenow.com%{code_close} subdomain."
msgstr ""
msgid "Can be manually deployed to" msgid "Can be manually deployed to"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment