X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FAdmin%2FElements%2FEditCustomField;h=500e9119176bcb025da45414de56d372bf00e390;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hp=920698d98bcff25e2b15a35f3f392d1254e5c971;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/share/html/Admin/Elements/EditCustomField b/rt/share/html/Admin/Elements/EditCustomField index 920698d98..500e91191 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-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 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);