Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Core: Updated confirm script to allow for more than one onclick call
  • Loading branch information
ElijahFowler committed Mar 29, 2018
1 parent e2a238c commit 552efed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Web/Admin/PageLayout.aspx.cs
Expand Up @@ -820,7 +820,7 @@ private void PopulateLabels()
btnDeleteAlt1.Attributes.Add("class", displaySettings.PageLayoutDeleteButtonCssClass);
btnDeleteAlt1.Attributes.Add("title", Resource.PageLayoutAlt1EditButton);

//UIHelper.AddConfirmationDialog(btnDeleteAlt1, Resource.PageLayoutRemoveContentWarning);
UIHelper.AddConfirmationDialog(btnDeleteAlt1, Resource.PageLayoutRemoveContentWarning);


//
Expand Down Expand Up @@ -852,7 +852,7 @@ private void PopulateLabels()
LeftDeleteBtn.Attributes.Add("class", displaySettings.PageLayoutDeleteButtonCssClass);
LeftDeleteBtn.Attributes.Add("title", Resource.PageLayoutLeftDeleteAlternateText);

//UIHelper.AddConfirmationDialog(LeftDeleteBtn, Resource.PageLayoutRemoveContentWarning);
UIHelper.AddConfirmationDialog(LeftDeleteBtn, Resource.PageLayoutRemoveContentWarning);


//
Expand Down Expand Up @@ -901,7 +901,7 @@ private void PopulateLabels()
ContentDeleteBtn.Attributes.Add("class", displaySettings.PageLayoutDeleteButtonCssClass);
ContentDeleteBtn.Attributes.Add("title", Resource.PageLayoutContentDeleteAlternateText);

//UIHelper.AddConfirmationDialog(ContentDeleteBtn, Resource.PageLayoutRemoveContentWarning);
UIHelper.AddConfirmationDialog(ContentDeleteBtn, Resource.PageLayoutRemoveContentWarning);


//
Expand All @@ -928,7 +928,7 @@ private void PopulateLabels()
RightDeleteBtn.Attributes.Add("class", displaySettings.PageLayoutDeleteButtonCssClass);
RightDeleteBtn.Attributes.Add("title", Resource.PageLayoutRightDeleteAlternateText);

//UIHelper.AddConfirmationDialog(RightDeleteBtn, Resource.PageLayoutRemoveContentWarning);
UIHelper.AddConfirmationDialog(RightDeleteBtn, Resource.PageLayoutRemoveContentWarning);


//
Expand Down Expand Up @@ -960,7 +960,7 @@ private void PopulateLabels()
btnDeleteAlt2.Attributes.Add("class", displaySettings.PageLayoutDeleteButtonCssClass);
btnDeleteAlt2.Attributes.Add("title", Resource.PageLayoutAlt2EditButton);

//UIHelper.AddConfirmationDialog(btnDeleteAlt2, Resource.PageLayoutRemoveContentWarning);
UIHelper.AddConfirmationDialog(btnDeleteAlt2, Resource.PageLayoutRemoveContentWarning);


// Button Groups
Expand Down
2 changes: 1 addition & 1 deletion mojoPortal.Web.Framework/UIHelper.cs
Expand Up @@ -488,7 +488,7 @@ public static void AddConfirmationDialog(WebControl button, string confirmationT
public static void AddConfirmationDialog(HtmlButton button, string confirmationText)
{
if (button == null) return;
button.Attributes.Add("onclick", string.Format("return confirm('{0}');", confirmationText));
button.Attributes.Add("onclick", string.Format("if(!confirm('{0}')) {{return}};", confirmationText));
}

public static void AddConfirmationDialogWithClearExitCode(WebControl button, string confirmationText)
Expand Down

0 comments on commit 552efed

Please sign in to comment.