File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -510,7 +510,7 @@ def set_from_fields(self):
510510 else :
511511 email = self .person .email_address ()
512512 self .fields ['from_contact' ].initial = email
513- self .fields ['from_contact' ].widget .attrs ['disabled ' ] = True
513+ self .fields ['from_contact' ].widget .attrs ['readonly ' ] = True
514514
515515 def set_to_fields (self ):
516516 '''Set to_groups and to_contacts options and initial value based on user
Original file line number Diff line number Diff line change 33@import " bootstrap/scss/mixins" ;
44@import " select2/src/scss/core" ;
55@import " select2-bootstrap-5-theme/src/include-all" ;
6+
7+ // Propagate readonly property from input to select2 instrumentation, based on
8+ // https://stackoverflow.com/questions/41807096/select2-make-it-readonly-not-disabled-from-js/55001516#55001516
9+ select [readonly ].select2-hidden-accessible + .select2-container {
10+ pointer-events : none ;
11+ touch-action : none ;
12+
13+ .select2-selection {
14+ background : $form-select-disabled-bg ;
15+ color : $form-select-disabled-color ;
16+ border-color : $form-select-disabled-border-color ;
17+ box-shadow : none ;
18+ }
19+
20+ .select2-selection__arrow , .select2-selection__clear {
21+ display : none ;
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments