Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit aa1e60e

Browse files
author
Caleb Kniffen
committed
Renamed reverse parameter for form.$setSubmitted to setOnChildren.
Fixed spacing to be valid with jscs.
1 parent ca613d8 commit aa1e60e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ng/directive/form.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,14 @@ function FormController(element, attrs, $scope, $animate, $interpolate) {
276276
* @description
277277
* Sets the form to its submitted state.
278278
*/
279-
form.$setSubmitted = function(reverse) {
279+
form.$setSubmitted = function(setOnChildren) {
280280
$animate.addClass(element, SUBMITTED_CLASS);
281281
form.$submitted = true;
282-
if(!reverse){
282+
if (!setOnChildren) {
283283
parentForm.$setSubmitted();
284284
}
285285
forEach(controls, function(control) {
286-
if(control.$setSubmitted){
286+
if (control.$setSubmitted) {
287287
control.$setSubmitted(true);
288288
}
289289
});

test/ng/directive/formSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ describe('form', function() {
410410
expect(parent.$submitted).toBeTruthy();
411411
});
412412

413-
it('should set $submitted equal to true on child forms when parent is submitted', function(){
413+
it('should set $submitted equal to true on child forms when parent is submitted', function() {
414414
doc = jqLite(
415415
'<ng:form name="parent">' +
416416
'<ng:form name="child">' +

0 commit comments

Comments
 (0)