Accept udt as extension in import document type (#11108)

* 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 <nathan@nathanw.com.au>
This commit is contained in:
Bjarne Fyrstenborg
2021-10-27 04:05:08 +02:00
committed by GitHub
parent ed167288c8
commit b04609880b
4 changed files with 7 additions and 6 deletions

View File

@@ -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]);
}

View File

@@ -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>
@@ -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>

View File

@@ -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>

View File

@@ -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>