|
87 | 87 |
|
88 | 88 | .form-block__fields
|
89 | 89 | .fieldsets
|
90 |
| - ng-form.fieldset(name="font_{{$index + 1}}", ng-repeat="font in vm.submissionForm.fonts track by font.id") |
| 90 | + ng-form.fieldset(name="font{{$index + 1}}", ng-repeat="font in vm.submissionForm.fonts track by font.id") |
91 | 91 | dropdown(
|
92 | 92 | name="'font-source{{$index + 1}}'",
|
93 | 93 | options="vm.fontList{{$index + 1}}",
|
|
121 | 121 |
|
122 | 122 | .form-block__fields
|
123 | 123 | .fieldsets
|
124 |
| - ng-form.fieldset(name="stockArt_{{$index + 1}}", ng-repeat="stockArt in vm.submissionForm.stockArts track by stockArt.id") |
| 124 | + .fieldset(ng-repeat="stockArt in vm.submissionForm.stockArts track by stockArt.id") |
125 | 125 | tc-input.fieldset__input(
|
126 | 126 | label-text="Photo Description",
|
127 | 127 | placeholder="A picture of a girl",
|
128 |
| - input-value="stockArt.description" |
| 128 | + input-value="stockArt.description", |
| 129 | + input-name="photoDescription{{$index}}" |
129 | 130 | )
|
130 | 131 |
|
131 | 132 | tc-input.fieldset__input(
|
132 | 133 | label-text="Photo URL",
|
133 | 134 | placeholder="www.istockphoto.com",
|
134 |
| - input-value="stockArt.sourceUrl" |
| 135 | + input-value="stockArt.sourceUrl", |
| 136 | + input-name="photoURL{{$index}}", |
| 137 | + input-pattern="vm.urlRegEx" |
135 | 138 | )
|
136 | 139 |
|
| 140 | + .tc-error-messages(ng-show="submissionForm['photoURL' + $index].$dirty && submissionForm['photoURL' + $index].$invalid") |
| 141 | + p(ng-show="submissionForm['photoURL' + $index].$error.pattern") Not a valid url. |
| 142 | + |
137 | 143 | tc-input.fieldset__input(
|
138 | 144 | label-text="File Number",
|
139 | 145 | placeholder="u2434312",
|
140 |
| - input-value="stockArt.fileNumber" |
| 146 | + input-value="stockArt.fileNumber", |
| 147 | + input-name="fileNumber{{$index}}" |
141 | 148 | )
|
142 | 149 |
|
143 | 150 | button.fieldset__button.tc-btn.tc-btn-s(type="button", ng-click="vm.createAnotherStockArtFieldset()") + Add Stock Photo
|
|
0 commit comments