<div ng:controller="DocumentSettingsController" class="row-fluid" qn:fillheight>
    <div class="toolbar cfix">
        <div class="toolbar-group">
            <h3>
                <span ng:click="back()" class="circle circle-small blue"><span class="icon li_cloud"></span></span>
                {{$resource('documents.settings')}}
            </h3>
        </div>
        <div class="toolbar-group">
            <button title="{{$resource('utility.home')}}" class="button tooltip" ng:click="back()"><i class="icon-angle-left"></i></button>
            <button title="{{$resource('utility.refresh')}}" class="button tooltip" ng:click="refresh()"><i class="icon-refresh"></i></button>
            <button title="{{$resource('utility.reset')}}" class="button tooltip" ng:click="reset()"><i class=icon-undo></i></button>
        </div>
    </div>
    <div class="form fillh">
        <form name="DocSettings" class="form-horizontal">
            <div class="control-group required">
                <label class="control-label">{{$resource('documents.allowed_ext')}}</label>
                <div class="controls">
                    <input type="text" class="col10" name="AllowedExtensions" ng:model="settings.AllowedExtensions" required />
                    <div ng:show="errors['model.AllowedExtensions'][0]" class="error">{{$resource(errors['model.AllowedExtensions'][0])}}</div>
                </div>
            </div>
            <div class="control-group required">
                <label class="control-label">{{$resource('documents.max_allowed_size')}}</label>
                <div class="controls">
                    <input type="number" class="col10" name="MaxAllowedSize" ng:model="settings.MaxAllowedSize" required />
                    <div ng:show="errors['model.MaxAllowedSize'][0]" class="error">{{$resource(errors['model.MaxAllowedSize'][0])}}</div>
                </div>
            </div>
            <div class="control-group required">
                <label class="control-label">{{$resource('documents.cache_path')}}</label>
                <div class="controls">
                    <input type="text" class="col10" name="CachePath" ng:model="settings.CachePath" required />
                    <div ng:show="errors['model.CachePath'][0]" class="error">{{$resource(errors['model.CachePath'][0])}}</div>
                </div>
            </div>
            <div class="control-group required">
                <label class="control-label">{{$resource('documents.directory')}}</label>
                <div class="controls">
                    <input type="text" class="col10" name="Directory" ng:model="settings.Directory" required />
                    <div ng:show="errors['model.Directory'][0]" class="error">{{$resource(errors['model.Directory'][0])}}</div>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label"></label>
                <div class="controls">
                    <button class="button green"  ng:click="save()">{{$resource('documents.save')}}</button>
                    <button type="button" class="button" ng:click="back()">{{$resource('documents.cancel')}}</button>
                </div>
            </div> 
        </form>
    </div>
</div>