[Rt-commit] rt branch, 5.0-trunk, updated. rt-5.0.0alpha1-112-g84040ca61a

? sunnavy sunnavy at bestpractical.com
Thu Apr 23 18:15:47 EDT 2020


The branch, 5.0-trunk has been updated
       via  84040ca61adb6b47b3fc8015337bce6a0f0bb3e9 (commit)
       via  2ee16f6bd4504017a251b1c866142c1a0a5dea88 (commit)
       via  becfac9f0967a7ad3cbd7ef6aba12480fcbe6358 (commit)
       via  18d87a3ee70c3fdec00f60b69a259d15e03abc52 (commit)
      from  5f71e4786ba0c08840f28b7aea87196081fd8a3c (commit)

Summary of changes:
 lib/RT/Interface/Web/MenuBuilder.pm          |  2 +-
 lib/RT/Test/Assets.pm                        | 29 +++++++++++
 share/html/Admin/Assets/Catalogs/Modify.html |  1 +
 share/html/Asset/Create.html                 | 13 +++--
 share/html/Asset/CreateInCatalog.html        | 51 --------------------
 share/html/Asset/Elements/CreateAsset        |  4 +-
 share/html/Asset/Elements/CreateInCatalog    | 62 ------------------------
 share/html/Asset/Elements/EditBasics         |  6 +--
 share/html/Asset/Elements/SelectCatalog      |  3 ++
 share/html/Asset/Helpers/CreateInCatalog     | 61 -----------------------
 share/static/js/assets.js                    |  7 ---
 t/assets/web.t                               |  2 +-
 t/web/asset_create.t                         | 72 ++++++++++++++++++++++++++++
 13 files changed, 120 insertions(+), 193 deletions(-)
 delete mode 100644 share/html/Asset/CreateInCatalog.html
 delete mode 100644 share/html/Asset/Elements/CreateInCatalog
 delete mode 100644 share/html/Asset/Helpers/CreateInCatalog
 create mode 100644 t/web/asset_create.t

- Log -----------------------------------------------------------------
commit 18d87a3ee70c3fdec00f60b69a259d15e03abc52
Author: michel <michel at bestpractical.com>
Date:   Thu Feb 20 15:30:55 2020 +0100

    Select Catalog in Asset Create page.
    
    Allow Catalog to be selected in the create asset page, using defaults
    from configuration if none provided. Existing urls for asset creation
    will still work.

diff --git a/share/html/Admin/Assets/Catalogs/Modify.html b/share/html/Admin/Assets/Catalogs/Modify.html
index e27bc2fd33..2b82f50d3e 100644
--- a/share/html/Admin/Assets/Catalogs/Modify.html
+++ b/share/html/Admin/Assets/Catalogs/Modify.html
@@ -51,6 +51,7 @@
 
 <form method="post" enctype="multipart/form-data" id="ModifyCatalog" action="Modify.html">
   <input type="hidden" name="id" value="<% $catalog->id %>">
+  <input type="hidden" name="CatalogChanged" value="0">
 
   <&| /Widgets/TitleBox, title => loc("Basics"), class => "catalog-basics" &>
     <& Elements/EditBasics, %ARGS, CatalogObj => $catalog &>
diff --git a/share/html/Asset/Create.html b/share/html/Asset/Create.html
index 12a3bd1f21..1e5b81f70e 100644
--- a/share/html/Asset/Create.html
+++ b/share/html/Asset/Create.html
@@ -51,15 +51,15 @@
 <& /Elements/ListActions, actions => \@results &>
 
 <span class="catalog <% CSSClass($catalog->Name) %>">
-  <form method="post" enctype="multipart/form-data" id="CreateAsset" action="Create.html">
+  <form method="post" enctype="multipart/form-data" id="CreateAsset" name="CreateAsset" action="Create.html">
     <input type="hidden" name="id" value="new">
