7
7
</ div >
8
8
< div class ="AknFieldContainer-inputContainer ">
9
9
< select name ="translatedAttributes[] " id ="translated-attributes " class ="select2 label-field AknSettingField "
10
- multiple ="multiple ">
11
- < % _.each(attributes, function (attribute){ %>
12
- < option value ="<%= attribute.code %> "> < %- i18n.getLabel(attribute.labels, uiLocale, attribute.code) %>
13
- </ option >
14
- < % }); %>
10
+ multiple ="multiple " < % if(translatedAttributes.length > 0){ % > readonly="true" < % } % > >
11
+ < % _.each(attributes, function (attribute){ %>
12
+ < option value ="<%= attribute.code %> " < % if(translatedAttributes.includes(attribute.code)){ % > selected="selected" < % } % > > < %- i18n.getLabel(attribute.labels, uiLocale, attribute.code) %>
13
+ </ option >
14
+ < % }); %>
15
15
</ select >
16
16
</ div >
17
17
</ div >
22
22
</ label >
23
23
</ div >
24
24
< div class ="AknFieldContainer-inputContainer ">
25
- < select name ="sourceChannel " id ="source-channel " class ="select2 form-field label-field AknSettingField ">
26
- < % _.each(channels, function (channel, key){ %>
27
- < option value ="<%= channel.code %> "> < %- i18n.getLabel(channel.labels, uiLocale, channel.code) %> </ option >
28
- < % }); %>
25
+ < select name ="sourceChannel " id ="source-channel " class ="select2 form-field label-field AknSettingField " < % if(translatedAttributes.length > 0){ % > readonly="true" < % } % > >
26
+ < % _.each(channels, function (channel, key){ %>
27
+ < option value ="<%= channel.code %> " < % if(channel.code == sourceChannel){ % > selected="selected" < % } % > > < %- i18n.getLabel(channel.labels, uiLocale, channel.code) %> </ option >
28
+ < % }); %>
29
29
</ select >
30
30
</ div >
31
31
</ div >
36
36
</ label >
37
37
</ div >
38
38
< div class ="AknFieldContainer-inputContainer ">
39
- < select name ="sourceLocale " id ="source-locale " class ="select2 form-field label-field AknSettingField ">
40
- < % _.each(locales, function (locale, key){ %>
41
- < option value ="<%= locale.code %> "> < %= locale.label %> </ option >
42
- < % }); %>
39
+ < select name ="sourceLocale " id ="source-locale " class ="select2 form-field label-field AknSettingField " < % if(translatedAttributes.length > 0){ % > readonly="true" < % } % > >
40
+ < % _.each(locales, function (locale, key){ %>
41
+ < option value ="<%= locale.code %> " < % if(locale.code == sourceLocale){ % > selected="selected" < % } % > > < %= locale.label %> </ option >
42
+ < % }); %>
43
43
</ select >
44
44
</ div >
45
45
</ div >
50
50
</ label >
51
51
</ div >
52
52
< div class ="AknFieldContainer-inputContainer ">
53
- < select name ="targetChannel " id ="target-channel " class ="select2 form-field label-field AknSettingField ">
54
- < % _.each(channels, function (channel, key){ %>
55
- < option value ="<%= channel.code %> "> < %- i18n.getLabel(channel.labels, uiLocale, channel.code) %> </ option >
56
- < % }); %>
53
+ < select name ="targetChannel " id ="target-channel " class ="select2 form-field label-field AknSettingField " < % if(translatedAttributes.length > 0){ % > readonly="true" < % } % > >
54
+ < % _.each(channels, function (channel, key){ %>
55
+ < option value ="<%= channel.code %> " < % if(channel.code == targetChannel){ % > selected="selected" < % } % > > < %- i18n.getLabel(channel.labels, uiLocale, channel.code) %> </ option >
56
+ < % }); %>
57
57
</ select >
58
58
</ div >
59
59
</ div >
64
64
</ label >
65
65
</ div >
66
66
< div class ="AknFieldContainer-inputContainer ">
67
- < select name ="targetLocale " id ="target-locale " class ="select2 form-field label-field AknSettingField ">
68
- < % _.each(locales, function (locale, key){ %>
69
- < option value ="<%= locale.code %> "> < %= locale.label %> </ option >
70
- < % }); %>
67
+ < select name ="targetLocale " id ="target-locale " class ="select2 form-field label-field AknSettingField " < % if(translatedAttributes.length > 0){ % > readonly="true" < % } % > >
68
+ < % _.each(locales, function (locale, key){ %>
69
+ < option value ="<%= locale.code %> " < % if(locale.code == targetLocale){ % > selected="selected" < % } % > > < %= locale.label %> </ option >
70
+ < % }); %>
71
71
</ select >
72
72
</ div >
73
73
</ div >
0 commit comments