File tree Expand file tree Collapse file tree
components/events/partials/ModalTabsAndPages
i18n/org/opencastproject/adminui/languages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,18 +277,39 @@ const Upload = <T extends RequiredFormPropsUpload>({
277277 </ p >
278278 </ td >
279279 < td >
280- < div className = "file-upload" >
280+ < div
281+ className = "fake-file-input blue-btn"
282+ role = "button"
283+ tabIndex = { 0 }
284+ onClick = { ( ) => document . getElementById ( asset . id ) ?. click ( ) }
285+ onKeyDown = { e => {
286+ if ( e . key === "Enter" || e . key === " " ) {
287+ e . preventDefault ( ) ;
288+ document . getElementById ( asset . id ) ?. click ( ) ;
289+ }
290+ } }
291+ aria-label = { t ( "EVENTS.EVENTS.NEW.SOURCE.UPLOAD.ARIA_FILE_PICKER" ) }
292+ >
293+ < span className = "file-button" >
294+ { t ( "EVENTS.EVENTS.NEW.SOURCE.UPLOAD.FILE_PICKER" ) }
295+ </ span >
296+
297+ < span className = "file-text" >
298+ { asset . file && asset . file . length > 0
299+ ? asset . file [ 0 ] . name
300+ : t ( "EVENTS.EVENTS.NEW.SOURCE.UPLOAD.NO_FILE_PICKED" ) }
301+ </ span >
302+
281303 < input
282304 id = { asset . id }
283- className = "blue-btn file-select-btn"
305+ type = "file"
306+ name = { `uploadAssetsTrack.${ key } .file` }
307+ hidden
284308 accept = { asset . accept }
309+ multiple = { asset . multiple }
285310 onChange = { e =>
286311 handleChange ( e , `uploadAssetsTrack.${ key } .file` )
287312 }
288- type = "file"
289- multiple = { asset . multiple }
290- name = { `uploadAssetsTrack.${ key } .file` }
291- tabIndex = { 0 }
292313 />
293314 </ div >
294315 </ td >
Original file line number Diff line number Diff line change 526526 "CAPTION" : " Upload" ,
527527 "RECORDING_ELEMENTS" : " Recording elements" ,
528528 "RECORDING_METADATA" : " Recording metadata" ,
529+ "FILE_PICKER" : " Upload file..." ,
530+ "NO_FILE_PICKED" : " No file chosen" ,
531+ "ARIA_FILE_PICKER" : " Upload file" ,
529532 "SEGMENTABLE" : {
530533 "SHORT" : " Presentation" ,
531534 "DETAIL" : " The file contains a recording of a what is shown to an audience (Keynote, Powerpoint, etc)."
Original file line number Diff line number Diff line change @@ -226,3 +226,37 @@ input[type="radio"].ios {
226226
227227}
228228
229+ /* *
230+ * Fake upload for create event dialog
231+ */
232+ .fake-file-input {
233+ display : flex ;
234+ align-items : center ;
235+ width : 100% ;
236+ min-width : 256px ;
237+ max-width : 320px ;
238+ max-height : 34px ;
239+ }
240+
241+ /* Left button */
242+ .file-button {
243+ display : flex ;
244+ justify-content : center ;
245+ align-items : center ;
246+ max-height : 22px ;
247+ background : variables .$modal-nav-bg-color ;
248+ border : 1px solid variables .$main-border-color ;
249+ border-radius : 4px ;
250+ padding : 0px 8px ;
251+ color : variables .$color-black ;
252+ margin-right : 8px ;
253+ white-space : nowrap ;
254+ }
255+
256+ /* Right text */
257+ .file-text {
258+ color : variables .$color-white ;
259+ overflow : hidden ;
260+ text-overflow : ellipsis ;
261+ white-space : nowrap ;
262+ }
Original file line number Diff line number Diff line change @@ -155,10 +155,3 @@ select {
155155input .disabled , select .disabled {
156156 background : variables .$modal-nav-bg-color ;
157157}
158-
159- // Use HTML5 input field for file upload
160- .file-upload > input [type = " file" ] {
161- width : 100% ;
162- visibility : visible !important ;
163- text-align : left ;
164- }
You can’t perform that action at this time.
0 commit comments