projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rt 4.2.13 ticket#13852
[freeside.git]
/
rt
/
share
/
html
/
Elements
/
EditCustomFieldImage
diff --git
a/rt/share/html/Elements/EditCustomFieldImage
b/rt/share/html/Elements/EditCustomFieldImage
index
09cbf85
..
ec755a8
100644
(file)
--- a/
rt/share/html/Elements/EditCustomFieldImage
+++ b/
rt/share/html/Elements/EditCustomFieldImage
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-201
2
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-201
6
Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-46,16
+46,27
@@
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
%#
%# END BPS TAGGED BLOCK }}}
% while ($Values and my $value = $Values->Next ) {
-<input type="checkbox" class="checkbox" name="<%$
NamePrefix%><%$CustomField->Id%>-DeleteValueIds
" class="CF-<%$CustomField->id%>-Edit" value="<% $value->Id %>" /><& ShowCustomFieldImage, Object => $value &>
+<input type="checkbox" class="checkbox" name="<%$
delete_name%>
" class="CF-<%$CustomField->id%>-Edit" value="<% $value->Id %>" /><& ShowCustomFieldImage, Object => $value &>
<br />
% }
<br />
% }
-% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload" class="CF-<%$CustomField->id%>-Edit" />
+% if ($MaxValues && $Values && $Values->Count >= $MaxValues ) {
+<div class="hints">
+<&|/l&>Reached maximum number, so new values will override old ones.</&>
+</div>
% }
% }
+<input type="file" name="<%$name%>" class="CF-<%$CustomField->id%>-Edit" />
+
+<%INIT>
+my $name = $Name || $NamePrefix . $CustomField->Id . '-Upload';
+my $delete_name = $name;
+$delete_name =~ s!-Upload$!-DeleteValueIds!;
+</%INIT>
+
<%ARGS>
$Object => undef
$CustomField => undef
$NamePrefix => undef
<%ARGS>
$Object => undef
$CustomField => undef
$NamePrefix => undef
+$Name => undef
$Default => undef
$Values => undef
$MaxValues => undef
$Default => undef
$Values => undef
$MaxValues => undef