File tree 1 file changed +11
-1
lines changed
app/assets/javascripts/hydra-editor
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,11 @@ export class FieldManager {
22
22
this . init ( ) ;
23
23
}
24
24
25
+ // call _addInitialID
25
26
init ( ) {
26
27
this . _addInitialClasses ( ) ;
27
- this . _addAriaLiveRegions ( )
28
+ this . _addInitialID ( ) ;
29
+ this . _addAriaLiveRegions ( ) ;
28
30
this . _appendControls ( ) ;
29
31
this . _attachEvents ( ) ;
30
32
this . _addCallbacks ( ) ;
@@ -35,6 +37,14 @@ export class FieldManager {
35
37
$ ( this . fieldWrapperClass , this . element ) . addClass ( "input-group input-append" ) ;
36
38
}
37
39
40
+ // ensure ID is assigned
41
+ _addInitialID ( ) {
42
+ let id = this . element . find ( '.multi_value.form-control' ) . attr ( 'id' ) + '_' + 'label' ;
43
+ if ( id != "undefined_label" ) {
44
+ this . element . find ( 'label' ) . attr ( 'id' , id ) ;
45
+ }
46
+ }
47
+
38
48
_addAriaLiveRegions ( ) {
39
49
$ ( this . element ) . find ( '.listing' ) . attr ( 'aria-live' , 'polite' )
40
50
}
You can’t perform that action at this time.
0 commit comments