diff --git a/app/workgroup/directives/modals/addPlaceholderUser/addPlaceholderUser.css b/app/workgroup/directives/modals/addPlaceholderUser/addPlaceholderUser.css new file mode 100644 index 000000000..803fc63fc --- /dev/null +++ b/app/workgroup/directives/modals/addPlaceholderUser/addPlaceholderUser.css @@ -0,0 +1,60 @@ +.add-placeholder-user__input { + width: 30%; + padding-left: 10px; + padding-top: 10px; +} + +.add-placeholder-user__label { + padding-left: 20px; + font-weight: bold; +} + +.add-placeholder-user__footer { + display: flex; + justify-content: flex-end; + margin-top: 20px; + padding: 10px; + padding-bottom: 15px; + padding-top: 15px; + background-color: rgb(248, 248, 248); +} + +.add-placeholder-user__warning { + padding: 10px; + color: gray; +} + +.add-placeholder-users__input-container { + display: flex; +} + + +.add-placeholder-user .neon-dark-confirm-btn, +.add-placeholder-user .neon-dark-confirm-btn:focus, +.add-placeholder-user .neon-dark-confirm-btn:active, +.add-placeholder-user .neon-dark-confirm-btn { + background-color: rgb(48, 54, 65); + border-color: rgb(48, 54, 65); + color: white; +} + +.add-placeholder-user .neon-dark-confirm-btn:hover { + background-color: rgb(18, 24, 35); /* Darker Version for hover */ + color: white; +} + +.add-placeholder-user .neon-dark-confirm-btn.disabled, +.add-placeholder-user .neon-dark-confirm-btn.disabled:hover, +.add-placeholder-user .neon-dark-confirm-btn.disabled:focus, +.add-placeholder-user .neon-dark-confirm-btn.disabled:active { + background-color: rgb(48, 54, 65); + color: white; +} + +.add-placeholder-user__cancel-button { + margin-right: 5px; + margin-left: 5px; + color: #303641; + background-color: white; + border: 1px solid #D6D6D6; +} diff --git a/app/workgroup/directives/modals/addPlaceholderUser/addPlaceholderUser.html b/app/workgroup/directives/modals/addPlaceholderUser/addPlaceholderUser.html new file mode 100644 index 000000000..55596d240 --- /dev/null +++ b/app/workgroup/directives/modals/addPlaceholderUser/addPlaceholderUser.html @@ -0,0 +1,44 @@ +
+
+ Please note: This form should only be used to add a user if they do NOT have a kerberos account yet. +
+ This user will not be able to login to IPA (until you provide the kerberos login id), + but you will be able to refer to them in IPA and include them in your scheduling plans. +
+
+ + + + + + + + +
+ + +
diff --git a/app/workgroup/directives/modals/addPlaceholderUser/addPlaceholderUser.js b/app/workgroup/directives/modals/addPlaceholderUser/addPlaceholderUser.js new file mode 100644 index 000000000..c684d1141 --- /dev/null +++ b/app/workgroup/directives/modals/addPlaceholderUser/addPlaceholderUser.js @@ -0,0 +1,66 @@ +import './addPlaceholderUser.css'; + +let addPlaceholderUser = function (WorkgroupActionCreators) { + return { + restrict: 'E', + template: require('./addPlaceholderUser.html'), + replace: true, + scope: { + isVisible: '=' + }, + link: function (scope) { + scope.view = { + firstName: "", + lastName: "", + email: "", + validationMessage: "" + }; + + scope.addPlaceholderUser = function() { + var user = { + firstName: scope.view.firstName, + lastName: scope.view.lastName, + email: scope.view.email + }; + + WorkgroupActionCreators.addPlaceholderUser(user); + scope.close(); + }; + + scope.isPlaceholderUserValid = function() { + if ( + !scope.view.firstName && + !scope.view.lastName && + !scope.view.email + ) { + scope.view.validationMessage = ""; + return false; + } + + if (!scope.view.firstName) { + scope.view.validationMessage = "First name is required"; + return false; + } + + if (!scope.view.lastName) { + scope.view.validationMessage = "Last name is required"; + return false; + } + + if (!scope.view.email) { + scope.view.validationMessage = "Email is required"; + return false; + } + + scope.view.validationMessage = ""; + return true; + }; + + scope.close = function () { + scope.isVisible = false; + }; + } // end link + }; +}; + +export default addPlaceholderUser; diff --git a/app/workgroup/directives/peopleAndRoles/rolesTable/rolesTable.css b/app/workgroup/directives/peopleAndRoles/rolesTable/rolesTable.css index 4ba2a39d7..11a2a3bed 100644 --- a/app/workgroup/directives/peopleAndRoles/rolesTable/rolesTable.css +++ b/app/workgroup/directives/peopleAndRoles/rolesTable/rolesTable.css @@ -73,3 +73,47 @@ padding: 10px; color: #aaabae; } + +.roles-table__placeholder-update-validation { + padding-top: 2px; + padding-bottom: 2px; + min-height: 1.3em; + line-height: 1; + color: gray; +} + +.roles-table__placeholder { + color: #ffeb3c; + border: 1px solid; + border-radius: 4px; + font-size: 15px; + padding-top: 3px; + padding-left: 4px; + padding-right: 4px; + padding-bottom: 3px; +} + +.roles-table__update-placeholder-ui { + padding-top: 5px; +} + +.roles-table__update-placeholder-container { + display: flex; +} + +.roles-table__update-placeholder-input { + margin-left: -5px; +} + +.roles-table__update-placeholder-buttons { + padding-right: 2px; +} + +.roles-table__placeholder-person-ui { + display: flex; + justify-content: flex-end; +} + +.roles-table__match { + border-bottom:1px solid #f3f3f3; +} diff --git a/app/workgroup/directives/peopleAndRoles/rolesTable/rolesTable.html b/app/workgroup/directives/peopleAndRoles/rolesTable/rolesTable.html index f839fd8bf..b5f7ec19d 100644 --- a/app/workgroup/directives/peopleAndRoles/rolesTable/rolesTable.html +++ b/app/workgroup/directives/peopleAndRoles/rolesTable/rolesTable.html @@ -7,23 +7,58 @@ ng-change="searchOnChange()" typeahead-loading="view.loadingPeople" typeahead-no-results="view.noResults" typeahead-wait-ms="400" typeahead-min-length="2" typeahead-on-select="searchUsersResultSelected($item, $model, $label, $event)" class="form-control typeahead" - typeahead-template-url="popupTemplate.html"> - - + typeahead-popup-template-url="popupTemplate.html"> +