diff --git a/app/helpers/catalog_helper/orchestration_template_helper.rb b/app/helpers/catalog_helper/orchestration_template_helper.rb index f684553d046..0507a264fac 100644 --- a/app/helpers/catalog_helper/orchestration_template_helper.rb +++ b/app/helpers/catalog_helper/orchestration_template_helper.rb @@ -45,7 +45,7 @@ def orchestration_template_content(record) ] miq_structured_list({ :title => _('Content'), - :mode => "method_built_in_data", + :mode => "method_inline_data", :rows => rows }) end diff --git a/app/helpers/miq_ae_class_helper.rb b/app/helpers/miq_ae_class_helper.rb index 96c2c2544f9..9189aa6e122 100644 --- a/app/helpers/miq_ae_class_helper.rb +++ b/app/helpers/miq_ae_class_helper.rb @@ -341,13 +341,24 @@ def method_details(ae_method, sb_data) }) end - def method_built_in_data(ae_method) + def method_inline_data(ae_method) rows = [ row_data('', {:input => 'code_mirror', :props => {:mode => 'ruby', :payload => ae_method.data}}) ] miq_structured_list({ :title => _('Data'), - :mode => "method_built_in_data", + :mode => "method_inline_data", + :rows => rows + }) + end + + def method_builtin_data(ae_method) + rows = [ + row_data(_('Builtin name'), ae_method.data), + ] + miq_structured_list({ + :title => _('Data'), + :mode => "method_builtin_data", :rows => rows }) end diff --git a/app/helpers/miq_ae_customization_helper.rb b/app/helpers/miq_ae_customization_helper.rb index 6ddee5376a6..b3c6466ba6a 100644 --- a/app/helpers/miq_ae_customization_helper.rb +++ b/app/helpers/miq_ae_customization_helper.rb @@ -44,7 +44,7 @@ def miq_ae_customization_content(record) ] miq_structured_list({ :title => _('Content'), - :mode => "method_built_in_data", + :mode => "method_inline_data", :rows => rows }) end diff --git a/app/views/miq_ae_class/_method_inputs.html.haml b/app/views/miq_ae_class/_method_inputs.html.haml index 9ae13bd1fff..5d7743ffea1 100644 --- a/app/views/miq_ae_class/_method_inputs.html.haml +++ b/app/views/miq_ae_class/_method_inputs.html.haml @@ -12,22 +12,9 @@ = render :partial => "embedded_methods" = render :partial => "domain_overrides", :locals => {:node_prefix => "aem", :model => "Method"} - if @ae_method.location == "inline" - - if @in_a_form - %h3= @ae_method.location == 'builtin' ? _('Builtin name') : _('Data') - = text_area("method1", - "data", - :value => @ae_method.data, - :size => "90x20", - :disabled => true, - :style => "display:none;") - -# Create a MyCodeMirror editor for the text area - = render :partial => "/layouts/my_code_mirror", - :locals => {:text_area_id => "method1_data", - :mode => "ruby", - :line_numbers => true, - :read_only => true} - - else - = method_built_in_data(@ae_method) + = method_inline_data(@ae_method) + - elsif @ae_method.location == 'builtin' + = method_builtin_data(@ae_method) - elsif @ae_method.location == 'expression' = @expression - elsif playbook_style_location?(@ae_method.location)