use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$this->out(Zen::PerlHandler->get("IId95dc0bf217db9fba36ea754931fc840->mnt_object_labels")->do($this->{C}));$this->out("\n\n");if ( $C->{FormType} eq 'add' ) {$this->out("");$C->{AtkLabel} = "atkLabelAdd";$this->out("");} elsif ( $C->{FormType} eq 'remove' ) {$this->out("");$C->{AtkLabel} = "atkLabelRemove";$this->out("");} else {$this->out("");$C->{AtkLabel} = "atkLabel";$this->out("");}$this->out("\n\n<div id=\"atkLabel_$C->{Record}{id}\" style=\"margin: 0; padding: 0\">\n\n");if ( $C->{EditMode} ) {$this->out("	<div class=\"form-group\">\n		<a class=atkListerControlRows style=\"font-weight:normal; font-size:80\%;\">All:</a>\n		<a class=atkListerControlRows style=\"font-weight:normal; font-size:80\%;\" href=\"javascript:atkLblCheckAll(\'$C->{AtkLabel}_$C->{Record}{id}\', true)\">check</a>\n		<a class=atkListerControlRows style=\"font-weight:normal; font-size:80\%;\" href=\"javascript:atkLblCheckAll(\'$C->{AtkLabel}_$C->{Record}{id}\', false)\">uncheck</a>\n	</div>\n");my $in = $C->{Labels};my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{lbl} = -1;for my $f (@$loop) {$C->{ITERATION}{lbl}++;$C->{lbl} = $f;$this->out("		<div class=\"form-group row\">\n			<label id=\'$C->{AtkLabel}_$C->{Record}{id}_a$C->{lbl}{id}\'  class=\'col-4 col-form-label\'>$C->{lbl}{name}</label>\n			<div class=\"col-8\">\n				<input class=\"form-control\" type=checkbox name=\'$C->{AtkLabel}_$C->{Record}{id}_cb\' value=\'$C->{lbl}{id}\' $C->{CheckedLabels}{$C->{lbl}{name}}>\n			</div>\n		</div>\n");}$this->out("	<div class=\"form-group\">\n");if ( $C->{FormMode} ) {$this->out("");if ( $C->{FormType} eq 'add' ) {$this->out("			<input class=\"btn btn-primary\" type=button class=atkButton value=\"Save\" onClick=\"atkLblSubmitObjectLabels(\'atkLabelAdd_$C->{Record}{id}\', \'$C->{LabelURL}&act=edit&mode=form&form_type=add\'); return false;\">\n");} elsif ( $C->{FormType} eq 'remove' ) {$this->out("				<input class=\"btn btn-primary\" type=button class=atkButton value=\"Save\" onClick=\"atkLblSubmitObjectLabels(\'atkLabelRemove_$C->{Record}{id}\', \'$C->{LabelURL}&act=edit&mode=form&form_type=remove\'); return false;\">\n");} else {$this->out("				<input class=\"btn btn-primary\" type=button class=atkButton value=\"Save\" onClick=\"atkLblSubmitObjectLabels(\'atkLabel_$C->{Record}{id}\', \'$C->{LabelURL}&act=edit&mode=form\'); return false;\">\n");}$this->out("");} else {$this->out("		<input type=button class=\"btn btn-primary\" value=\"OK\" onClick=\"atkLblSubmitObjectLabels(\'atkLabel_$C->{Record}{id}\', \'$C->{LabelURL}\'); return false;\">\n");}$this->out("	</div>\n");} else {$this->out("");if ( $C->{ObjLabels} ) {$this->out("		<a class=atkListerControlRows style=\"text-decoration:none;\" href=\"javascript:atkLblEditObjectLabels(\'$C->{Record}{id}\', \'$C->{LabelURL}&act=edit\');\">$C->{ObjLabels}</a>\n");} elsif ( $C->{HasLabels} ) {$this->out("		<a class=atkListerControlRows style=\"font-weight:normal;\" href=\"javascript:atkLblEditObjectLabels(\'$C->{Record}{id}\', \'$C->{LabelURL}&act=edit\');\">");if ( $C->{FormMode} ) {$this->out("Assign label");} else {$this->out("[L]");}$this->out("</a>\n");} else {$this->out("		<a class=atkListerControlRows style=\"font-weight:normal;\" href=\"javascript:alert(\'You should create some labels first\');\">");if ( $C->{FormMode} ) {$this->out("Assign label");} else {$this->out("[L]");}$this->out("</a>\n");}$this->out("\n");}$this->out("</div>\n\n");}