<h2>{{title}}</h2>
<form class="form-inline" role="form" name="envForm" novalidate>
    <div class="form-group" ng-class="{'has-error': envForm.name.$error.required && envForm.name.$dirty}">
        <input type="text" name="name" ng-model="environment.name" class="form-control" placeholder="Enter name" maxlength="50" size="30" required/>
    </div>
    <div class="form-group">
        <input type="text" ng-model="environment.description" class="form-control" placeholder="Enter description" maxlength="200" size="100"/>
    </div>
    <button ng-click="callback()" ng-disabled="envForm.$invalid" type="button" class="btn btn-default"><span class="glyphicon {{submitIcon}}"></span></button>
</form>
<h2>{{title}}</h2>
<form class="form-inline" role="form" name="envForm" novalidate>
    <div class="form-group" ng-class="{'has-error': envForm.name.$error.required && envForm.name.$dirty}">
        <input type="text" name="name" ng-model="environment.name" class="form-control" placeholder="Enter name" maxlength="50" size="30" required/>
    </div>
    <div class="form-group">
        <input type="text" ng-model="environment.description" class="form-control" placeholder="Enter description" maxlength="200" size="100"/>
    </div>
    <button ng-click="callback(); envForm.$setPristine()" ng-disabled="envForm.$invalid" type="button" class="btn btn-default"><span class="glyphicon {{submitIcon}}"></span></button>
</form>
Reset the form to pristine when creating or updating an environment
Reset the form to pristine when creating or updating an environment
