<div class="content-header">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-6">
                <h2>{{::vm.translate.get('Translations')}}</h2>
            </div>
        </div>
    </div>
</div>
<section class="content">
    <div class="container-fluid">
        <div class="card">
            <div class="card-header">
                <div class="row">
                    <div class="col-md-8">
                        <h2 class="card-title ng-binding ng-scope">{{::vm.translate.get('Manage Translations')}}</h2><br />
                        <small>{{::vm.translate.get('Note that the updated translations only be affected after the application is restarted')}}</small>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group row">
                            <label class="col-sm-5 control-label">{{::vm.translate.get('Select Culture')}}</label>
                            <div class="col-sm-7">
                                <select class="form-control" ng-model="vm.selectedCultureId" ng-change="vm.changeCulture()" ng-options="culture.id as culture.name for culture in vm.cultures"></select>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="card-body">
                <form name="localizationForm" class="form-horizontal">
                    <div class="col-sm-offset-4 bg-danger" ng-show="vm.validationErrors">
                        <ul>
                            <li ng-repeat="error in vm.validationErrors">{{error}}</li>
                        </ul>
                    </div>
                    <hr />
                    <div class="form-group row" ng-repeat="item in vm.resources">
                        <label class="col-sm-4 control-label">{{item.key}}</label>
                        <div class="col-sm-8 has-feedback">
                            <input name="name" ng-model="item.value" class="form-control" aria-describedby="inputSuccess2Status" />
                            <span ng-hide="!item.isTranslated" class="fa fa-ok form-control-feedback" aria-hidden="true"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="">
                            <button class="btn btn-success float-right" ng-click="vm.save()"><span class="fa fa-save"></span> {{::vm.translate.get('Save')}}</button>
                            <button ui-sref="dashboard" class="btn btn-default">{{::vm.translate.get('Cancel')}}</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>