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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 11:17:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 11:17:02 +0300
commitb39512ed755239198a9c294b6a45e65c05900235 (patch)
treed234a3efade1de67c46b9e5a38ce813627726aa7 /lib/gitlab/form_builders/gitlab_ui_form_builder.rb
parentd31474cf3b17ece37939d20082b07f6657cc79a9 (diff)
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'lib/gitlab/form_builders/gitlab_ui_form_builder.rb')
-rw-r--r--lib/gitlab/form_builders/gitlab_ui_form_builder.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/gitlab/form_builders/gitlab_ui_form_builder.rb b/lib/gitlab/form_builders/gitlab_ui_form_builder.rb
index 9174ca165cd..ea98f6b2eec 100644
--- a/lib/gitlab/form_builders/gitlab_ui_form_builder.rb
+++ b/lib/gitlab/form_builders/gitlab_ui_form_builder.rb
@@ -3,6 +3,20 @@
module Gitlab
module FormBuilders
class GitlabUiFormBuilder < ActionView::Helpers::FormBuilder
+ def submit(value = nil, options = {})
+ if options[:pajamas_button]
+ @template.render Pajamas::ButtonComponent.new(
+ variant: :confirm,
+ type: :submit,
+ button_options: options.except(:pajamas_button)
+ ) do
+ value
+ end
+ else
+ super
+ end
+ end
+
def gitlab_ui_checkbox_component(
method,
label = nil,
@@ -45,6 +59,10 @@ module Gitlab
).render_in(@template, &block)
end
+ def gitlab_ui_datepicker(method, options = {})
+ @template.text_field @object_name, method, options.merge(class: "datepicker form-control gl-form-input")
+ end
+
private
def format_options(options)