diff --git a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared.js b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared.js index af924aafc..f2c8daf80 100644 --- a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared.js +++ b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared.js @@ -10267,7 +10267,7 @@ function ( vm.userAreas = _.filter(userAreas, function(userArea) { return userArea.userAreaCode !== 'COF' }); if (vm.userAreas.length == 1) { - vm.command.userAreaCode = vm.userArea.userAreaCode; + vm.command.userAreaCode = vm.userAreas[0].userAreaCode; } } } @@ -10351,8 +10351,8 @@ function ( return command; }); - - if (!vm.command.redirectoToSignIn) { + + if (!vm.command.redirectToSignIn) { vm.command.userAreaCodeForSignInRedirect = null; } @@ -10487,7 +10487,7 @@ function ( if (accessRuleSet.userAreaForSignInRedirect) { command.userAreaCodeForSignInRedirect = accessRuleSet.userAreaForSignInRedirect.userAreaCode; - command.redirectoToSignIn = true; + command.redirectToSignIn = true; } return command; @@ -10503,17 +10503,18 @@ function ( if (!vm.userAreasInRules.length) { // all user areas have been removed from the list - vm.command.redirectoToSignIn = false; + vm.command.redirectToSignIn = false; vm.command.userAreaCodeForSignInRedirect = null; } else if (!_.find(vm.userAreasInRules, function(userArea) { return userArea.userAreaCode === vm.command.userAreaCodeForSignInRedirect; })) { // the selected user area has been removed from the list - vm.command.redirectoToSignIn = false; + vm.command.redirectToSignIn = false; vm.command.userAreaCodeForSignInRedirect = null; } if (!vm.command.userAreaCodeForSignInRedirect && vm.userAreasInRules.length) { // set a default selection in-case the list is hidden vm.command.userAreaCodeForSignInRedirect = vm.userAreasInRules[0].userAreaCode; + console.log('setting vm.command.userAreaCodeForSignInRedirect', vm.command.userAreaCodeForSignInRedirect); } } diff --git a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared_min.js b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared_min.js index bc363961a..51a434161 100644 --- a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared_min.js +++ b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared_min.js @@ -496,8 +496,8 @@ angular.module("cms.shared").directive("cmsFormFieldDocumentTypeSelector",["_"," angular.module("cms.shared").directive("cmsFormFieldDocumentUpload",["_","shared.internalModulePath","baseFormFieldFactory",function(e,t,o){e={templateUrl:t+"UIComponents/DocumentAssets/FormFieldDocumentUpload.html",scope:e.extend(o.defaultConfig.scope,{asset:"=cmsAsset",loadState:"=cmsLoadState"}),passThroughAttributes:["required","ngRequired"],getInputEl:function(e){return e.find("cms-document-upload")}};return o.create(e)}]); angular.module("cms.shared").controller("UploadDocumentAssetDialogController",["$scope","shared.LoadState","shared.documentService","shared.SearchQuery","shared.focusService","shared.stringUtilities","options","close",function(e,t,o,n,a,i,s,l){var r=e;function c(){r.saveLoadState.on(),o.add(r.command).progress(r.saveLoadState.setProgress).then(m)}function d(){var e=r.command;e.file&&e.file.name&&(e.title=i.capitaliseFirstLetter(i.getFileNameWithoutExtension(e.file.name)),e.fileName=i.slugify(e.title),a.focusById("title"))}function f(){l()}function u(){return s.filter.fileExtension||s.filter.fileExtensions}function m(e){s.onUploadComplete(e),l()}angular.extend(e,s),r.command={},r.onUpload=c,r.onCancel=f,r.close=f,r.filter=s.filter,r.onFileChanged=d,r.hasFilterRestrictions=u,r.saveLoadState=new t}]); angular.module("cms.shared").controller("ImageAssetEditorDialogController",["$scope","shared.LoadState","shared.imageService","shared.SearchQuery","shared.urlLibrary","options","close",function(e,t,a,m,i,n,d){var s=e;function o(){d()}function r(){s.command.altTag=s.command.imageAsset.title||s.command.imageAsset.fileName}function g(){var e={width:h(s.command.width),height:h(s.command.height)};e.width||e.height||(e.width="100%",e.height="auto");var t=i.getImageUrl(s.command.imageAsset,-1<((a=e).width||"").indexOf("%")||-1<(a.height||"").indexOf("%")?{}:{width:a.width.replace("px",""),height:a.height.replace("px","")}),a=s.command.altTag||"",t={markdown:"![Alt "+a+"]("+t+")",html:""+a+"",model:s.command};t.html=(a=t.html,e=e,angular.element(a).css(e)[0].outerHTML),s.onSelected(t),d()}function h(e){return e?-1==e.indexOf("px")&&-1==e.indexOf("%")&&-1==e.indexOf("auto")?e+"px":e:""}angular.extend(e,n),s.formLoadState=new t,s.saveLoadState=new t,s.onInsert=g,s.onCancel=o,s.onImageChanged=r,s.command={},function(){var e,t;s.imageAssetHtml&&s.imageAssetHtml.length&&(s.command.imageAssetId=s.imageAssetHtml.attr("data-image-asset-id"),s.command.altTag=s.imageAssetHtml.attr("alt"),s.command.style=s.imageAssetHtml.attr("style"),s.command.style?(t=function(e){var t,a=/([\w-]*)\s*:\s*([^;]*)/g,m={};for(;t=a.exec(e);)m[t[1]]=t[2];return m}(s.command.style),s.command.width=t.width,s.command.height=t.height):(s.command.width=s.imageAssetHtml.attr("width"),s.command.height=s.imageAssetHtml.attr("height")),s.command.imageAssetId||(e=s.imageAssetHtml.attr("src"),t=e.lastIndexOf("/"),t=e.substr(t+1,e.indexOf("_")-t-1),s.command.imageAssetId=t))}()}]); -angular.module("cms.shared").controller("AddEntityAccessRuleController",["$scope","$q","shared.LoadState","shared.roleService","shared.userAreaService","options","close",function(e,o,n,r,a,t,d){var s=e;function u(){s.command.roleId=null}function l(e){if(s.command.userAreaCode)return e.userAreaCode=s.command.userAreaCode,e.excludeAnonymous=!0,r.search(e);e=o.defer();return e.resolve(),e.promise}function c(){t.onSave(s.command),d()}function f(){d()}s.globalLoadState=new n,s.saveLoadState=new n,s.formLoadState=new n,function(e){s.globalLoadState.on(),e&&_.isFunction(e.on)&&e.on()}(s.formLoadState),s.onAdd=c,s.onCancel=f,s.onUserAreaChanged=u,s.searchRoles=l,s.command={},u(),a.getAll().then(function(e){s.userAreas=_.filter(e,function(e){return"COF"!==e.userAreaCode}),1==s.userAreas.length&&(s.command.userAreaCode=s.userArea.userAreaCode)}).finally(function(e){s.globalLoadState.off(),e&&_.isFunction(e.off)&&e.off()}.bind(null,s.formLoadState))}]); -angular.module("cms.shared").controller("EntityAccessEditorController",["$scope","$q","shared.LoadState","shared.userAreaService","shared.roleService","shared.modalDialogService","shared.arrayUtilities","shared.internalModulePath","shared.permissionValidationService","shared.urlLibrary","options","close",function(e,t,n,o,i,r,s,a,c,u,d,l){var A=e;function f(){A.command.accessRules=_.map(A.accessRuleSet.accessRules,function(e){var n=d.entityIdPrefix+"AccessRuleId",r={userAreaCode:e.userArea.userAreaCode,roleId:e.role?e.role.roleId:null};return r[n]=e[n],r}),A.command.redirectoToSignIn||(A.command.userAreaCodeForSignInRedirect=null),g(A.saveLoadState),d.saveAccess(A.command).then(function(e,n){return S(n).then(A.mainForm.formStatus.success.bind(null,e))}.bind(null,"Access rules updated successfully")).then(l).finally(y.bind(null,A.saveLoadState))}function R(){r.show({templateUrl:a+"UIComponents/EntityAccess/AddEntityAccessRule.html",controller:"AddEntityAccessRuleController",options:{onSave:h}})}function m(e,n){s.removeObject(A.accessRuleSet.accessRules,e),I()}function h(r){var n={};_.find(A.accessRuleSet.accessRules,function(e){var n=e.role?e.role.roleId:null;return e.userArea.userAreaCode===r.userAreaCode&&n==r.roleId})||(g(),t.all([r.roleId?i.getById(r.roleId).then(function(e){n.role=e}):t(function(e){e()}),o.getByCode(r.userAreaCode).then(function(e){n.userArea=e})]).then(function(){A.accessRuleSet.accessRules.push(n),A.accessRuleSet.accessRules=_(A.accessRuleSet.accessRules).chain().sortBy(function(e){return e.role?e.role.roleId:-1}).sortBy(function(e){return e.userArea.userAreaCode}).value(),I()}).finally(y))}function S(e){return A.entityDefinitionName=d.entityDefinitionName,A.entityDefinitionNameLower=d.entityDefinitionName.toLowerCase(),A.entityDescription=d.entityDescription,A.violationActions=[{id:"Error",name:"Error",description:"Error (403: Forbidden)"},{id:"NotFound",name:"Not Found",description:"Not Found (404: Not Found)"}],d.entityAccessLoader().then(function(e){A.accessRuleSet=e,A.command=function(e){var n=_.pick(e,d.entityIdPrefix+"Id","userAreaCodeForSignInRedirect","violationAction");e.userAreaForSignInRedirect&&(n.userAreaCodeForSignInRedirect=e.userAreaForSignInRedirect.userAreaCode,n.redirectoToSignIn=!0);return n}(e),A.inheritedRules=[],_.each(A.accessRuleSet.inheritedAccessRules,function(n){n.violationAction=_.findWhere(A.violationActions,{id:n.violationAction}),n.userAreaForSignInRedirect?(n.signInRedirect="Yes",n.signInRedirectDescription="If the user is not signed in, then they will be redirected to the sign in page associated with the "+n.userAreaForSignInRedirect.name+" user area."):(n.signInRedirect="No",n.signInRedirectDescription="No sign in redirection, the default action will trigger instead."),_.each(n.accessRules,function(e){e.accessRuleSet=n,A.inheritedRules.push(e)})}),I()}).then(y.bind(null,e))}function I(){A.userAreasInRules=_(A.accessRuleSet.accessRules).chain().map(function(e){return e.userArea}).uniq(function(e){return e.userAreaCode}).sortBy("userAreaCode").value(),A.userAreasInRules.length&&_.find(A.userAreasInRules,function(e){return e.userAreaCode===A.command.userAreaCodeForSignInRedirect})||(A.command.redirectoToSignIn=!1,A.command.userAreaCodeForSignInRedirect=null),!A.command.userAreaCodeForSignInRedirect&&A.userAreasInRules.length&&(A.command.userAreaCodeForSignInRedirect=A.userAreasInRules[0].userAreaCode)}function g(e){A.globalLoadState.on(),e&&_.isFunction(e.on)&&e.on()}function y(e){A.globalLoadState.off(),e&&_.isFunction(e.off)&&e.off()}A.save=f,A.close=l,A.add=R,A.deleteRule=m,A.globalLoadState=new n,A.saveLoadState=new n,A.formLoadState=new n(!0),A.urlLibrary=u,A.canManage=c.hasPermission(d.entityDefinitionCode+"ACCRUL"),A.editMode=A.canManage,S(A.formLoadState)}]); +angular.module("cms.shared").controller("AddEntityAccessRuleController",["$scope","$q","shared.LoadState","shared.roleService","shared.userAreaService","options","close",function(e,o,n,r,a,t,d){var s=e;function u(){s.command.roleId=null}function l(e){if(s.command.userAreaCode)return e.userAreaCode=s.command.userAreaCode,e.excludeAnonymous=!0,r.search(e);e=o.defer();return e.resolve(),e.promise}function c(){t.onSave(s.command),d()}function f(){d()}s.globalLoadState=new n,s.saveLoadState=new n,s.formLoadState=new n,function(e){s.globalLoadState.on(),e&&_.isFunction(e.on)&&e.on()}(s.formLoadState),s.onAdd=c,s.onCancel=f,s.onUserAreaChanged=u,s.searchRoles=l,s.command={},u(),a.getAll().then(function(e){s.userAreas=_.filter(e,function(e){return"COF"!==e.userAreaCode}),1==s.userAreas.length&&(s.command.userAreaCode=s.userAreas[0].userAreaCode)}).finally(function(e){s.globalLoadState.off(),e&&_.isFunction(e.off)&&e.off()}.bind(null,s.formLoadState))}]); +angular.module("cms.shared").controller("EntityAccessEditorController",["$scope","$q","shared.LoadState","shared.userAreaService","shared.roleService","shared.modalDialogService","shared.arrayUtilities","shared.internalModulePath","shared.permissionValidationService","shared.urlLibrary","options","close",function(e,o,n,t,i,r,s,a,c,u,d,l){var A=e;function f(){A.command.accessRules=_.map(A.accessRuleSet.accessRules,function(e){var n=d.entityIdPrefix+"AccessRuleId",r={userAreaCode:e.userArea.userAreaCode,roleId:e.role?e.role.roleId:null};return r[n]=e[n],r}),A.command.redirectToSignIn||(A.command.userAreaCodeForSignInRedirect=null),I(A.saveLoadState),d.saveAccess(A.command).then(function(e,n){return h(n).then(A.mainForm.formStatus.success.bind(null,e))}.bind(null,"Access rules updated successfully")).then(l).finally(C.bind(null,A.saveLoadState))}function R(){r.show({templateUrl:a+"UIComponents/EntityAccess/AddEntityAccessRule.html",controller:"AddEntityAccessRuleController",options:{onSave:S}})}function m(e,n){s.removeObject(A.accessRuleSet.accessRules,e),g()}function S(r){var n={};_.find(A.accessRuleSet.accessRules,function(e){var n=e.role?e.role.roleId:null;return e.userArea.userAreaCode===r.userAreaCode&&n==r.roleId})||(I(),o.all([r.roleId?i.getById(r.roleId).then(function(e){n.role=e}):o(function(e){e()}),t.getByCode(r.userAreaCode).then(function(e){n.userArea=e})]).then(function(){A.accessRuleSet.accessRules.push(n),A.accessRuleSet.accessRules=_(A.accessRuleSet.accessRules).chain().sortBy(function(e){return e.role?e.role.roleId:-1}).sortBy(function(e){return e.userArea.userAreaCode}).value(),g()}).finally(C))}function h(e){return A.entityDefinitionName=d.entityDefinitionName,A.entityDefinitionNameLower=d.entityDefinitionName.toLowerCase(),A.entityDescription=d.entityDescription,A.violationActions=[{id:"Error",name:"Error",description:"Error (403: Forbidden)"},{id:"NotFound",name:"Not Found",description:"Not Found (404: Not Found)"}],d.entityAccessLoader().then(function(e){A.accessRuleSet=e,A.command=function(e){var n=_.pick(e,d.entityIdPrefix+"Id","userAreaCodeForSignInRedirect","violationAction");e.userAreaForSignInRedirect&&(n.userAreaCodeForSignInRedirect=e.userAreaForSignInRedirect.userAreaCode,n.redirectToSignIn=!0);return n}(e),A.inheritedRules=[],_.each(A.accessRuleSet.inheritedAccessRules,function(n){n.violationAction=_.findWhere(A.violationActions,{id:n.violationAction}),n.userAreaForSignInRedirect?(n.signInRedirect="Yes",n.signInRedirectDescription="If the user is not signed in, then they will be redirected to the sign in page associated with the "+n.userAreaForSignInRedirect.name+" user area."):(n.signInRedirect="No",n.signInRedirectDescription="No sign in redirection, the default action will trigger instead."),_.each(n.accessRules,function(e){e.accessRuleSet=n,A.inheritedRules.push(e)})}),g()}).then(C.bind(null,e))}function g(){A.userAreasInRules=_(A.accessRuleSet.accessRules).chain().map(function(e){return e.userArea}).uniq(function(e){return e.userAreaCode}).sortBy("userAreaCode").value(),A.userAreasInRules.length&&_.find(A.userAreasInRules,function(e){return e.userAreaCode===A.command.userAreaCodeForSignInRedirect})||(A.command.redirectToSignIn=!1,A.command.userAreaCodeForSignInRedirect=null),!A.command.userAreaCodeForSignInRedirect&&A.userAreasInRules.length&&(A.command.userAreaCodeForSignInRedirect=A.userAreasInRules[0].userAreaCode,console.log("setting vm.command.userAreaCodeForSignInRedirect",A.command.userAreaCodeForSignInRedirect))}function I(e){A.globalLoadState.on(),e&&_.isFunction(e.on)&&e.on()}function C(e){A.globalLoadState.off(),e&&_.isFunction(e.off)&&e.off()}A.save=f,A.close=l,A.add=R,A.deleteRule=m,A.globalLoadState=new n,A.saveLoadState=new n,A.formLoadState=new n(!0),A.urlLibrary=u,A.canManage=c.hasPermission(d.entityDefinitionCode+"ACCRUL"),A.editMode=A.canManage,h(A.formLoadState)}]); angular.module("cms.shared").factory("shared.entityVersionModalDialogService",["shared.entityVersionService","shared.modalDialogService",function(s,a){var t={},l={entityNameSingular:"Page"};return t.publish=function(t,e,i){var n=i||l,i={title:"Publish "+n.entityNameSingular,message:"Are you sure you want to publish this "+n.entityNameSingular.toLowerCase()+"?",okButtonTitle:"Yes, publish it",onOk:function(){return e(),s.publish(n.isCustomEntity,t)}};return a.confirm(i)},t.unpublish=function(t,e,i){var n=i||l,i={title:"Unpublish "+n.entityNameSingular,message:"Unpublishing this "+n.entityNameSingular.toLowerCase()+" will remove it from the live site and put it into draft status. Are you sure you want to continue?",okButtonTitle:"Yes, unpublish it",onOk:function(){return e(),s.unpublish(n.isCustomEntity,t)}};return a.confirm(i)},t.copyToDraft=function(t,e,i,n,r){var o=r||l,r={title:"Copy "+o.entityNameSingular+" Version",message:"A draft version of this "+o.entityNameSingular.toLowerCase()+" already exists. Copying this version will delete the current draft. Do you wish to continue?",okButtonTitle:"Yes, replace it",onOk:function(){return n(),s.removeDraft(o.isCustomEntity,t).then(u)}};return i?a.confirm(r):(n(),u());function u(){return s.duplicateDraft(o.isCustomEntity,t,e)}},t}]); angular.module("cms.shared").directive("cmsForm",["shared.internalModulePath",function(e){return{restrict:"E",templateUrl:e+"UIComponents/Form/Form.html",replace:!0,transclude:!0,scope:{editMode:"=cmsEditMode",name:"@cmsName"},compile:function(e,n){angular.isDefined(n.cmsEditMode)||(n.cmsEditMode="true");return r},controller:["$scope",function(e){e.getForm=function(){return e[e.name]},this.getFormScope=function(){return e}}]};function r(e,n,r,t){(function e(n,r){var t=n.$parent;if(!t)return r||n;angular.isDefined(t.vm)&&(r=t.vm);return e(t,r)})(e)[e.name]=e.getForm()}}]); angular.module("cms.shared").directive("cmsFormSection",["shared.internalModulePath","$timeout",function(e,n){return{restrict:"E",templateUrl:e+"UIComponents/Form/FormSection.html",scope:{title:"@cmsTitle"},replace:!0,transclude:!0,link:function(e,l,t){n(function(){var e=angular.element(l[0].querySelector(".help-inline")),t=angular.element(l[0].querySelector(".toggle-helpers"));e.length&&t.addClass("show").on("click",function(){t.toggleClass("active"),l.toggleClass("show-helpers")})},100)}}}]); diff --git a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared_templates.js b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared_templates.js index 400c0c94e..dcfc9ac77 100644 --- a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared_templates.js +++ b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Content/js/shared_templates.js @@ -19,7 +19,7 @@ t.put('/Admin/Modules/Shared/Js/UIComponents/DocumentAssets/FormFieldDocumentUpl t.put('/Admin/Modules/Shared/Js/UIComponents/DocumentAssets/UploadDocumentAssetDialog.html',' Upload a document The document field you are assigning to has restrictions. If you are unsure, cancel this dialog and check the filters menu. '); t.put('/Admin/Modules/Shared/Js/UIComponents/EditorDialogs/ImageAssetEditorDialog.html',' Insert an image '); t.put('/Admin/Modules/Shared/Js/UIComponents/EntityAccess/AddEntityAccessRule.html',' Add Access Rule '); -t.put('/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditor.html',' {{::entityDefinitionName}} Access: {{::entityDescription}}

These rules are inherited from parent directories. Users will need to meet the rule requirements for each parent directory in order to gain access.

Directory User Area Role Redirect to Sign-in Default Action
{{rule.accessRuleSet.pageDirectory.fullUrlPath}} {{rule.userArea.name}} {{rule.role.title}} {{rule.accessRuleSet.signInRedirect}} {{rule.accessRuleSet.violationAction.name}}

To be granted access to this {{entityDefinitionNameLower}} users will need to meet the requirements of at least one of these rules.

User Area Role Actions
No rules found.
{{rule.userArea.name}} {{rule.role.title}}

These options describe what should happen if the user is denied access.

'); +t.put('/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditor.html',' {{::entityDefinitionName}} Access: {{::entityDescription}}

These rules are inherited from parent directories. Users will need to meet the rule requirements for each parent directory in order to gain access.

Directory User Area Role Redirect to Sign-in Default Action
{{rule.accessRuleSet.pageDirectory.fullUrlPath}} {{rule.userArea.name}} {{rule.role.title}} {{rule.accessRuleSet.signInRedirect}} {{rule.accessRuleSet.violationAction.name}}

To be granted access to this {{entityDefinitionNameLower}} users will need to meet the requirements of at least one of these rules.

User Area Role Actions
No rules found.
{{rule.userArea.name}} {{rule.role.title}}

These options describe what should happen if the user is denied access.

'); t.put('/Admin/Modules/Shared/Js/UIComponents/Form/Form.html','
'); t.put('/Admin/Modules/Shared/Js/UIComponents/Form/FormSection.html','
{{ title }}
'); t.put('/Admin/Modules/Shared/Js/UIComponents/Form/FormSectionActions.html','
'); @@ -49,6 +49,8 @@ t.put('/Admin/Modules/Shared/Js/UIComponents/FormFields/FormFieldTextArea.html', t.put('/Admin/Modules/Shared/Js/UIComponents/FormFields/FormFieldTime.html','
None
{{vm.model | time}}

{{vm.description}}

'); t.put('/Admin/Modules/Shared/Js/UIComponents/FormFields/FormFieldUrl.html','
{{vm.model}}
None

{{vm.description}}

'); t.put('/Admin/Modules/Shared/Js/UIComponents/FormFields/FormFieldValidationSummary.html','
'); +t.put('/Admin/Modules/Shared/Js/UIComponents/Layout/Field.html','
'); +t.put('/Admin/Modules/Shared/Js/UIComponents/Layout/PageBody.html','
'); t.put('/Admin/Modules/Shared/Js/UIComponents/ImageAssets/FormFieldImageAnchorLocationSelector.html',''); t.put('/Admin/Modules/Shared/Js/UIComponents/ImageAssets/FormFieldImageAsset.html','

{{vm.description}}

'); t.put('/Admin/Modules/Shared/Js/UIComponents/ImageAssets/FormFieldImageAssetCollection.html','
Image Title Actions
None
{{image.title}}

{{vm.description}}

'); @@ -56,11 +58,12 @@ t.put('/Admin/Modules/Shared/Js/UIComponents/ImageAssets/FormFieldImageUpload.ht t.put('/Admin/Modules/Shared/Js/UIComponents/ImageAssets/ImageAsset.html',''); t.put('/Admin/Modules/Shared/Js/UIComponents/ImageAssets/ImageAssetPickerDialog.html',' Find an image
Image Title Size Tags Modified Actions
Sorry, no images could be found.
{{ ::image.title }} {{::image.width}} x {{::image.height}}
{{::image.fileSizeInBytes | bytes}}
'); t.put('/Admin/Modules/Shared/Js/UIComponents/ImageAssets/UploadImageAssetDialog.html',' Upload an image This image field has restrictions: {{filterText}} '); -t.put('/Admin/Modules/Shared/Js/UIComponents/Layout/Field.html','
'); -t.put('/Admin/Modules/Shared/Js/UIComponents/Layout/PageBody.html','
'); t.put('/Admin/Modules/Shared/Js/UIComponents/Loader/ProgressBar.html','
{{loadState.progress}}% Complete
'); t.put('/Admin/Modules/Shared/Js/UIComponents/Locales/FormFieldLocaleSelector.html',''); t.put('/Admin/Modules/Shared/Js/UIComponents/Menus/Menu.html',''); +t.put('/Admin/Modules/Shared/Js/UIComponents/NestedDataModels/EditNestedDataModelDialog.html',' {{::title}} '); +t.put('/Admin/Modules/Shared/Js/UIComponents/NestedDataModels/FormFieldNestedDataModelCollection.html','
{{vm.previewFields.titleTerm}} {{vm.previewFields.fields.previewDescription.displayName}} Actions
None
{{vm.getTitle(entity, $index)}} {{entity[vm.previewFields.fields.previewDescription.lowerName]}}

{{vm.description}}

'); +t.put('/Admin/Modules/Shared/Js/UIComponents/NestedDataModels/FormFieldNestedDataModelMultiTypeCollection.html','
{{vm.imageColumnHeader}} {{vm.titleColumnHeader}} {{vm.descriptionColumnHeader}} {{vm.typeColumnHeader}} Actions
None
{{vm.getTitle(item, $index)}} {{item.model[vm.previewFields[item.typeName].fields.previewDescription.lowerName]}} {{vm.modelMetaDataLookup[item.typeName].displayName}}

{{vm.description}}

'); t.put('/Admin/Modules/Shared/Js/UIComponents/Modals/Alert.html',' {{::title}} {{::message}} '); t.put('/Admin/Modules/Shared/Js/UIComponents/Modals/ConfirmDialog.html',' {{::title}} '); t.put('/Admin/Modules/Shared/Js/UIComponents/Modals/DeveloperException.html',' {{::title}}
'); @@ -68,12 +71,11 @@ t.put('/Admin/Modules/Shared/Js/UIComponents/Modals/ModalDialogActions.html',''); t.put('/Admin/Modules/Shared/Js/UIComponents/Modals/ModalDialogContainer.html',''); t.put('/Admin/Modules/Shared/Js/UIComponents/Modals/ModalDialogHeader.html',''); -t.put('/Admin/Modules/Shared/Js/UIComponents/NestedDataModels/EditNestedDataModelDialog.html',' {{::title}} '); -t.put('/Admin/Modules/Shared/Js/UIComponents/NestedDataModels/FormFieldNestedDataModelCollection.html','
{{vm.previewFields.titleTerm}} {{vm.previewFields.fields.previewDescription.displayName}} Actions
None
{{vm.getTitle(entity, $index)}} {{entity[vm.previewFields.fields.previewDescription.lowerName]}}

{{vm.description}}

'); -t.put('/Admin/Modules/Shared/Js/UIComponents/NestedDataModels/FormFieldNestedDataModelMultiTypeCollection.html','
{{vm.imageColumnHeader}} {{vm.titleColumnHeader}} {{vm.descriptionColumnHeader}} {{vm.typeColumnHeader}} Actions
None
{{vm.getTitle(item, $index)}} {{item.model[vm.previewFields[item.typeName].fields.previewDescription.lowerName]}} {{vm.modelMetaDataLookup[item.typeName].displayName}}

{{vm.description}}

'); t.put('/Admin/Modules/Shared/Js/UIComponents/Pages/FormFieldPageCollection.html','
Page Status Actions
None
{{page.fullUrlPath }} {{page.getPublishStatusLabel()}} (Pending Draft)

{{vm.description}}

'); t.put('/Admin/Modules/Shared/Js/UIComponents/Pages/FormFieldPageSelector.html',' '); t.put('/Admin/Modules/Shared/Js/UIComponents/Pages/PagePickerDialog.html',' Find Page
Page Status Created Actions
Sorry, no pages could be found.
{{::page.fullUrlPath }} {{::page.getPublishStatusLabel()}} (Pending Draft)
'); +t.put('/Admin/Modules/Shared/Js/UIComponents/Search/Pager.html',''); +t.put('/Admin/Modules/Shared/Js/UIComponents/Search/SearchFilter.html','
'); t.put('/Admin/Modules/Shared/Js/UIComponents/StatusMessages/SuccessMessage.html','

'); t.put('/Admin/Modules/Shared/Js/UIComponents/StatusMessages/WarningMessage.html','

'); t.put('/Admin/Modules/Shared/Js/UIComponents/Table/TableActions.html','
'); @@ -84,6 +86,4 @@ t.put('/Admin/Modules/Shared/Js/UIComponents/Table/TableContainer.html','
None

Separate each tag with a comma: dog, animal, canine. Used internally for searching for things.

'); t.put('/Admin/Modules/Shared/Js/UIComponents/Tags/TagList.html',' , '); t.put('/Admin/Modules/Shared/Js/UIComponents/Time/TimeAgo.html',''); -t.put('/Admin/Modules/Shared/Js/UIComponents/User/UserLink.html','{{vm.formatName(vm.user)}}{{vm.formatName(vm.user)}}'); -t.put('/Admin/Modules/Shared/Js/UIComponents/Search/Pager.html',''); -t.put('/Admin/Modules/Shared/Js/UIComponents/Search/SearchFilter.html','
');}]); \ No newline at end of file +t.put('/Admin/Modules/Shared/Js/UIComponents/User/UserLink.html','{{vm.formatName(vm.user)}}{{vm.formatName(vm.user)}}');}]); \ No newline at end of file diff --git a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/AddEntityAccessRuleController.js b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/AddEntityAccessRuleController.js index e7388ae99..7015a81f6 100644 --- a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/AddEntityAccessRuleController.js +++ b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/AddEntityAccessRuleController.js @@ -81,7 +81,7 @@ function ( vm.userAreas = _.filter(userAreas, function(userArea) { return userArea.userAreaCode !== 'COF' }); if (vm.userAreas.length == 1) { - vm.command.userAreaCode = vm.userArea.userAreaCode; + vm.command.userAreaCode = vm.userAreas[0].userAreaCode; } } } diff --git a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditor.html b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditor.html index 9006355eb..9dae31efd 100644 --- a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditor.html +++ b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditor.html @@ -125,7 +125,7 @@ - +

These options describe what should happen if the user is denied access.

diff --git a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditorController.js b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditorController.js index ba55920e1..729c65998 100644 --- a/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditorController.js +++ b/src/Cofoundry.Web.Admin/Admin/Modules/Shared/Js/UIComponents/EntityAccess/EntityAccessEditorController.js @@ -67,8 +67,8 @@ function ( return command; }); - - if (!vm.command.redirectoToSignIn) { + + if (!vm.command.redirectToSignIn) { vm.command.userAreaCodeForSignInRedirect = null; } @@ -203,7 +203,7 @@ function ( if (accessRuleSet.userAreaForSignInRedirect) { command.userAreaCodeForSignInRedirect = accessRuleSet.userAreaForSignInRedirect.userAreaCode; - command.redirectoToSignIn = true; + command.redirectToSignIn = true; } return command; @@ -219,17 +219,18 @@ function ( if (!vm.userAreasInRules.length) { // all user areas have been removed from the list - vm.command.redirectoToSignIn = false; + vm.command.redirectToSignIn = false; vm.command.userAreaCodeForSignInRedirect = null; } else if (!_.find(vm.userAreasInRules, function(userArea) { return userArea.userAreaCode === vm.command.userAreaCodeForSignInRedirect; })) { // the selected user area has been removed from the list - vm.command.redirectoToSignIn = false; + vm.command.redirectToSignIn = false; vm.command.userAreaCodeForSignInRedirect = null; } if (!vm.command.userAreaCodeForSignInRedirect && vm.userAreasInRules.length) { // set a default selection in-case the list is hidden vm.command.userAreaCodeForSignInRedirect = vm.userAreasInRules[0].userAreaCode; + console.log('setting vm.command.userAreaCodeForSignInRedirect', vm.command.userAreaCodeForSignInRedirect); } }