-    <input type="hidden" name="Catalog" value="<% $catalog->id %>">
+    <input type="hidden" name="CatalogChanged" value="0" />
 
     <div id="Asset-Create-basics" class="asset-metadata form-row">
       <a name="basics"></a>
       <div class="col-md-6">
         <&| /Widgets/TitleBox, title => loc("Basics"), class => "asset-basics", title_class => "inverse" &>
-          <& Elements/EditBasics, %ARGS, AssetObj => $asset, CatalogObj => $catalog &>
+          <& Elements/EditBasics, %ARGS, AssetObj => $asset, CatalogObj => $catalog, AutoSubmit => 1 &>
         </&>
       </div>
 
@@ -107,8 +107,7 @@ $Catalog => undef
 </%args>
 <%init>
 my $asset   = RT::Asset->new( $session{CurrentUser} );
-my $catalog = RT::Catalog->new( $session{CurrentUser} );
-$catalog->Load($Catalog);
+my $catalog = LoadDefaultCatalog( $Catalog || '' );
 
 Abort(loc("Unable to find catalog '[_1]'", $Catalog))
     unless $catalog->id;
@@ -132,6 +131,10 @@ if ($id eq "new") {
         ARGSRef         => \%ARGS
     );
 
+    if ( $ARGS{CatalogChanged} ) {
+        $skip_create = 1;
+    }
+
     $m->callback(
         CallbackName    => 'BeforeCreate',
         AssetObj        => $asset,
diff --git a/share/html/Asset/Elements/EditBasics b/share/html/Asset/Elements/EditBasics
index 798d982614..e4ba222b56 100644
--- a/share/html/Asset/Elements/EditBasics
+++ b/share/html/Asset/Elements/EditBasics
@@ -45,16 +45,14 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-% if ($AssetObj->id) {
   <div class="form-row asset-catalog">
     <div class="label col-md-3">
       <&|/l&>Catalog</&>:
     </div>
     <div class="value col-md-9">
-      <& /Asset/Elements/SelectCatalog, Default => $current{Catalog} &>
+      <& /Asset/Elements/SelectCatalog, Default => $current{Catalog}, AutoSubmit => $AutoSubmit &>
     </div>
   </div>
-% }
   <div class="form-row asset-name">
     <div class="label col-md-3">
       <&|/l&>Name</&>:
@@ -95,8 +93,10 @@
 <%args>
 $AssetObj
 $CatalogObj => undef
+$AutoSubmit => 0
 </%args>
 <%init>
 my %current = map { $_ => ($ARGS{$_} || $AssetObj->$_ || '') }
                   $AssetObj->WritableAttributes;
+$CatalogObj ||= LoadDefaultCatalog($ARGS{'Catalog'} || ($AssetObj && $AssetObj->Catalog) || '' );
 </%init>
diff --git a/share/html/Asset/Elements/SelectCatalog b/share/html/Asset/Elements/SelectCatalog
index 76a73de217..871eec6c10 100644
--- a/share/html/Asset/Elements/SelectCatalog
+++ b/share/html/Asset/Elements/SelectCatalog
@@ -60,6 +60,7 @@ $ShowAll => 0
 $Default => undef
 $UpdateSession => 1
 $ShowNullOption => 0
+$AutoSubmit     => 0
 </%args>
 <%init>
 my $catalog_obj = LoadDefaultCatalog($Default || '');
@@ -67,4 +68,6 @@ if ( $UpdateSession && $catalog_obj->Id ){
     $session{'DefaultCatalog'} = $catalog_obj->Id;
     $Default = $catalog_obj->Id;
 }
+$ARGS{OnChange} = "jQuery(this).closest('form').find('input[name=CatalogChanged]').val(1);";
+$ARGS{OnChange} .= "jQuery(this).closest('form').submit();" if $AutoSubmit;
 </%init>

commit becfac9f0967a7ad3cbd7ef6aba12480fcbe6358
Author: michel <michel at bestpractical.com>
Date:   Thu Feb 27 09:24:23 2020 +0100

    Remove select catalog modal popup on asset creation.

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index 5ce829c461..d37d95216b 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -216,7 +216,7 @@ sub BuildMainNav {
 
     if ($current_user->HasRight( Right => 'ShowAssetsMenu', Object => RT->System )) {
         my $assets = $top->child( "assets", title => loc("Assets"), path => "/Asset/Search/" );
-        $assets->child( "create", title => loc("Create"), path => "/Asset/CreateInCatalog.html" );
+        $assets->child( "create", title => loc("Create"), path => "/Asset/Create.html" );
         $assets->child( "search", title => loc("Search"), path => "/Asset/Search/" );
     }
 
diff --git a/share/html/Asset/CreateInCatalog.html b/share/html/Asset/CreateInCatalog.html
deleted file mode 100644
index af01318436..0000000000
--- a/share/html/Asset/CreateInCatalog.html
+++ /dev/null
@@ -1,51 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
-%#                                          <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header,
-    Title => loc("Create new asset") &>
-<& /Elements/Tabs &>
-<& /Asset/Elements/CreateInCatalog &>
diff --git a/share/html/Asset/Elements/CreateAsset b/share/html/Asset/Elements/CreateAsset
index b57b1c13ec..d689c765a2 100644
--- a/share/html/Asset/Elements/CreateAsset
+++ b/share/html/Asset/Elements/CreateAsset
@@ -45,8 +45,8 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<form action="<% RT->Config->Get('WebPath') %>/Asset/CreateInCatalog.html">
+<form action="<% RT->Config->Get('WebPath') %>/Asset/Create.html">
   <div class="create-asset-button">
-    <input type="submit" class="btn btn-primary asset-create-modal" value="<&|/l&>Create new asset</&>" />
+    <input type="submit" class="btn btn-primary" value="<&|/l&>Create new asset</&>" />
   </div>
 </form>
diff --git a/share/html/Asset/Elements/CreateInCatalog b/share/html/Asset/Elements/CreateInCatalog
deleted file mode 100644
index 58f966a20e..0000000000
--- a/share/html/Asset/Elements/CreateInCatalog
+++ /dev/null
@@ -1,62 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
-%#                                          <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<form action="<% RT->Config->Get("WebPath") %>/Asset/Create.html" id="AssetCreateInCatalog">
-  <div class="form-row">
-    <div class="col-md-12 text-center">
-      <&|/l&>Select a catalog for your new asset.</&>
-      <div class="d-inline-block">
-        <& /Asset/Elements/SelectCatalog &>
-      </div>
-    </div>
-  </div>
-  <div class="form-row">
-    <div class="col-md-12">
-      <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to the Create Asset page.") &>
-    </div>
-  </div>
-</form>
diff --git a/share/html/Asset/Helpers/CreateInCatalog b/share/html/Asset/Helpers/CreateInCatalog
deleted file mode 100644
index 66c261a024..0000000000
--- a/share/html/Asset/Helpers/CreateInCatalog
+++ /dev/null
@@ -1,61 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
-%#                                          <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<div class="modal-dialog modal-dialog-centered" role="document">
-  <div class="modal-content">
-    <div class="modal-header">
-      <h5 class="modal-title"><&|/l&>Create Asset</&></h5>
-      <a href="javascript:void(0)" class="close" data-dismiss="modal" aria-label="Close">
-        <span aria-hidden="true">×</span>
-      </a>
-    </div>
-    <div class="modal-body">
-        <& /Asset/Elements/CreateInCatalog &>
-    </div>
-  </div>
-</div>
-% $m->abort;
diff --git a/share/static/js/assets.js b/share/static/js/assets.js
index 3131d269eb..a70a4dcd62 100644
--- a/share/static/js/assets.js
+++ b/share/static/js/assets.js
@@ -46,11 +46,4 @@ jQuery(function() {
             showModal
         );
     });
-    jQuery("#assets-create, .asset-create-modal").click(function(ev){
-        ev.preventDefault();
-        jQuery.get(
-            RT.Config.WebHomePath + "/Asset/Helpers/CreateInCatalog",
-            showModal
-        );
-    });
 });

