UserManagement:User.ManageAddresses.DeleteAddress.Javascript
Version: - stringSummary
Returns a script with a delete address function similar to this:
<script>function deleteAddress(addressId){if(document.getElementById('UserId').value == addressId){alert('Main address can not be deleted.');return;}else if (document.getElementById('DefaultAddressId').value == addressId){alert('You can’t delete a default address. Set another address as default before delete this address.');return;}else if(confirm('Delete address?')){document.getElementById('SelectedAddressId').value = addressId;document.getElementById('ManageAddressesFormAction').value = 'Delete';document.getElementById('UserManagementManageAddressesForm').submit();}}</script>
Settings
The value is generated automatically.
Examples
Outputting the template tag
Check if tag has a value
Assign tag to a value for later use
Outputting the template tag
Check if string has a value