X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FElements%2FEditCustomField;h=e883a306ae91d8b0dafbae71b078b3944d77771e;hp=caf5ce838af2580a1cbf7f69d5638008b25bc365;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=7588a4ac90a9b07c08a3107cd1107d773be1c991 diff --git a/rt/share/html/Admin/Elements/EditCustomField b/rt/share/html/Admin/Elements/EditCustomField index caf5ce838..e883a306a 100755 --- a/rt/share/html/Admin/Elements/EditCustomField +++ b/rt/share/html/Admin/Elements/EditCustomField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -71,7 +71,8 @@ - /> <&|/l&>Enabled (Unchecking this box disables this custom field) + /> + @@ -100,19 +101,19 @@ if (! $CustomField ) { } else { if ($CustomField eq 'new') { - my ($val, $msg) = $CustomFieldObj->Create(Queue => $Queue, - Name => $Name, + my ($val, $msg) = $CustomFieldObj->Create(Queue => $Queue, + Name => $Name, Type => $Type, Description => $Description, - ); - + ); + # if there is an error, then abort. But since at this point there's # stuff already printed, clear it out. # (This only works in conjunction with temporarily turning autoflush # off in the files that use this component.) unless ($val) { - $m->clear_buffer; - Abort(loc("Could not create CustomField: [_1]", $msg), SuppressHeader => 1); + $m->clear_buffer; + Abort(loc("Could not create CustomField: [_1]", $msg), SuppressHeader => 1); } push @results, $msg; $CustomFieldObj->SetSortOrder($CustomFieldObj->id);