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/assembla.rb')
-rw-r--r--app/models/integrations/assembla.rb29
1 files changed, 10 insertions, 19 deletions
diff --git a/app/models/integrations/assembla.rb b/app/models/integrations/assembla.rb
index ccd24c1fb2c..88dbf2915ef 100644
--- a/app/models/integrations/assembla.rb
+++ b/app/models/integrations/assembla.rb
@@ -2,9 +2,18 @@
module Integrations
class Assembla < Integration
- prop_accessor :token, :subdomain
validates :token, presence: true, if: :activated?
+ field :token,
+ type: 'password',
+ non_empty_password_title: -> { s_('ProjectService|Enter new token') },
+ non_empty_password_help: -> { s_('ProjectService|Leave blank to use your current token.') },
+ placeholder: '',
+ required: true
+
+ field :subdomain,
+ placeholder: ''
+
def title
'Assembla'
end
@@ -17,24 +26,6 @@ module Integrations
'assembla'
end
- def fields
- [
- {
- type: 'password',
- name: 'token',
- non_empty_password_title: s_('ProjectService|Enter new token'),
- non_empty_password_help: s_('ProjectService|Leave blank to use your current token.'),
- placeholder: '',
- required: true
- },
- {
- type: 'text',
- name: 'subdomain',
- placeholder: ''
- }
- ]
- end
-
def self.supported_events
%w(push)
end