X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FElements%2FEditCustomField;h=4dba36da7b312ae4579e994054c05903ca92f666;hp=632b3d8f832ad50eeb80ad4fdffec10111ee9495;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=43a06151e47d2c59b833cbd8c26d97865ee850b6 diff --git a/rt/share/html/Admin/Elements/EditCustomField b/rt/share/html/Admin/Elements/EditCustomField index 632b3d8f8..4dba36da7 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-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2016 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);