style: improve usability of genericFileField
This commit is contained in:
parent
c20361897a
commit
e84305769b
@ -332,6 +332,10 @@ input[type="button"].btn-info:not(.btn-link):hover,
|
|||||||
margin: 21px 0
|
margin: 21px 0
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
|
.table--narrow
|
||||||
|
width: unset
|
||||||
|
|
||||||
|
|
||||||
.table:first-child
|
.table:first-child
|
||||||
margin-top: 0
|
margin-top: 0
|
||||||
|
|
||||||
|
|||||||
@ -99,3 +99,9 @@
|
|||||||
th .checkbox
|
th .checkbox
|
||||||
margin-right: 7px
|
margin-right: 7px
|
||||||
vertical-align: bottom
|
vertical-align: bottom
|
||||||
|
|
||||||
|
th .checkbox:only-child
|
||||||
|
margin: 0
|
||||||
|
|
||||||
|
.checkbox-only
|
||||||
|
width: 36px
|
||||||
|
|||||||
@ -229,6 +229,14 @@ option
|
|||||||
margin-left: 40px
|
margin-left: 40px
|
||||||
margin-top: 10px
|
margin-top: 10px
|
||||||
font-weight: 600
|
font-weight: 600
|
||||||
|
max-width: 25vw
|
||||||
|
|
||||||
|
tr:last-child td
|
||||||
|
padding-bottom: 0
|
||||||
|
|
||||||
|
.file-input__list-item
|
||||||
|
font-family: monospace
|
||||||
|
font-size: 15px
|
||||||
|
|
||||||
// PREVIOUSLY UPLOADED FILES
|
// PREVIOUSLY UPLOADED FILES
|
||||||
|
|
||||||
|
|||||||
@ -138,3 +138,12 @@
|
|||||||
box-shadow: unset
|
box-shadow: unset
|
||||||
padding: 2px 15px 2px 2px
|
padding: 2px 15px 2px 2px
|
||||||
background-color: rgba(0,0,0,0.05)
|
background-color: rgba(0,0,0,0.05)
|
||||||
|
|
||||||
|
td.tooltip-only, th.tooltip-only
|
||||||
|
.table--condensed &
|
||||||
|
width: 22px
|
||||||
|
padding: 4px
|
||||||
|
|
||||||
|
.tooltip__handle
|
||||||
|
margin: 0
|
||||||
|
|
||||||
|
|||||||
@ -586,9 +586,9 @@ SettingsUpdate: Einstellungen erfolgreich gespeichert
|
|||||||
NotificationSettingsUpdate: Benachrichtigungs-Einstellungen erfolgreich gespeichert
|
NotificationSettingsUpdate: Benachrichtigungs-Einstellungen erfolgreich gespeichert
|
||||||
Never: Nie
|
Never: Nie
|
||||||
|
|
||||||
PreviouslyUploadedInfo: Bereits hochgeladene Dateien:
|
PreviouslyUploadedInfo: Bereits hochgeladene Dateien
|
||||||
PreviouslyUploadedDeletionInfo: (Nicht ausgewählte Dateien werden gelöscht)
|
PreviouslyUploadedDeletionInfo: Nur ausgewählte und unten hinzugefügte Dateien werden erneut hochgeladen
|
||||||
MultiFileUploadInfo: (Mehrere Dateien mit Shift oder Strg auswählen)
|
MultiFileUploadInfo: Mehrere Dateien mit Shift oder Strg auswählen
|
||||||
AddMoreFiles: Weitere Dateien hinzufügen:
|
AddMoreFiles: Weitere Dateien hinzufügen:
|
||||||
|
|
||||||
NrColumn: Nr
|
NrColumn: Nr
|
||||||
@ -838,7 +838,7 @@ UploadModeExtensionRestrictionMultipleTip: Einschränkung von Dateiendungen erfo
|
|||||||
|
|
||||||
GenericFileFieldFileTooLarge file@FilePath: „#{file}“ ist zu groß
|
GenericFileFieldFileTooLarge file@FilePath: „#{file}“ ist zu groß
|
||||||
GenericFileFieldInvalidExtension file@FilePath: „#{file}” hat keine zulässige Dateiendung
|
GenericFileFieldInvalidExtension file@FilePath: „#{file}” hat keine zulässige Dateiendung
|
||||||
FileUploadOnlySessionTip: Sie haben diese Datei in der aktuellen Session bereits hochgeladen, sie ist allerdings noch nicht gespeichert. Sie müssen zunächst noch das Formular „Senden“, damit die Datei ordnungsgemäß gespeichert wird.
|
FileUploadOnlySessionTip: Sie haben diese Datei in der aktuellen Session bereits hochgeladen, sie ist allerdings womöglich noch nicht gespeichert, z.B. wenn beim Auswerten des Formulars ein Fehler auftrat. Stellen Sie sicher, dass alle Dateien, die Sie hochladen wollten auch ordnungsgemäß im System hinterlegt sind!
|
||||||
FileUploadMaxSize maxSize@Text: Datei darf maximal #{maxSize} groß sein
|
FileUploadMaxSize maxSize@Text: Datei darf maximal #{maxSize} groß sein
|
||||||
FileUploadMaxSizeMultiple maxSize@Text: Dateien dürfen jeweils maximal #{maxSize} groß sein
|
FileUploadMaxSizeMultiple maxSize@Text: Dateien dürfen jeweils maximal #{maxSize} groß sein
|
||||||
|
|
||||||
|
|||||||
@ -584,9 +584,9 @@ SettingsUpdate: Successfully updated settings
|
|||||||
NotificationSettingsUpdate: Successfully updated notification settings
|
NotificationSettingsUpdate: Successfully updated notification settings
|
||||||
Never: Never
|
Never: Never
|
||||||
|
|
||||||
PreviouslyUploadedInfo: Files already uploaded:
|
PreviouslyUploadedInfo: Previously uploaded files
|
||||||
PreviouslyUploadedDeletionInfo: (Files not checked will be deleted)
|
PreviouslyUploadedDeletionInfo: Only checked files and files added below will be uploaded again
|
||||||
MultiFileUploadInfo: (Choose multiple files using Shift or Ctrl)
|
MultiFileUploadInfo: Choose multiple files using Shift or Ctrl
|
||||||
AddMoreFiles: Additional files:
|
AddMoreFiles: Additional files:
|
||||||
|
|
||||||
NrColumn: #
|
NrColumn: #
|
||||||
@ -835,7 +835,7 @@ UploadModeExtensionRestrictionMultipleTip: Checks for valid file extension are p
|
|||||||
|
|
||||||
GenericFileFieldFileTooLarge file: “#{file}” is too large
|
GenericFileFieldFileTooLarge file: “#{file}” is too large
|
||||||
GenericFileFieldInvalidExtension file: “#{file}” does not have an acceptable file extension
|
GenericFileFieldInvalidExtension file: “#{file}” does not have an acceptable file extension
|
||||||
FileUploadOnlySessionTip: You have uploaded this file during your current session. It has not yet been saved permanently. The file will be saved permanently if you “Send” as part of this Form.
|
FileUploadOnlySessionTip: You have already uploaded this file during your current session. It may not yet have been saved permanently, e.g. when an error occurred during processing of the form. Please ensure that all files you intended to upload are properly stored within Uni2work!
|
||||||
FileUploadMaxSize maxSize: File may be up to #{maxSize} in size
|
FileUploadMaxSize maxSize: File may be up to #{maxSize} in size
|
||||||
FileUploadMaxSizeMultiple maxSize: Files may each be up to #{maxSize} in size
|
FileUploadMaxSizeMultiple maxSize: Files may each be up to #{maxSize} in size
|
||||||
|
|
||||||
|
|||||||
@ -875,8 +875,7 @@ genericFileField mkOpts = Field{..}
|
|||||||
$logDebugS "genericFileField.getIdent" pos
|
$logDebugS "genericFileField.getIdent" pos
|
||||||
return $ hash (cRoute, pos)
|
return $ hash (cRoute, pos)
|
||||||
& toStrict . Binary.encode
|
& toStrict . Binary.encode
|
||||||
& decodeUtf8 . Base64.encode
|
& decodeUtf8 . Base64.encodeUnpadded
|
||||||
& Text.dropWhileEnd (== '=')
|
|
||||||
$logDebugS "genericFileField.getIdent" $ tshow ident
|
$logDebugS "genericFileField.getIdent" $ tshow ident
|
||||||
return ident
|
return ident
|
||||||
|
|
||||||
|
|||||||
@ -4,16 +4,27 @@ $maybe ident <- identSecret
|
|||||||
<input type=hidden name=#{fieldName} id=#{fieldId}--ident value=#{ident}>
|
<input type=hidden name=#{fieldName} id=#{fieldId}--ident value=#{ident}>
|
||||||
|
|
||||||
$if not (null fileInfos)
|
$if not (null fileInfos)
|
||||||
<div .file-uploads-label>_{MsgPreviouslyUploadedInfo}
|
<table .file-input__list .table .table--narrow .table--striped .table--hover .table--condensed>
|
||||||
<ul .list--iconless .file-input__list>
|
<colgroup>
|
||||||
|
<col .checkbox-only>
|
||||||
|
<col .tooltip-only>
|
||||||
|
<col>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th .table__th>
|
||||||
|
<th .table__th colspan=2>
|
||||||
|
_{MsgPreviouslyUploadedInfo}
|
||||||
$forall FileUploadInfo{..} <- fileInfos
|
$forall FileUploadInfo{..} <- fileInfos
|
||||||
<li>
|
<tbody>
|
||||||
<div .file-container>
|
<tr>
|
||||||
<input type=checkbox id=#{fuiHtmlId} name=#{fieldName} :fuiChecked:checked value=#{review _FileTitle fuiTitle} :fuiForced:readonly>
|
<td .table__td>
|
||||||
$if fuiSession
|
<input type=checkbox id=#{fuiHtmlId} name=#{fieldName} :fuiChecked:checked value=#{review _FileTitle fuiTitle} :fuiForced:readonly>
|
||||||
^{messageTooltip uploadOnlySessionMessage}
|
<td .table__td .tooltip-only>
|
||||||
<label for=#{fuiHtmlId}>
|
$if fuiSession
|
||||||
#{fuiTitle}
|
^{messageTooltip uploadOnlySessionMessage}
|
||||||
|
<td .table__td>
|
||||||
|
<label for=#{fuiHtmlId} .file-input__list-item>
|
||||||
|
#{fuiTitle}
|
||||||
|
|
||||||
<div .file-input__info>
|
<div .file-input__info>
|
||||||
_{MsgPreviouslyUploadedDeletionInfo}
|
_{MsgPreviouslyUploadedDeletionInfo}
|
||||||
|
|||||||
Reference in New Issue
Block a user