diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:32:26 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-07-09 22:32:26 -0700 |
commit | 026dc7ad72ba972f230b6709e31fa64397d75ad4 (patch) | |
tree | c5af1a7ac9154744afc3660e9a9405892f2bb50b /rt/share/html/Elements/EditCustomFieldBinary | |
parent | 07b4bc84d1078f7390221d766cdb3142513db4b0 (diff) | |
parent | 1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 (diff) |
merge RT 4.2.11 and Header changes to disable RT javascript, RT#34237
Diffstat (limited to 'rt/share/html/Elements/EditCustomFieldBinary')
-rw-r--r-- | rt/share/html/Elements/EditCustomFieldBinary | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/rt/share/html/Elements/EditCustomFieldBinary b/rt/share/html/Elements/EditCustomFieldBinary index 7a2de4995..fc6ee3f26 100644 --- a/rt/share/html/Elements/EditCustomFieldBinary +++ b/rt/share/html/Elements/EditCustomFieldBinary @@ -47,15 +47,26 @@ %# END BPS TAGGED BLOCK }}} % while ( $Values and my $value = $Values->Next ) { %# XXX - let user download the file(s) here? -<input type="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" class="checkbox CF-<%$CustomField->id%>-Edit" value="<% $value->Id %>" /><a href="<%RT->Config->Get('WebPath')%>/Download/CustomFieldValue/<% $value->Id %>/<% $value->Content |un %>"><% $value->Content %></a><br /> +<input type="checkbox" name="<%$delete_name%>" class="checkbox CF-<%$CustomField->id%>-Edit" value="<% $value->Id %>" /><a href="<%RT->Config->Get('WebPath')%>/Download/CustomFieldValue/<% $value->Id %>/<% $value->Content |un %>"><% $value->Content %></a><br /> % } -% if (!$MaxValues || !$Values || $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 +$Name => undef $Default => undef $Values => undef $MaxValues => undef |