commit 2ee16f6bd4504017a251b1c866142c1a0a5dea88
Author: michel <michel at bestpractical.com>
Date:   Wed Feb 26 15:37:12 2020 +0100

    Test catalog select on asset create page

diff --git a/lib/RT/Test/Assets.pm b/lib/RT/Test/Assets.pm
index 57dcbb524f..193d15f646 100644
--- a/lib/RT/Test/Assets.pm
+++ b/lib/RT/Test/Assets.pm
@@ -80,6 +80,24 @@ sub create_catalog {
     }
 }
 
+sub load_or_create_catalog {
+    my $self = shift;
+    my %args = ( Disabled => 0, @_ );
+    my $obj = RT::Catalog->new( RT->SystemUser );
+    if ( $args{'Name'} ) {
+        $obj->LoadByCols( Name => $args{'Name'} );
+    } else {
+        die "Name is required";
+    }
+    unless ( $obj->id ) {
+        my ($val, $msg) = $obj->Create( %args );
+        die "$msg" unless $val;
+    }
+
+    return $obj;
+}
+
+
 sub create_asset {
     my %info  = @_;
     my $asset = RT::Asset->new( RT->SystemUser );
@@ -128,4 +146,15 @@ sub apply_cfs {
     return $success;
 }
 
+sub last_asset {
+    my $self = shift;
+    my $current = shift;
+    $current = $current ? RT::CurrentUser->new($current) : RT->SystemUser;
+    my $assets = RT::Assets->new( $current );
+    $assets->OrderBy( FIELD => 'id', ORDER => 'DESC' );
+    $assets->Limit( FIELD => 'id', OPERATOR => '>', VALUE => '0' );
+    $assets->RowsPerPage( 1 );
+    return $assets->First;
+}
+
 1;
diff --git a/t/assets/web.t b/t/assets/web.t
index 2753128e1a..8e6f75fdad 100644
--- a/t/assets/web.t
+++ b/t/assets/web.t
@@ -33,10 +33,10 @@ ok $m->login, "Logged in agent";
 diag "Create basic asset (no CFs)";
 {
     $m->follow_link_ok({ id => "assets-create" }, "Asset create link");
-    $m->submit_form_ok({ with_fields => { Catalog => $catalog->id } }, "Picked a catalog");
     $m->submit_form_ok({
         with_fields => {
             id          => 'new',
+            Catalog     => $catalog->id,
             Name        => 'Thinkpad T420s',
             Description => 'A laptop',
         },
diff --git a/t/web/asset_create.t b/t/web/asset_create.t
new file mode 100644
index 0000000000..85f0944a7e
--- /dev/null
+++ b/t/web/asset_create.t
@@ -0,0 +1,72 @@
+use strict;
+use warnings;
+
+use RT::Test::Assets tests => undef;
+use RT::Lifecycle;
+
+# populate lifecycles
+my $lifecycles = RT->Config->Get('Lifecycles');
+RT->Config->Set(
+    Lifecycles => %{$lifecycles},
+    foo        => {
+        type => 'asset',
+        initial  => ['new'],
+        active   => ['tracked'],
+        inactive => ['retired'],
+        defaults => { on_create => 'new', },
+    },
+);
+RT::Lifecycle->FillCache();
+
+RT->Config->Set( DefaultCatalog => 'Default catalog' );
+
+# populate test catalogs
+my $catalog_1 = RT::Test::Assets->load_or_create_catalog( Name => 'Default catalog' );
+ok( $catalog_1, 'created catalog 1' );
+my $catalog_2 = RT::Test::Assets->load_or_create_catalog( Name => 'Another catalog', Lifecycle => 'foo' );
+ok( $catalog_2, 'created catalog 2 id:' . $catalog_2->id );
+
+my ( $baseurl, $m ) = RT::Test->started_ok;
+ok $m->login;
+
+# set up custom field on catalog 2
+my $cf = RT::Test::Assets::create_cf( Name => 'test_cf', Catalog => $catalog_2->Name, Type => 'FreeformSingle' );
+$cf->AddToObject( $catalog_2 );
+ok( $cf, "custom field created (id:" . $cf->Id . ")" );
+my $cf_form_id    = 'Object-RT::Asset--CustomField-' . $cf->Id . '-Value';
+my $cf_test_value = "some string for test_cf $$";
+
+# load initial asset create page without specifying catalog
+# should have default catalog with no custom fields
+note('load create asset page with defaults');
+$m->get_ok('/Asset/Create.html?');
+
+ok( !$m->form_name('CreateAsset')->find_input($cf_form_id), 'custom field not present' );
+is( $m->form_name('CreateAsset')->value('Catalog'), $catalog_1->id, 'Catalog selection dropdown populated and pre-selected' );
+is( $m->form_name('CreateAsset')->value('Status'), 'new', 'Status selection dropdown populated and pre-selected' );
+
+# test asset creation on reload from selected catalog, specifying catalog with custom fields
+note('reload asset create page with selected catalog');
+$m->get_ok( '/Asset/Create.html?Catalog=' . $catalog_2->id, 'go to asset create page' );
+
+is( $m->form_name('CreateAsset')->value('Catalog'), $catalog_2->id, 'Catalog selection dropdown populated and pre-selected' );
+ok( $m->form_name('CreateAsset')->find_input($cf_form_id), 'custom field present' );
+is( $m->form_name('CreateAsset')->value($cf_form_id), '', 'custom field present and empty' );
+
+my $form         = $m->form_name('CreateAsset');
+my $status_input = $form->find_input('Status');
+is_deeply(
+    [ $status_input->possible_values ],
+    [ 'new', 'tracked', 'retired' ],
+    'status selectbox shows custom lifecycle for queue'
+);
+note('submit populated form');
+$m->submit_form( fields => { Name => 'asset foo', 'Catalog' => $catalog_2->id, $cf_form_id => $cf_test_value } );
+$m->text_contains( 'test_cf',      'custom field populated in display' );
+$m->text_contains( $cf_test_value, 'custom field populated in display' );
+
+my $asset = RT::Test::Assets->last_asset;
+ok( $asset->id, 'asset is created' );
+is( $asset->CatalogObj->id, $catalog_2->id, 'asset created with correct catalog' );
+
+done_testing();

commit 84040ca61adb6b47b3fc8015337bce6a0f0bb3e9
Merge: 5f71e4786b 2ee16f6bd4
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Apr 24 06:05:06 2020 +0800

    Merge branch '5.0/remove-catalog-modal' into 5.0-trunk

diff --cc share/html/Admin/Assets/Catalogs/Modify.html
index 38a7e83094,2b82f50d3e..ce43464da9
--- a/share/html/Admin/Assets/Catalogs/Modify.html
+++ b/share/html/Admin/Assets/Catalogs/Modify.html
@@@ -49,10 -49,11 +49,11 @@@
  <& /Elements/Tabs &>
  <& /Elements/ListActions, actions => \@results &>
  
 -<form method="post" enctype="multipart/form-data" id="ModifyCatalog" action="Modify.html">
 +<form method="post" enctype="multipart/form-data" id="ModifyCatalog" action="Modify.html" class="mx-auto max-width-lg">
    <input type="hidden" name="id" value="<% $catalog->id %>">
+   <input type="hidden" name="CatalogChanged" value="0">
  
 -  <&| /Widgets/TitleBox, title => loc("Basics"), class => "catalog-basics" &>
 +  <&| /Widgets/TitleBox, title => loc("Basics"), class => "catalog-basics", content_class => 'mx-auto width-sm' &>
      <& Elements/EditBasics, %ARGS, CatalogObj => $catalog &>
    </&>
  

-----------------------------------------------------------------------


More information about the rt-commit mailing list