mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
59 lines
3.2 KiB
Plaintext
59 lines
3.2 KiB
Plaintext
<%#-- copyright
|
|
OpenProject is an open source project management software.
|
|
Copyright (C) the OpenProject GmbH
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License version 3.
|
|
|
|
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
|
Copyright (C) 2006-2013 Jean-Philippe Lang
|
|
Copyright (C) 2010-2013 the ChiliProject Team
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
See COPYRIGHT and LICENSE files for more details.
|
|
|
|
++#%>
|
|
|
|
<%= render(FormControl.new(input: @input, tag: :"primer-datepicker-field")) do %>
|
|
<%= content_tag(:div, **@field_wrap_arguments) do %>
|
|
<%# leading spinner implies a leading visual %>
|
|
<% if @input.leading_visual || @input.leading_spinner? %>
|
|
<span class="FormControl-input-leadingVisualWrap">
|
|
<%= render(Primer::Beta::Octicon.new(**@input.leading_visual, data: { target: "primer-text-field.leadingVisual" })) %>
|
|
<% if @input.leading_spinner? %>
|
|
<%= render(Primer::Beta::Spinner.new(size: :small, hidden: true, data: { target: "primer-text-field.leadingSpinner" })) %>
|
|
<% end %>
|
|
</span>
|
|
<% end %>
|
|
<%= render Primer::ConditionalWrapper.new(condition: @input.auto_check_src, tag: "auto-check", csrf: auto_check_authenticity_token, src: @input.auto_check_src) do %>
|
|
<%= angular_component_tag @datepicker_options.fetch(:component),
|
|
data: {
|
|
targets: @input.input_arguments.dig(:data, :targets),
|
|
"multi-input-name": @input.input_arguments.dig(:data, :name)
|
|
}.compact,
|
|
inputs: @datepicker_options.merge(
|
|
id: @datepicker_options.fetch(:id) { builder.field_id(@input.name) },
|
|
name: @datepicker_options.fetch(:name) { builder.field_name(@input.name) },
|
|
value: @datepicker_options.fetch(:value) { @input.input_arguments[:value] || builder.object&.send(@input.name) },
|
|
inputClassNames: @datepicker_options.fetch(:class) { @input.input_arguments[:class] },
|
|
dataAction: @datepicker_options.fetch(:data, {}).fetch(:action, nil),
|
|
inputAttrs: @datepicker_options.fetch(:input_attributes, nil),
|
|
placeholder: @input.input_arguments.fetch(:placeholder, "")
|
|
) %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|