Project

General

Profile

Feature #42581 ยป render_api_custom_values.patch

Ctrl Sup, 2025-04-14 16:47

View differences:

app/helpers/custom_fields_helper.rb
203 203
          else
204 204
            api.value custom_value.value
205 205
          end
206
          
207
          # Add possible values when the include parameter requests it
208
          if include_in_api_response?('possible_values') && custom_value.custom_field.respond_to?(:possible_values) && !custom_value.custom_field.possible_values.blank?
209
            api.array :possible_values do
210
              custom_value.custom_field.possible_values.each do |value|
211
                api.value value
212
              end
213
            end
214
          end
206 215
        end
207 216
      end
208 217
    end unless custom_values.empty?
209 218
  end
210 219

  
220

  
211 221
  def edit_tag_style_tag(form, options={})
212 222
    select_options = [[l(:label_drop_down_list), ''], [l(:label_checkboxes), 'check_box']]
213 223
    if options[:include_radio]
    (1-1/1)