<?php
/**
 * YAWIK
 *
 * @filesource
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
 * @license   MIT
 */
/**
 * {{rtd: Renders the fieldset for adding Social Profiles to an Application}}
 */


$this->headScript()->appendFile($this->basePath('modules/Auth/js/form.socialprofiles.js'))
                   ->appendFile($this->basepath('modules/Core/js/core.reloadable-modal.js'));
$description = $this->element->getOption('description');

if ($description):?>
<div class="row">
<div class="col-md-8">
<div class="panel panel-default"><div class="panel-body">
        <?php endif?>
<?=$this->formCollection($this->element);?>
<?php foreach ($this->element as $element):?>
    <?=$this->formElementErrors($element)?>
<?php endforeach; if ($description):?>
</div></div>
</div>
<div class="col-md-4">
    <div class="alert alert-info"><?=$description?></div>
</div>
</div>
<?php endif?>
<div class="modal fade modal-scrollable" id="<?=$this->element->getAttribute('id') ?>-preview-box" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="social-profile-label">
            <span class="fa-spin yk-icon yk-icon-spinner"></span>
            <?=$this->translate('Loading')?> ...</h4>
      </div>
      <div class="modal-body">
        
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal"><?=$this->translate('Close') ?></button>
      </div>
    </div>
  </div>
</div>

