<div class="row fullheight scroll-y" data-ng-controller="ClientCreationCtrl as create">
    <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 col-sm-12 fullheight">
        <div class="panel panel-default max-fullheight scroll-y nomargin">
            <form name="newClientForm" data-ng-submit="create.addClient()">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-sm-6">
                            <h3>{{'clients.newClient' | translate}}</h3>
                        </div>
                        <div class="col-lg-5 col-lg-offset-1 col-md-5 col-md-offset-1 col-sm-6 padding-top">
                            <div data-material-input
                                 data-input-label="{{'clients.refNumber'|translate}}"
                                 data-input-type="text"
                                 data-input-id="refnumber"
                                 data-ng-model="create.newClient.refnumber"
                                 data-input-required="true"></div>
                        </div>
                    </div>

                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-md-6">
                            <h3>{{ 'clients.companyName'|translate }}</h3>
                            <div data-material-input
                                 data-input-label="{{'clients.name'|translate}}"
                                 data-input-type="text"
                                 data-input-id="companyname"
                                 data-ng-model="create.newClient.companyname"
                                 data-input-required="!create.newClient.contact_lastname"></div> <span data-ng-show="newClientForm.$valid">Name: {{create.newClient.contact_lastname}}</span>
                            <div data-material-input
                                 data-input-label="{{'clients.streetNo'|translate}}"
                                 data-input-type="text"
                                 data-input-id="street_no"
                                 data-ng-model="create.newClient.street_no"></div>
                            <div data-material-input
                                 data-input-label="{{'clients.additional'|translate}}"
                                 data-input-type="text"
                                 data-input-id="additional"
                                 data-ng-model="create.newClient.additional"></div>
                            <div class="row">
                                <div class="col-xs-4">
                                    <div data-material-input
                                         data-input-label="{{'clients.zip'|translate}}"
                                         data-input-type="text"
                                         data-input-id="zip"
                                         data-ng-model="create.newClient.zip"></div>
                                </div>
                                <div class="col-xs-8">
                                    <div data-material-input
                                         data-input-label="{{'clients.city'|translate}}"
                                         data-input-type="text"
                                         data-input-id="city"
                                         data-ng-model="create.newClient.city"></div>
                                </div>
                            </div>
                            <div data-material-input
                                 data-input-label="{{'clients.country'|translate}}"
                                 data-input-type="text"
                                 data-input-id="country"
                                 data-ng-model="create.newClient.country"></div>

                        </div>


                        <div class="col-md-5 col-md-offset-1">
                            <h3>{{ 'clients.contact'|translate }}</h3>

                            <div data-material-input
                                 data-input-label="{{'clients.gender'|translate}}"
                                 data-input-type="select"
                                 data-input-id="contact_gender"
                                 data-ng-model="create.newClient.contact_gender"
                                 data-input-select-options="create.genderOptions"
                                 data-input-select-option-value="id"
                                 data-input-select-option-name="name"></div>
                            <div data-material-input
                                 data-input-label="{{'clients.firstName'|translate}}"
                                 data-input-type="text"
                                 data-input-id="contact_firstname"
                                 data-ng-model="create.newClient.contact_firstname"></div>
                            <div data-material-input
                                 data-input-label="{{'clients.lastName'|translate}}"
                                 data-input-type="text"
                                 data-input-id="contact_lastname"
                                 data-ng-model="create.newClient.contact_lastname"
                                 data-input-required="!create.newClient.companyname"></div>

                            <h3>{{ 'clients.categories'|translate }}</h3>
                            <div data-material-input
                                 data-input-label="{{'clients.categories'|translate}}"
                                 data-input-type="selectMultiple"
                                 data-input-id="categories"
                                 data-ng-model="create.newClientCategories"
                                 data-input-select-options="create.allCategories"
                                 data-input-select-option-value="id"
                                 data-input-select-option-name="name"
                                 data-input-select-searchable="true"
                                ></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="comment">{{'clients.comment'|translate}}</label>
                        <textarea class="form-control" id="comment" placeholder="{{'clients.comment'|translate}}" data-ng-model="create.newClient.comment"></textarea>
                    </div>
                    <div class="pull-right">
                        <button class="btn btn-danger" data-ng-click="create.cancel()">{{'global.cancel'|translate}}</button>
                        <button type="submit" class="btn btn-success">{{'clients.addClient'|translate}}</button>
                    </div>
                </div>


            </form>
        </div>
    </div>

</div>