GUACAMOLE-210: Use empty template if field otherwise has no template. Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/b59c1e72 Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/b59c1e72 Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/b59c1e72
Branch: refs/heads/master Commit: b59c1e72335d8585ce32ac9351baf564c469372f Parents: 82c6048 Author: Michael Jumper <mjum...@apache.org> Authored: Tue Feb 21 13:28:52 2017 -0800 Committer: Michael Jumper <mjum...@apache.org> Committed: Mon Sep 25 13:06:44 2017 -0700 ---------------------------------------------------------------------- guacamole/src/main/webapp/app/form/services/formService.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/b59c1e72/guacamole/src/main/webapp/app/form/services/formService.js ---------------------------------------------------------------------- diff --git a/guacamole/src/main/webapp/app/form/services/formService.js b/guacamole/src/main/webapp/app/form/services/formService.js index c117bbf..64a1713 100644 --- a/guacamole/src/main/webapp/app/form/services/formService.js +++ b/guacamole/src/main/webapp/app/form/services/formService.js @@ -244,9 +244,16 @@ angular.module('form').provider('formService', function formServiceProvider() { } // If no raw HTML template is provided, retrieve template from URL - else + else if (fieldType.templateUrl) templateRequest = $templateRequest(fieldType.templateUrl); + // Otherwise, use empty template + else { + var emptyTemplate= $q.defer(); + emptyTemplate.resolve(''); + templateRequest = emptyTemplate.promise; + } + // Defer compilation of template pending successful retrieval var compiledTemplate = $q.defer();