Skip to content

Commit

Permalink
Accept udt as extension in import document type (#11108)
Browse files Browse the repository at this point in the history
* Pass in invalid files

* Fix pattern and accept udt file extension

* Remove wildcard

* fix help text - referred to 'browse' button, which does not exist

Co-authored-by: Nathan Woulfe <[email protected]>
  • Loading branch information
bjarnef and nathanwoulfe authored Oct 27, 2021
1 parent ed16728 commit b046098
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ angular.module("umbraco")

vm.cancelButtonLabel = "cancel";

$scope.handleFiles = function (files, event) {
$scope.handleFiles = function (files, event, invalidFiles) {
if (files && files.length > 0) {
$scope.upload(files[0]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div ng-if="vm.state === 'upload'">
<p>
<localize key="settings_importDocumentTypeHelp">
To import a document type, find the '.udt' file on your computer by clicking the 'Browse' button and click 'Import' (you'll be asked for confirmation on the next screen)
To import a document type, find the '.udt' file on your computer by clicking the 'Import' button (you'll be asked for confirmation on the next screen)
</localize>
</p>

Expand All @@ -16,9 +16,10 @@
name="file"
ngf-select
ng-model="filesHolder"
ngf-change="handleFiles($files, $event)"
ngf-change="handleFiles($files, $event, $invalidFiles)"
ngf-multiple="true"
ngf-pattern="*.udt">
ngf-pattern="*.udt"
accept=".udt">
<localize key="general_import">Import</localize>
</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
</area>
<area alias="settings">
<key alias="defaulttemplate">Default template</key>
<key alias="importDocumentTypeHelp">To import a Document Type, find the ".udt" file on your computer by clicking the "Browse" button and click "Import" (you'll be asked for confirmation on the next screen)</key>
<key alias="importDocumentTypeHelp">To import a Document Type, find the ".udt" file on your computer by clicking the "Import" button (you'll be asked for confirmation on the next screen)</key>
<key alias="newtabname">New Tab Title</key>
<key alias="nodetype">Node type</key>
<key alias="objecttype">Type</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
</area>
<area alias="settings">
<key alias="defaulttemplate">Default template</key>
<key alias="importDocumentTypeHelp">To import a Document Type, find the ".udt" file on your computer by clicking the "Browse" button and click "Import" (you'll be asked for confirmation on the next screen)</key>
<key alias="importDocumentTypeHelp">To import a Document Type, find the ".udt" file on your computer by clicking the "Import" button (you'll be asked for confirmation on the next screen)</key>
<key alias="newtabname">New Tab Title</key>
<key alias="nodetype">Node type</key>
<key alias="objecttype">Type</key>
Expand Down

0 comments on commit b046098

Please sign in to comment.