<div class="row">
    <h3>Variante/Modification</h3></br></br>
    <div class="alert bg-danger closeable" role="alert" id="msgError" style="margin: 80px">
        {{error_response}}.
        <i class="ion-close-round" style="float: right;" ng-click="hideMsgError()"></i>
    </div>

    <div id="divTable" class="animate-bottom" >
        <form name="formVariant">
            <div class="col-md-10 col-md-offset-2" >
                <label class="checkbox-inline custom-checkbox nowrap" style="float: left" >
                    <input type="checkbox"  ng-model="deactivateMdl" ng-change="checkDeactivate(deactivateMdl)" ng-checked="detailVariants.deactivated == 1"/>
                    <span>Désactivé</span>
                </label></br>

            </div></br></br>
            <div class="col-md-6 col-md-offset-2">
                <div class="panel panel-default">

                    <div class="panel-heading">
                        <h3 class="panel-title">Informations Générales</h3>
                    </div>
                    <div class="panel-body" >
                        <div class="form-group">
                            <label  class="col-sm-3 control-label">Code</label>
                            <div class="col-sm-7" >
                                <input type="text"
                                       name="code"
                                       class="form-control"
                                       ng-model="codeMdl"
                                       ng-change="checkCode(codeMdl)"
                                       ng-maxlength="20"
                                       ng-minlength="2"
                                       required/>
                                <span ng-show="formVariant.code.$error.pattern" class="error-msg-server">Code invalid.</span>
                                <span ng-show="formVariant.code.$error.minlength" class="error-msg-server">Code trop court.</span>
                                <span ng-show="formVariant.code.$error.maxlength" class="error-msg-server">Code trop long.</span>
                            </div>
                        </div></br></br>
                        <div class="form-group">
                            <label  class="col-sm-4 control-label" style="text-align: left" >
                                <file-field ng-model="pictureMDL" ng-change="checkPic(pictureMDL)" class="btn" ng-class="{'btn-success':pictureMDL}" preview="previewImage">Choisir une image</file-field>
                            </label>
                            <div class="col-sm-4"><img ng-src="{{previewImage}}" style="width: 150px">{{pictureMDL.name}}</div>
                        </div></br></br>
                    </div>
                </div>
                <div style="float: right">
                    <button class="btn btn-flexo" ng-click="updateVariant()" ng-disabled="formVariant.$invalid">Valider</button>
                    <button class="btn btn-flexo " ui-sref="catalogue.variantes">Annuler</button>
                </div></br></br></br>
                <div class="loader-login" id="LoaderdivBottom" style="margin:0 auto;"></div>
                <div class="alert bg-danger closeable" role="alert" id="msgBottom">
                    {{error_update_variant}}.
                    <i class="ion-close-round" style="float: right;" ng-click="hideMsg()"></i>
                </div>
            </div>
        </form>
    </div>
</div>