<?php
/**
 * YAWIK
 *
 * @filesource
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
 * @license   MIT
 */
$headline = $this->isNew 
          ? /*@translate*/ 'Create group' 
          : /*@translate*/ 'Edit group';

$this->headTitle('My')->prepend($headline);
?>
<h1><?php echo $this->translate($headline) ?></h1>

<?php 
$this->form->setAttributes(
    array(
        'id' => 'auth-form-group',
    )
);
$this->form->get('buttons')->get('cancel')->setAttribute(
    'onclick', 
    'location.href="' . $this->url('lang/my-groups') . '"; return false;'
);
echo $this->form($this->form);
?>


<div id="search-users-modal" class="modal modal-scrollable fade" tabindex="-1" role="dialog" aria-labelledby="label-search-user" aria-hidden="true">
<div class="modal-dialog modal-lg">
    <div class="modal-content">
    <div class="modal-header">
      <div class="row" id="label-search-user"> 
      <div class="row" id="label-search-user">
        <form name="search-users" class="col-xs-11">
            <div class="input-group">
                <input class="form-control" type="text" name="query" id="search-users-query" value="" placeholder="<?php echo $this->translate("search for users");?>">
                <span class="input-group-btn">
                    <button id="search-users-clear" class="btn btn-default" type="button" >X</button>
                </span>
            </div>
        </form>
        <button type="button" class="close col-xs-1" data-dismiss="modal" aria-hidden="true">×</button>
      </div>
      </div>
      <div class="modal-body">
            <span data-template="<?php echo $this->escapeHtmlAttr('
                <div id="search-users-result-__user_id__" 
                    data-id="__user_id__" 
                    data-name="__name__" 
                    data-company="__company_name__"
                    data-position="__company_position__"
                    data-image="__image_uri__"
                    class="panel panel-default panel-body"
                >
                    <button data-user-id="__user_id__" class="btn btn-default pull-right"><span class="yk-icon yk-icon-plus"></span></button>
                    <div class="portrait">
                        ##IMAGE:<img src="__image_uri__">##
                        ##ICON:<span class="yk-icon yk-icon-portrait fa-2x"></span>##
                    </div>
                    <div>
                        <strong>__name__</strong>
                        (__company_name__)
                    </div>
                </div>
                
             ') ?>"></span>
            
            <div id="search-users-result"></div>
      </div>
      <div class="modal-footer">
          <button class="btn btn-default" data-dismiss="modal" aria-hidden="true"><?php echo $this->translate('Ok') ?></button>
      </div>
    </div>
  </div>
</div>