<div class="container-fluid">
<div class="row-fluid">
    <div class="btn-toolbar offset1">
        <div class="btn-group">
        <a class="btn" id="back" href="#{{backlink}}"><i class="icon-arrow-left" /></a>
        </div>

        <div class="btn-group">
        <a class="btn dropdown-toggle" data-toggle="dropdown" href="#{{href}}"
        data-target="#">
        Groups
        <span class="caret"></span>
        </a>
        <ul class="dropdown-menu" id="contactgroups">
            <li class="contactgroup hidden"></li>
            <li class="divider"></li>
            <li><a href="#{{contact.href}}" id="creategroupbtn"><i class="icon-empty"/> Create new group</a></li>
        </ul>
        </div>

        <div class="btn-group">
        <a id="remove" href="#{{backlink}}"
        {{#contact.id}}
        class="btn"
        {{/contact.id}}
        {{^contact.id}}
        class="btn disabled"
        {{/contact.id}}
        ><i class="icon-trash" /> Delete</a>
        </div>
    </div>
</div>
<div class="row-fluid">
{{#contact}}
<form class="form-horizontal">
    <input type="hidden" id="id" name="id" value="{{id}}">
    <fieldset>
        <div class="control-group">
            <label class="control-label thumbnail" for="displayname">
                <img src="http://placehold.it/100x100" alt="{{displayname}}'s picture">
            </label>
            <div class="controls container">
                <input required="required" type="text" class="input-xxlarge title" id="displayname" name="displayname" value="{{displayname}}">

                <div class="groups" id="contactgroupbadges"></div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="firstname">First name</label>
            <div class="controls">
                <input type="text" class="input-xlarge" id="firstname"
                name="firstname" value="{{firstname}}">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="lastname">Last name</label>
            <div class="controls">
                <input type="text" class="input-xlarge" id="lastname"
                name="lastname" value="{{lastname}}">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="email">Email</label>
            <div class="controls">
                <input type="text" class="input-xlarge" id="email" name="email" value="{{email}}">
            </div>
        </div>
    </fieldset>
</form>
{{/contact}}
</div>
<div id="modals" />
</div>
