Ejemplo n.º 1
0
 }
 $type = $field->type;
 if (in_array($type, array('checkbox'))) {
     $infoClass = "checkInfo";
 }
 $showInfo = false;
 if ((!$field->hiddenInfo || $object->id && !$field->hiddenInfo->edit || !$object->id && !$field->hiddenInfo->add) && $field->info) {
     $showInfo = true;
 }
 $infoSpans = "";
 //info
 if ($field->info || $field->specialInfo || $field->showDimensions) {
     if ($showInfo) {
         $infoSpans .= "<span class='info " . $infoClass . $infoWidthClass . "'>" . $field->info . "</span>";
     }
     if ($type == 'image' && $modelConfig->name == 'ModelImage' && ($dimensions = AdminHelper::modelImageMinDimensions())) {
         if ($dimensions[2] == 'resize') {
             $infoSpans .= "<span class='info " . $infoWidthClass . "'>" . trans('gtcms.minimumDimensions') . ": <strong>" . $dimensions[0] . "px width</strong> OR <strong>" . $dimensions[1] . "px height</strong></span>";
         } else {
             if ($dimensions[2] == 'minWidth') {
                 $infoSpans .= "<span class='info " . $infoWidthClass . "'>" . trans('gtcms.minimumDimensions') . ": <strong>" . $dimensions[0] . "px width</strong></span>";
             } else {
                 if ($dimensions[2] == 'minHeight') {
                     $infoSpans .= "<span class='info " . $infoWidthClass . "'>" . trans('gtcms.minimumDimensions') . ": <strong>" . $dimensions[1] . "px height</strong></span>";
                 } else {
                     $infoSpans .= "<span class='info " . $infoWidthClass . "'>" . trans('gtcms.minimumDimensions') . ": <strong>" . $dimensions[0] . "px</strong> x <strong>" . $dimensions[1] . "px</strong></span>";
                 }
             }
         }
     } else {
         if ($type == 'image' && $modelConfig->name != 'ModelImage') {