mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-27 04:58:42 +02:00
resolved merge conflict
This commit is contained in:
commit
aa01c2283b
1 changed files with 12 additions and 15 deletions
|
@ -137,7 +137,7 @@ export class MembersTable extends BaseTable {
|
||||||
}
|
}
|
||||||
// This easter egg is only for fixtures that dont have names as we are displaying their emails
|
// This easter egg is only for fixtures that dont have names as we are displaying their emails
|
||||||
// All prod users will have emails linked to their account
|
// All prod users will have emails linked to their account
|
||||||
if (customTableOptions.isDeletable) MembersTable.addMemberModal(num_domains, member.email || "Samwise Gamgee", member_delete_url, unique_id, row);
|
if (customTableOptions.needsAdditionalColumn) MembersTable.addMemberDeleteModal(num_domains, member.email || "Samwise Gamgee", member_delete_url, unique_id, row);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -417,25 +417,22 @@ export class MembersTable extends BaseTable {
|
||||||
* @param {string} submit_delete_url - `${member_type}-${member_id}/delete`
|
* @param {string} submit_delete_url - `${member_type}-${member_id}/delete`
|
||||||
* @param {HTMLElement} wrapper_element - The element to which the modal is appended
|
* @param {HTMLElement} wrapper_element - The element to which the modal is appended
|
||||||
*/
|
*/
|
||||||
static addMemberModal(num_domains, member_email, submit_delete_url, id, wrapper_element) {
|
static addMemberDeleteModal(num_domains, member_email, submit_delete_url, id, wrapper_element) {
|
||||||
let modalHeading = '';
|
|
||||||
let modalDescription = '';
|
|
||||||
|
|
||||||
if (num_domains == 0){
|
let modalHeading = ``;
|
||||||
|
let modalDescription = ``;
|
||||||
|
|
||||||
|
if (num_domains >= 0){
|
||||||
modalHeading = `Are you sure you want to delete ${member_email}?`;
|
modalHeading = `Are you sure you want to delete ${member_email}?`;
|
||||||
modalDescription = `They will no longer be able to access this organization.
|
modalDescription = `They will no longer be able to access this organization.
|
||||||
This action cannot be undone.`;
|
This action cannot be undone.`;
|
||||||
} else if (num_domains == 1) {
|
if (num_domains >= 1)
|
||||||
modalHeading = `Are you sure you want to delete ${member_email}?`;
|
{
|
||||||
modalDescription = `<b>${member_email}</b> currently manages ${num_domains} domain in the organization.
|
modalDescription = `<b>${member_email}</b> currently manages ${num_domains} domain${num_domains > 1 ? "s": ""} in the organization.
|
||||||
Removing them from the organization will remove all of their domains. They will no longer be able to
|
Removing them from the organization will remove them from all of their domains. They will no longer be able to
|
||||||
access this organization. This action cannot be undone.`;
|
|
||||||
} else if (num_domains > 1) {
|
|
||||||
modalHeading = `Are you sure you want to delete ${member_email}?`;
|
|
||||||
modalDescription = `<b>${member_email}</b> currently manages ${num_domains} domains in the organization.
|
|
||||||
Removing them from the organization will remove all of their domains. They will no longer be able to
|
|
||||||
access this organization. This action cannot be undone.`;
|
access this organization. This action cannot be undone.`;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const modalSubmit = `
|
const modalSubmit = `
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue