Mailing List Archive

rt branch 5.0/change-asset-search-cfs-on-catalog-change created. rt-5.0.5-163-g364aef3a9a
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/change-asset-search-cfs-on-catalog-change has been created
at 364aef3a9af9eb14e4a30625fbb9be859e025e55 (commit)

- Log -----------------------------------------------------------------
commit 364aef3a9af9eb14e4a30625fbb9be859e025e55
Author: Jason Crome <jcrome@bestpractical.com>
Date: Wed Mar 20 10:49:14 2024 -0400

Change asset field in search when catalog changed

On the asset create and modify pages, when the catalog is changed, the
fields available to fill out change based upon what is configured for
that catalog. This was not completely ported to the asset simple search.
With this change, selecting the catalog in simple search will also
change the fields available to search by.

diff --git a/share/html/Asset/Elements/AssetSearchBasics b/share/html/Asset/Elements/AssetSearchBasics
index a6d3b69079..bd77bfd7bf 100644
--- a/share/html/Asset/Elements/AssetSearchBasics
+++ b/share/html/Asset/Elements/AssetSearchBasics
@@ -50,7 +50,7 @@
<div class="col-6">
<&| /Elements/LabeledValue, Label => loc('Catalog') &>
<& /Asset/Elements/SelectCatalog, Name => 'Catalog', CheckRight => "ShowCatalog",
- Default => $ARGS{'Catalog'}, OnChange => "jQuery('#AssetSearch').submit()"
+ Default => $ARGS{'Catalog'}, AutoSubmit => 1,
&>
</&>
</div>
diff --git a/share/html/Asset/Search/index.html b/share/html/Asset/Search/index.html
index f83c5a686c..bcf210186a 100644
--- a/share/html/Asset/Search/index.html
+++ b/share/html/Asset/Search/index.html
@@ -79,6 +79,7 @@ $m->callback( CallbackName => 'Initial', Assets => $assets, ARGSRef => \%ARGS);
% }
<span class="catalog <% CSSClass( $catalog_obj->Name ) %>">
<form action="<% RT->Config->Get('WebPath') %>/Asset/Search/index.html" id="AssetSearch">
+<input type="hidden" name="CatalogChanged" value="0">
<&| /Widgets/TitleBox, title => loc("Search Assets") &>
<& /Asset/Elements/AssetSearchBasics, %ARGS, CatalogObj => $catalog_obj &>
<& /Asset/Elements/AssetSearchPeople, %ARGS, CatalogObj => $catalog_obj &>

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


hooks/post-receive
--
rt
_______________________________________________
rt-commit mailing list
rt-commit@lists.bestpractical.com
https://lists.bestpractical.com/mailman/listinfo/rt-commit