<div class="ui form segment"
        ng-class="{error: error}">
    <h2>User {{user.name}}</h2>

    <ng-include
        src="'src/partials/box/message.html'">
    </ng-include>

    <form name="editUserForm" ng-submit="edit($event)">
        <div class="field">
            <ng-check-box
                    ng-model="user.is_admin"
                    ng-change="edit($event)"
                    ng-description="Is administrator">
            </ng-check-box>
        </div>
    </form>
</div>

<div class="ui form segment"
        ng-class="{error: error}">
    <h3>Change password</h3>

    <form name="changePasswordForm" ng-submit="changePassword($event)">
        <div class="field">
            <label>New password</label>

            <div class="ui left labeled icon input">
                <input ng-model="newPassword" type="password">
                <i class="lock icon"></i>

                <div class="ui corner label">
                    <i class="icon asterisk"></i>
                </div>
            </div>
        </div>
        <div class="field">
            <div class="ui black submit button"
                 ng-click="changePassword($event)"
                    >Change password</div>
        </div>
    </form>
</div>

