Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/integrations/flowdock.rb')
-rw-r--r--app/models/integrations/flowdock.rb23
1 files changed, 8 insertions, 15 deletions
diff --git a/app/models/integrations/flowdock.rb b/app/models/integrations/flowdock.rb
index 703d8013bab..52efb29f2c1 100644
--- a/app/models/integrations/flowdock.rb
+++ b/app/models/integrations/flowdock.rb
@@ -2,9 +2,16 @@
module Integrations
class Flowdock < Integration
- prop_accessor :token
validates :token, presence: true, if: :activated?
+ field :token,
+ type: 'password',
+ help: -> { s_('FlowdockService|Enter your Flowdock token.') },
+ non_empty_password_title: -> { s_('ProjectService|Enter new token') },
+ non_empty_password_help: -> { s_('ProjectService|Leave blank to use your current token.') },
+ placeholder: '1b609b52537...',
+ required: true
+
def title
'Flowdock'
end
@@ -22,20 +29,6 @@ module Integrations
'flowdock'
end
- def fields
- [
- {
- type: 'password',
- name: 'token',
- help: s_('FlowdockService|Enter your Flowdock token.'),
- non_empty_password_title: s_('ProjectService|Enter new token'),
- non_empty_password_help: s_('ProjectService|Leave blank to use your current token.'),
- placeholder: '1b609b52537...',
- required: true
- }
- ]
- end
-
def self.supported_events
%w(push)
end