[Rt-commit] rt branch, 5.0/allow-inline-edit-file-submissions, created. rt-5.0.0-22-g2586220fde

Craig Kaiser craig at bestpractical.com
Tue Sep 15 11:28:39 EDT 2020


The branch, 5.0/allow-inline-edit-file-submissions has been created
        at  2586220fde0ac3df6071fb773d1be0c23d64ca05 (commit)

- Log -----------------------------------------------------------------
commit 2586220fde0ac3df6071fb773d1be0c23d64ca05
Author: craig kaiser <craig at bestpractical.com>
Date:   Tue Sep 15 11:23:03 2020 -0400

    Add 'enctype=multipart/form-data' to custom field inline edit form
    
    Without this form attribute, when submitting a file for a custom field
    the browser will complain:
    
    Form contains a file input, but is missing method=POST and enctype=multipart/form-data
    on the form. The file will not be sent.

diff --git a/share/html/Elements/ShowCustomFieldCustomGroupings b/share/html/Elements/ShowCustomFieldCustomGroupings
index 9b6876042c..ee3c1af60c 100644
--- a/share/html/Elements/ShowCustomFieldCustomGroupings
+++ b/share/html/Elements/ShowCustomFieldCustomGroupings
@@ -92,7 +92,7 @@ for my $group ( @Groupings ) {
   </div>
 % }
 % if ($modify_behavior ne 'hide') {
-  <form class="inline-edit" action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post">
+  <form class="inline-edit" action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post" enctype="multipart/form-data">
     <input type="hidden" class="hidden" name="id" value="<% $Object->id %>" />
     <& /Elements/EditCustomFields, Object => $Object, Grouping => $group, InTable => 0 &>
     <div class="form-row">
diff --git a/share/html/Ticket/Elements/ShowSummary b/share/html/Ticket/Elements/ShowSummary
index 760664df74..7bdac31843 100644
--- a/share/html/Ticket/Elements/ShowSummary
+++ b/share/html/Ticket/Elements/ShowSummary
@@ -74,7 +74,7 @@ my $modify_behavior = $InlineEdit ? ($inline_edit_behavior{Basics} || $inline_ed
             </div>
 %       }
 %       if ($modify_behavior ne 'hide') {
-            <form class="inline-edit" action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post">
+            <form class="inline-edit" action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post" enctype="multipart/form-data">
                 <input type="hidden" class="hidden" name="id" value="<% $Ticket->id %>" />
                 <& /Ticket/Elements/EditBasics, TicketObj => $Ticket, InTable => 1, ExcludeOwner => 1, ExcludeCustomRoles => 1 &>
                 <& /Elements/EditCustomFields, Object => $Ticket, Grouping => 'Basics', InTable => 1 &>

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


More information about the rt-commit mailing list