<div class="form areas-interests">
  <div class="row no-space-xs">
    <?php foreach ($categories as $key => $category) { ?>
      <div class="col-xs-12 <?php echo (!$interests_categories) ? 'col-ms-6 col-sm-4' : '' ?> <?php echo ($interests_categories) ? 'bottom-border-gray' : '' ?>">
        <div class="content-box vertical-padding-small">
          <label class="checkbox checkbox-medium">
            <input type="checkbox" <?php echo ($category['checked']) ? 'checked="checked"' : '' ?> name="categories[<?php echo $category['id'] ?>][status]" id="<?php echo $category['id'] ?>" class="checkbox-entry js-check-control">
            <span class="checkbox-text interests-title" <?php echo ($this->data['interests_categories']) ? 'style="font-weight: bold;"' : '' ?>><?php echo $category['name'] ?></span>
          </label>
          <?php if ($interests_categories && isset($category['children']) && $category['children']) { ?>
            <div class="row no-space-xs">
              <?php foreach ($category['children'] as $key2 => $children) { ?>
                <div class="col-xs-12 col-ms-6 col-sm-4">
                  <div class="content-box">
                    <label class="checkbox checkbox-medium">
                      <input type="checkbox" <?php echo ($children['checked'] || $category['checked']) ? 'checked="checked"' : '' ?> name="categories[<?php echo $category['id'] ?>][<?php echo $children['id'] ?>]" data-parent-id="<?php echo $category['id'] ?>" id="<?php echo $children['id'] ?>" class="checkbox-entry js-check-controlled <?php echo $category['id'] ?>">
                      <span class="checkbox-text"><?php echo $children['name'] ?></span>
                    </label>
                  </div>
                </div>
              <?php } ?>
            </div>
          <?php } ?>
        </div>
      </div>
    <?php } ?>
  </div>
</div>