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/confluence.rb')
-rw-r--r--app/models/integrations/confluence.rb19
1 files changed, 5 insertions, 14 deletions
diff --git a/app/models/integrations/confluence.rb b/app/models/integrations/confluence.rb
index 4e1d1993d02..c1c43af99bf 100644
--- a/app/models/integrations/confluence.rb
+++ b/app/models/integrations/confluence.rb
@@ -6,11 +6,14 @@ module Integrations
VALID_HOST_MATCH = %r{\A.+\.atlassian\.net\Z}.freeze
VALID_PATH_MATCH = %r{\A/wiki(/|\Z)}.freeze
- prop_accessor :confluence_url
-
validates :confluence_url, presence: true, if: :activated?
validate :validate_confluence_url_is_cloud, if: :activated?
+ field :confluence_url,
+ title: -> { s_('Confluence Cloud Workspace URL') },
+ placeholder: 'https://example.atlassian.net/wiki',
+ required: true
+
def self.to_param
'confluence'
end
@@ -38,18 +41,6 @@ module Integrations
end
end
- def fields
- [
- {
- type: 'text',
- name: 'confluence_url',
- title: s_('Confluence Cloud Workspace URL'),
- placeholder: 'https://example.atlassian.net/wiki',
- required: true
- }
- ]
- end
-
def testable?
false
end