Skip to content

Commit

Permalink
Merge pull request #35559 from dimagi/riese/filename_break_text
Browse files Browse the repository at this point in the history
Add text-break class to force breaking filenames
  • Loading branch information
MartinRiese authored Jan 3, 2025
2 parents cd5b2b6 + d310e02 commit 2eb41a1
Showing 1 changed file with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,35 @@

<script type="text/html" id="file-entry-ko-template">
<div class="d-flex align-items-center">
<input type="file" class="d-none" data-bind="
<input
type="file"
class="d-none"
data-bind="
value: $data.rawAnswer,
attr: {
id: entryId,
'aria-required': $parent.required() ? 'true' : 'false',
accept: accept,
},
"/>
<button id="input-button-alt" class="btn btn-outline-primary" data-bind="
"
/>
<button
id="input-button-alt"
class="btn btn-outline-primary"
data-bind="
click: uploadFile,
css: { 'is-invalid': $parent.hasError() },
">
"
>
Browse...
</button>
<p data-bind="text: fileNameDisplay" style="margin-left: 7px; margin-right: auto;"></p>
<button class="btn btn-outline-primary btn-sm" data-bind="
<p data-bind="text: fileNameDisplay" class="text-break ms-2 me-auto"></p>
<button
class="btn btn-outline-primary btn-sm"
data-bind="
click: onClear,
text: $root.getTranslation('upload.clear.title', '{% trans_html_attr 'Clear' %}'),
">
</button>
"
></button>
</div>
</script>

0 comments on commit 2eb41a1

Please sign in to comment.