Skip to content

Commit

Permalink
Merge pull request #8975 from jeffibm/catalog-description-new-line
Browse files Browse the repository at this point in the history
Move service-catalog-item's description to a new line in the form and summary pages
  • Loading branch information
DavidResende0 authored Dec 7, 2023
2 parents 2bff7b5 + 3b10801 commit f1dc270
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/helpers/catalog_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def catalog_basic_information(record, sb_params, tenants_tree)
prov_data = [prov_types[:template], prov_types[:ovf]].include?(record.prov_type) && catalog_provision?(record, :playbook) ? provisioning : nil
data = {:title => _('Basic Information'), :mode => "miq_catalog_basic_information"}
rows = []
rows.push(row_data(_('Name / Description'), "#{record.name} / #{record.description}"))
rows.push(row_data(_('Name'), record.name))
rows.push(row_data(_('Description'), record.description))
rows.push(row_data(_('Display in Catalog'), {:input => "checkbox", :name => "display", :checked => record.display, :disabled => true, :label => ''}))
rows.push(row_data(_('Catalog'), record.service_template_catalog ? record.service_template_catalog.name : _('Unassigned')))
rows.push(row_data(_('Zone'), record.zone ? record.zone.name : '')) unless record.composite?
Expand Down
14 changes: 9 additions & 5 deletions app/views/catalog/_form_basic_info.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,26 @@
.form-horizontal
.form-group
%label.col-md-2.control-label
= _('Name / Description')
= _('Name')
.col-md-10.no-padding
.col-md-3
= text_field_tag("name",
@edit[:new][:name].to_s,
:maxlength => 40,
:class => "form-control",
"data-miq_observe" => {:interval => '.5', :url => url}.to_json)
.col-md-9
.col-md-10.no-padding
= text_field_tag("description",

= javascript_tag(javascript_focus('name'))
.form-group
%label.col-md-2.control-label
= _('Description')
.col-md-9.no-padding
.col-md-12
= text_field_tag("description",
@edit[:new][:description],
:maxlength => 60,
:class => "form-control long_text",
"data-miq_observe" => {:interval => '.5', :url => url}.to_json)
= javascript_tag(javascript_focus('name'))
.form-group
%label.col-md-2.control-label
= _('Display in Catalog')
Expand Down

0 comments on commit f1dc270

Please sign in to comment.