All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.action.delete_password_policy.jspf Maven / Gradle / Ivy

The newest version!
<%--
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */
--%>


	function deletePasswordPolicy(passwordPolicyId) {
		Liferay.Util.openConfirmModal({
			message:
				'',
			onConfirm: (isConfirmed) => {
				if (isConfirmed) {
					var form = document.getElementById('fm');

					if (form) {
						form.setAttribute('method', 'post');

						var passwordPolicyIdInput = form.querySelector(
							'#passwordPolicyId'
						);

						if (passwordPolicyIdInput) {
							passwordPolicyIdInput.setAttribute(
								'value',
								passwordPolicyId
							);
						}

						var redirectInput = form.querySelector(
							'#redirect'
						);

						if (redirectInput) {
							redirectInput.setAttribute(
								'value',
								''
							);
						}

						var lifecycleInput = form.querySelector('#p_p_lifecycle');

						if (lifecycleInput) {
							lifecycleInput.setAttribute('value', '1');
						}

						submitForm(
							form,
							''
						);
					}
				}
			},
		});
	}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy