[Rt-commit] rt branch, 5.0/allow-inline-edit-file-submissions, created. rt-5.0.0-22-geb8b3fa632
Craig Kaiser
craig at bestpractical.com
Fri Oct 30 11:06:11 EDT 2020
The branch, 5.0/allow-inline-edit-file-submissions has been created
at eb8b3fa632bc7e9e0b22c284d725ccb49e57ef53 (commit)
- Log -----------------------------------------------------------------
commit eb8b3fa632bc7e9e0b22c284d725ccb49e57ef53
Author: craig kaiser <craig at bestpractical.com>
Date: Tue Sep 15 11:23:03 2020 -0400
Add 'enctype=multipart/form-data' to inline edit forms
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..c0d132ca7e 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 &>
@@ -110,7 +110,7 @@ my $people_behavior = $InlineEdit ? ($inline_edit_behavior{People} || $inline_ed
</div>
% }
% if ($people_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/EditPeopleInline, Ticket => $Ticket &>
<div class="form-row">
@@ -159,7 +159,7 @@ my $dates_behavior = $InlineEdit ? ($inline_edit_behavior{Dates} || $inline_edit
</div>
% }
% if ($dates_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/EditDates, TicketObj => $Ticket &>
<div class="form-row">
@@ -205,7 +205,7 @@ push @extra, (titleright_raw => $links_titleright) if $links_titleright;
</div>
% }
% if ($links_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 %>" />
<& /Elements/EditLinks, Object => $Ticket, TwoColumn => 0 &>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list