<form ng-submit="newPonderation();closeThisDialog();">
    <h3 class="modalTitle">Nouvelle Ponderation</h3>
    <div class="modalBody">

        <div class="form-group"  ng-class="{'has-error': (cfgList|arrayMap:'name').indexOf(newPonderationData.name)!=-1}">

            <label>Nom de la pondération</label>
            <input  class="form-control" type="text" ng-model="newPonderationData.name" required/>
            <div class="alert inlinealert alert-danger" ng-if="(cfgList|arrayMap:'name').indexOf(newPonderationData.name)!=-1">
                <translate> une pondération portant ce nom existe déja</translate>
            </div>
        </div>


        <hr/>
        <div class="form-group text-right">
            <button class="btn btn-primary" ng-disabled="!newPonderationData.name || newPonderationData.name == '' || (cfgList|arrayMap:'name').indexOf(newPonderationData.name)!=-1" >
                <translate> Ajouter </translate></label>
            </button>
        </div>
    </div>


</form>