<div>
<div class="checklist relative" data-checklist-id="<?php echo $list['id']; ?>">
<div class="checkbox checkbox-success checklist-checkbox" data-toggle="tooltip" title="">
<input type="checkbox" <?php if($list['finished1'] == 1 && $list['finished_from1'] != get_staff_user_id() && !is_admin()){echo 'disabled';} ?> name="checklist-box" <?php if($list['finished1'] == 1){echo 'checked';}; ?>>
<label for=""><span class="hide"><?php echo $list['description']; ?></span></label>
<textarea data-taskid="<?php echo $task_id; ?>" name="checklist-description" rows="1"<?php if($list['addedfrom'] != get_staff_user_id() && !has_permission('tasks','','edit')){echo ' disabled';} ?>><?php echo clear_textarea_breaks($list['description']); ?></textarea>
<?php if(has_permission('tasks','','delete') || $list['addedfrom'] == get_staff_user_id()){ ?>
<a href="#" class="pull-right text-muted remove-checklist" onclick="delete_checklist_item(<?php echo $list['id']; ?>,this); return false;"><i class="fa fa-remove"></i>
</a>
<?php } ?>
<?php if(has_permission('checklist_templates','','create')){ ?>
<a href="#" class="pull-right text-muted mright5 save-checklist-template<?php if($list['description'] == '' || total_rows(db_prefix().'tasks_checklist_templates',array('description'=>$list['description'])) > 0){echo ' hide';} ?>" data-toggle="tooltip" data-title="<?php echo _l('save_as_template'); ?>" onclick="save_checklist_item_template(<?php echo $list['id']; ?>,this); return false;">
<i class="fa fa-level-up" aria-hidden="true"></i>
</a>
<?php } ?>
</div>
<?php if($list['finished1'] == 1 || $list['addedfrom'] != get_staff_user_id()){ ?>
<p class="font-medium-xs mtop15 text-muted checklist-item-info">
<?php
if($list['addedfrom'] != get_staff_user_id()) {
echo _l('Добавлено',get_staff_full_name($list['addedfrom']));
}
if($list['addedfrom'] != get_staff_user_id() && $list['finished1'] == 1) {
echo ' - ';
}
if($list['finished1'] == 1){
echo _l('Подтвердил',get_staff_full_name($list['finished_from1']));
}
?>