private void Display_EditUser() { Ektron.Cms.Content.EkContent m_refContent; FromUsers = Request.QueryString["FromUsers"]; uId = long.Parse(Request.QueryString["id"]); user_data = m_refUserApi.GetUserById(uId, true, false); template_list = m_refContentApi.GetAllTemplates("TemplateFileName"); m_refContent = m_refSiteApi.EkContentRef; security_data = m_refContentApi.LoadPermissions(0, "content", 0); language.Text = GetAllLanguageDropDownMarkup("language", m_refMsg.GetMessage("app default msg")); if (m_intGroupType == 0) { defaultPreferences = m_refUserApi.GetUserPreferenceById(m_refSiteApi.UserId); if (defaultPreferences.FolderPath == null) { jsPreferenceFolderId.Text = ""; } else { jsPreferenceFolderId.Text = Convert.ToString(defaultPreferences.FolderPath).Replace("\\", "\\\\"); } jsPreferenceWidth.Text = defaultPreferences.Width.ToString(); jsPreferenceHeight.Text = defaultPreferences.Height.ToString(); jsPreferenceTemplate.Text = defaultPreferences.Template; jsPreferenceDispTitleTxt.Text = defaultPreferences.DisplayTitleText; TD_msg.Text += m_refMsg.GetMessage("disable email notifications msg"); if (security_data.IsAdmin && setting_data.EnableMessaging == false) { enablemsg.Text = "<div class=\"ektronTopSpace\"></div><label class=\"ektronCaption\">" + m_refMsg.GetMessage("application emails disabled msg") + "</label>"; } if (user_data.IsDisableMessage) { ltr_checkBox.Text = "<input type=\"checkbox\" maxlength=\"50\" size=\"25\" name=\"disable_msg\" id=\"disable_msg\" value=\"disable_msg\" CHECKED=\"True\">"; } else { ltr_checkBox.Text = "<input type=\"checkbox\" name=\"disable_msg\" id=\"disable_msg\" value=\"disable_msg\">"; } if (user_data.UserPreference.ForceSetting != true) { if (!(defaultPreferences == null)) { preference.Text = "<tr><td/><td><div class=\'ektronTopSpace\'><a class=\"button buttonInlineBlock blueHover buttonDefault\" href=\"Javascript://\" onclick=\"RestoreDefault();return false;\">" + m_refMsg.GetMessage("lnk restore default") + "</a></div><div class=\'ektronTopSpace\'></div></td></tr>"; } } folder.Text += "<td class=\"wrapText\"><label class=\"label wrapText\">" + m_refMsg.GetMessage("lbl set smart desktop") + "</label></td><td><input type=\"checkbox\""; if (user_data.UserPreference.ForceSetting) { folder.Text += " disabled "; } if (user_data.UserPreference.FolderId == "") { folder.Text += " checked "; } folder.Text += " id=\"chkSmartDesktop\" name=\"chkSmartDesktop\"/>"; folder.Text += "<input type=\"hidden\" name=\"OldfolderId\" id=\"OldfolderId\" value=\"" + user_data.UserPreference.FolderId + "\"/>"; folder.Text += "<input type=\"hidden\" name=\"folderId\" id=\"folderId\" value=\"" + user_data.UserPreference.FolderId + "\"/>"; folder.Text += "</td>"; if (user_data.UserPreference.ForceSetting) { lockedmsg.Text = "<tr><td class=\"important\" colspan=\"2\">" + m_refMsg.GetMessage("preferences locked msg") + "</td></tr>"; } forcemsg.Text = "<td>"; forcemsg.Text += m_refSiteApi.SitePath + "<input type=\"text\""; if (user_data.UserPreference.ForceSetting == true) { forcemsg.Text += " disabled "; } forcemsg.Text += " ID=\"templatefilename\" value=\"" + user_data.UserPreference.Template + "\" size=\"35\" class=\"minWidth\" name=\"templatefilename\" />"; if (user_data.UserPreference.ForceSetting == false) { forcemsg.Text += "<a class=\"button buttonInline greenHover selectContent\" href=\"#\" onclick=\"LoadChildPage();return true;\">" + m_refMsg.GetMessage("generic select") + "</a>"; } forcemsg.Text += "</td>"; width.Text = "<td class=\"label\">" + m_refMsg.GetMessage("lbl imagetool resize width") + "</td><td><input class=\"minWidth\" type=\"text\" size=\"4\" id=\"txtWidth\""; if (user_data.UserPreference.ForceSetting) { width.Text += " disabled "; } width.Text += " value=\"" + user_data.UserPreference.Width + "\" name=\"txtWidth\">px</td>"; height.Text = "<td class=\"label\">" + m_refMsg.GetMessage("lbl imagetool resize height") + "</td><td><input class=\"minWidth\" type=\"text\" size=\"4\" id=\"txtHeight\""; if (user_data.UserPreference.ForceSetting) { height.Text += " disabled "; } height.Text += " value=\"" + user_data.UserPreference.Height + "\" name=\"txtHeight\">px</td>"; //disptext.Text = "<td class=\"label wrapText\">" + m_refMsg.GetMessage("lbl display button caption") + "</td><td><input type=\"checkbox\" id=\"chkDispTitleText\""; //if (user_data.UserPreference.DisplayTitleText == "1") //{ // disptext.Text += " checked "; //} //if (user_data.UserPreference.ForceSetting) //{ // disptext.Text += " disabled "; //} //disptext.Text += " name=\"chkDispTitleText\"/></td>"; //disptext.Text += " <input type=\"hidden\" id=\"hdn_pagesize\" name=\"hdn_pagesize\" value=\"" + user_data.UserPreference.PageSize.ToString() + "\" />"; } if (security_data.IsAdmin) { jsIsAdmin.Text = "true"; } else { jsIsAdmin.Text = "false"; } if (security_data.IsAdmin && !( ThirdPartyAuthenticationEnabled(user_data.IsMemberShip) )) { username.Text = "<input type=\"Text\" maxlength=\"255\" size=\"25\" name=\"username\" id=\"username\" value=\"" + user_data.Username + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">"; } else { username.Text = "<input type=\"hidden\" maxlength=\"255\" size=\"25\" name=\"username\" id=\"username\" value=\"" + user_data.Username + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">" + user_data.Username; } if (ThirdPartyAuthenticationEnabled(user_data.IsMemberShip)) { TR_domain.Visible = true; TR_organization.Visible = false; TR_orgunit.Visible = false; TR_ldapdomain.Visible = false; TD_path.InnerHtml = "<input type=\"hidden\" name=\"userpath\" value=\"" + user_data.Path + "\">"; TD_path.InnerHtml += "<input type=\"hidden\" name=\"domain\" value=\"" + user_data.Domain + "\">" + user_data.Domain; } else if (setting_data.ADAuthentication == 2) { TR_domain.Visible = false; TR_organization.Visible = false; TR_orgunit.Visible = false; TR_ldapdomain.Visible = true; //Dim arrOrg As Array //Dim arrCount As Long //Dim arrItem As Array //Dim strOrgUnit As String = "" //Dim strOrg As String = "" string strDC = user_data.Domain; //arrOrg = Split(user_data.Domain, ",") //For arrCount = LBound(arrOrg) To UBound(arrOrg) // If (Not (arrOrg(arrCount) = "")) Then // arrItem = Split(arrOrg(arrCount), "=") // If (arrItem(0) = "o" Or arrItem(0) = " o") Then // strOrg = arrItem(1) // ElseIf (arrItem(0) = "ou" Or arrItem(0) = "ou") Then // If (Not (strOrgUnit = "")) Then // strOrgUnit &= "," // End If // strOrgUnit &= arrItem(1) // ElseIf (arrItem(0) = "dc" Or arrItem(0) = " dc") Then // If (Not (strDC = "")) Then // strDC &= "." // End If // strDC &= arrItem(1) // End If // End If //Next //org.Text = "<input type=""Text"" maxlength=""255"" size=""25"" name=""organization_text"" id=""organization_text"" value=""" & strOrg & """ onkeypress=""return CheckKeyValue(event,'34,32');"">" //orgunit.Text = "<input type=""Text"" maxlength=""255"" size=""25"" name=""orgunit_text"" id=""orgunit_text"" value=""" & strOrgUnit & """ onkeypress=""return CheckKeyValue(event,'34,32');"">" ldapdomain.Text = "<input type=\"Text\" maxlength=\"255\" size=\"25\" name=\"ldapdomain_text\" id=\"ldapdomain_text\" value=\"" + strDC + "\" onkeypress=\"return CheckKeyValue(event,\'34,32\');\">"; } else { TR_domain.Visible = false; TR_organization.Visible = false; TR_orgunit.Visible = false; TR_ldapdomain.Visible = false; } ltr_uid.Text = user_data.Id.ToString(); if (security_data.IsAdmin && !( ThirdPartyAuthenticationEnabled(user_data.IsMemberShip) )) { firstname.Text = "<input type=\"Text\" maxlength=\"50\" size=\"25\" name=\"firstname\" id=\"firstname\" value=\"" + (user_data.FirstName) + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">"; lastname.Text = "<input type=\"Text\" maxlength=\"50\" size=\"25\" name=\"lastname\" id=\"lastname\" value=\"" + (user_data.LastName) + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">"; } else { firstname.Text = "<input type=\"hidden\" name=\"specialCaseOverride\" id=\"specialCaseOverride\" value=\"1\" />"; firstname.Text += "<input type=\"hidden\" maxlength=\"50\" size=\"25\" name=\"firstname\" id=\"firstname\" value=\"" + (user_data.FirstName) + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">" + user_data.FirstName; lastname.Text = "<input type=\"hidden\" maxlength=\"50\" size=\"25\" name=\"lastname\" id=\"lastname\" value=\"" + (user_data.LastName) + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">" + user_data.LastName; } displayname.Text = "<input type=\"Text\" maxlength=\"50\" size=\"25\" name=\"displayname\" id=\"displayname\" value=\"" + (user_data.DisplayName) + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">"; if (ThirdPartyAuthenticationEnabled(user_data.IsMemberShip)) { hppwd.Text = "<td colspan=\"2\"><input type=\"hidden\" maxlength=\"255\" size=\"25\" name=\"pwd\" id=\"pwd\" value=\"" + user_data.Password + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">"; hppwd.Text += "<input type=\"hidden\" name=\"hpwd\" id=\"hpwd\" value=\"" + user_data.Password + "\"</td>"; } else { hppwd.Text = "<td class=\"label\"><span style=\"color:red;\">*</span>" + m_refMsg.GetMessage("password label") + "</td>"; hppwd.Text += "<td class=\"value\"><input type=\"password\" maxlength=\"255\" size=\"25\" name=\"pwd\" id=\"pwd\" value=\"" + user_data.Password + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">"; hppwd.Text += "<input type=\"hidden\" name=\"hpwd\" id=\"hpwd\" value=\"" + user_data.Password + "\">"; hppwd.Text += "</td>"; } if (ThirdPartyAuthenticationEnabled(user_data.IsMemberShip)) { confirmpwd.Text = "<td colspan=\"2\"><input type=\"hidden\" maxlength=\"255\" size=\"25\" name=\"confirmpwd\" id=\"confirmpwd\" value=\"" + user_data.Password + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\"></td>"; } else { confirmpwd.Text = "<td class=\"label\"><span style=\"color:red;\">*</span>" + m_refMsg.GetMessage("confirm pwd label") + "</td>"; confirmpwd.Text += "<td class=\"value\"><input type=\"password\" maxlength=\"255\" size=\"25\" name=\"confirmpwd\" id=\"confirmpwd\" value=\"" + user_data.Password + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\"></td>"; } if (ADIntegrationEnabledForUserType(user_data.IsMemberShip)) { email.Text = "<td class=\"label\">" + m_refMsg.GetMessage("email address label") + "</td>"; email.Text += "<td><input type=\"Hidden\" maxlength=\"255\" size=\"25\" name=\"email_addr1\" id=\"email_addr1\" value=\"" + user_data.Email + "\" onkeypress=\"return CheckKeyValue(event,\'34,32\');\">" + user_data.Email + "</td>"; } else { email.Text = "<td class=\"label\">" + m_refMsg.GetMessage("email address label") + "</td>"; email.Text += "<td class=\"value\"><input type=\"Text\" maxlength=\"255\" size=\"25\" name=\"email_addr1\" id=\"email_addr1\" value=\"" + user_data.Email + "\" onkeypress=\"return CheckKeyValue(event,\'34,32\');\"></td>"; } if (m_intGroupType == 1) { email.Text += "<input type=hidden id=email_addr1Org name=email_addr1Org value=\"" + user_data.Email + "\">"; } if ((this.m_refContentApi.RequestInformationRef.LoginAttempts != -1) && ((security_data.IsAdmin) || (m_refContentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.AdminUsers)))) { accountLocked.Text = "<input type=\"checkbox\" id=\"chkAccountLocked\" name=\"chkAccountLocked\" "; if (user_data.IsAccountLocked(this.m_refContentApi.RequestInformationRef)) { accountLocked.Text += " checked "; } accountLocked.Text += " />"; } else { accountLocked.Text = "<input type=\"hidden\" id=\"chkAccountLocked\" name=\"chkAccountLocked\" "; if (user_data.IsAccountLocked(this.m_refContentApi.RequestInformationRef)) { accountLocked.Text += " value=\"on\" />"; } else { accountLocked.Text += " value=\"\" />"; } } ltr_avatar.Text = "<input type=\"Text\" maxlength=\"255\" size=\"19\" name=\"avatar\" id=\"avatar\" value=\"" + EkFunctions.HtmlEncode(user_data.Avatar) + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">"; ltrmapaddress.Text = "<input type=\"Text\" maxlength=\"100\" size=\"19\" name=\"mapaddress\" id=\"mapaddress\" value=\"" + user_data.Address + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\">"; ltrmaplatitude.Text = "<input type=\"Text\" maxlength=\"100\" size=\"19\" name=\"maplatitude\" id=\"maplatitude\" value=\"" + user_data.Latitude + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\" disabled>"; ltrmaplongitude.Text = "<input type=\"Text\" maxlength=\"100\" size=\"19\" name=\"maplongitude\" id=\"maplongitude\" value=\"" + user_data.Longitude + "\" onkeypress=\"return CheckKeyValue(event,\'34\');\" disabled>"; ltr_upload.Text = "</asp:Literal> <a href=\"Upload.aspx?action=edituser&addedit=true&returntarget=avatar&EkTB_iframe=true&height=300&width=400&modal=true\" title=\"" + m_refMsg.GetMessage("upload txt") + "\" class=\"ek_thickbox button buttonInline greenHover buttonUpload btnUpload\" title=\"" + m_refMsg.GetMessage("upload txt") + "\">" + m_refMsg.GetMessage("upload txt") + "</a>"; HttpBrowserCapabilities browser = Request.Browser; Ektron.Cms.Framework.Context.CmsContextService context = new Ektron.Cms.Framework.Context.CmsContextService(); if (browser.Type.Contains("IE") && browser.MajorVersion >= 9) { // work around to prevent errors in IE9 when it destroys native JS objects // see http://msdn.microsoft.com/en-us/library/gg622929%28v=VS.85%29.aspx uxAvatarUploadIframe.Attributes.Add("src", "about:blank"); } else { uxAvatarUploadIframe.Attributes.Add("src", context.WorkareaPath + "/Upload.aspx?action=edituser&addedit=true&returntarget=avatar&height=300&width=400&modal=true"); } jsUxDialogSelectorTxt.Text = uxDialog.Selector.ToString(); string uploadTxt = m_refMsg.GetMessage("upload txt"); uxDialog.Title = uploadTxt; ltr_upload.Text = "</asp:Literal> <a href=\"#\" onclick=\"$ektron('" + uxDialog.Selector + "').dialog('open'); AvatarDialogInit();\" title=\"" + uploadTxt + "\" class=\"button buttonInline greenHover buttonUpload btnUpload\" title=\"" + uploadTxt + "\">" + uploadTxt + "</a>"; //drp_editor.SelectedIndex = 0 //drp_editor.Items.Add(New ListItem("eWebWP", "ewebwp")) drp_editor.Items.Add(new ListItem(m_refMsg.GetMessage("lbl content designer"), "contentdesigner")); //drp_editor.Items.Add(New ListItem(m_refMsg.GetMessage("lbl jseditor"), "jseditor")) drp_editor.Items.Add(new ListItem("eWebEditPro", "ewebeditpro")); if ((string) (user_data.EditorOption.ToLower().Trim()) == "contentdesigner") { drp_editor.SelectedIndex = 0; //Case "jseditor" // drp_editor.SelectedIndex = 1 } else if ((string) (user_data.EditorOption.ToLower().Trim()) == "ewebeditpro") { drp_editor.SelectedIndex = 1; //Case "ewebwp" // drp_editor.SelectedIndex = 0 } // "ewebwp" else { drp_editor.SelectedIndex = 0; // default to contentdesigner } ctlEditor.Content = user_data.Signature; TD_personalTags.InnerHtml = GetPersonalTags(); CreateColumns(); if (_activityApi.IsActivityPublishingEnabled && (agentList != null)&& agentList.Count > 0 && Ektron.Cms.DataIO.LicenseManager.LicenseManager.IsFeatureEnable(m_refContentApi.RequestInformationRef, Ektron.Cms.DataIO.LicenseManager.Feature.SocialNetworking, false)) { LoadGrid("colleagues"); LoadGrid("groups"); EditPublishPreferencesGrid(); } else { EkMembershipActivityTable.Visible = false; activitiesTab.Visible = false; } //Community alias Tab LoadCommunityAliasTab(); }
protected void Display_ViewBaskets(bool WithEdit) { Ektron.Cms.Commerce.Basket currentBasket; long basketId = 0; CouponApi _CouponApi = new CouponApi(); BasketCalculatorData basketCouponData; if ((Request.QueryString["basketid"] != null) && Request.QueryString["basketid"] != "") { basketId = Convert.ToInt64(Request.QueryString["basketid"]); } if (basketId > 0) { HttpBrowserCapabilities browser = Request.Browser; Ektron.Cms.Framework.Context.CmsContextService context = new Ektron.Cms.Framework.Context.CmsContextService(); if (browser.Type.Contains("IE") && browser.MajorVersion >= 9) { // work around to prevent errors in IE9 when it destroys native JS objects // see http://msdn.microsoft.com/en-us/library/gg622929%28v=VS.85%29.aspx uxViewBasketIframe.Attributes.Add("src", "about:blank"); } else { uxViewBasketIframe.Attributes.Add("src", context.SitePath + "customers.aspx?action=viewbasket&basketid=" + basketId + "&customerid=" + m_iCustomerId + "&thickox=true&height=300&width=700&modal=true&EkTB_iframe=true"); } uxDialog.Title = m_refMsg.GetMessage("lbl view basket"); currentBasket = basketApi.GetItem(basketId); if ((currentBasket != null) && currentBasket.Items.Count > 0) { dg_viewbasket.DataSource = currentBasket.Items; dg_viewbasket.DataBind(); BasketCalculator basketCalc = new BasketCalculator(currentBasket, this.m_refContentApi.RequestInformationRef); basketCouponData = _CouponApi.CalculateBasketCoupons(basketId); if (basketCouponData.BasketCoupons.Count > 0) { ltr_noitems.Text = "<hr/><table width=\"100%\">"; ltr_noitems.Text += "<tr><td align=\"right\" width=\"90%\">" + GetMessage("lbl coupon discount") + "</td><td align=\"right\">(" + Ektron.Cms.Common.EkFunctions.FormatCurrency(basketCouponData.TotalCouponDiscount, defaultCurrency.CultureCode) + ")</td></tr>"; ltr_noitems.Text += "<tr><td align=\"right\" width=\"90%\">" + GetMessage("lbl total") + ": </td><td align=\"right\">" + Ektron.Cms.Common.EkFunctions.FormatCurrency(basketCouponData.BasketTotal, defaultCurrency.CultureCode) + "</td></tr>"; ltr_noitems.Text += "</table>"; } } else { ltr_noitems.Text = this.GetMessage("lbl no items"); } } else { ltr_noitems.Text = this.GetMessage("lbl no items"); } }
protected void Util_SetLabels() { ltr_customerorders_lbl.Text = GetMessage("lbl orders"); ltr_customertotal_lbl.Text = GetMessage("lbl total order value"); ltr_customeravg_lbl.Text = GetMessage("lbl avg order value"); ltr_notes_lbl.Text = GetMessage("lbl ecomm order notes") + (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled ? ("<a href=\"#\" class=\"button buttonInline greenHover buttonEdit btnEdit\" onclick=\"if (allowOpen) { $ektron('" + uxNotesDialog.Selector + "').dialog('open');EktronUiDialogInit('notes'," + m_iID.ToString() + "); }\" title=\"" + GetMessage("btn edit") + "\" >" + GetMessage("btn edit") + "</a>") : ""); ltr_created_lbl.Text = GetMessage("generic datecreated"); ltr_authorized_lbl.Text = GetMessage("lbl date authorized"); ltr_captured_lbl.Text = GetMessage("lbl date captured"); ltr_settleddate_lbl.Text = GetMessage("lbl date settled"); ltr_shipped_lbl.Text = GetMessage("lbl date shipped"); ltr_shippingtotal_tax_lbl.Text = GetMessage("lbl ship tax"); ltr_required_lbl.Text = GetMessage("lbl date required"); ltr_completed_lbl.Text = GetMessage("lbl date completed"); ltr_order_billing_lbl.Text = GetMessage("lbl billing") ;//+ (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled ? ("<a href=\"#\" class=\"button buttonInline greenHover buttonEdit btnEdit\" onclick=\"if (allowOpen) { ektb_show(\'" + GetMessage("lbl edit address") + "\', \'fulfillment.aspx?addressType=billing&action=editaddress&id=" + m_iID.ToString() + "&EkTB_iframe=true&width=500&height=350&scrolling=true&modal=true\', false); } \" title=\"" + GetMessage("btn edit") + "\" >" + GetMessage("btn edit") + "</a>") : ""); ltr_order_shipping_lbl.Text = GetMessage("lbl shipping");// + (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled ? ("<a href=\"#\" class=\"button buttonInline greenHover buttonEdit btnEdit\" onclick=\"if (allowOpen) { ektb_show(\'" + GetMessage("lbl edit address") + "\', \'fulfillment.aspx?addressType=shipping&action=editaddress&id=" + m_iID.ToString() + "&EkTB_iframe=true&width=500&height=350&scrolling=true&modal=true\', false); } \" title=\"" + GetMessage("btn edit") + "\" >" + GetMessage("btn edit") + "</a>") : ""); ltr_subtotal_lbl.Text = GetMessage("lbl subtotal"); ltr_coupontotal_lbl.Text = GetMessage("lbl coupon total"); ltr_taxtotal_lbl.Text = GetMessage("lbl wa tax"); ltr_shippingtotal_lbl.Text = GetMessage("lbl shipping"); ltr_ordertotal_lbl.Text = GetMessage("lbl order total"); ltr_trackingnumber.Text = GetMessage("lbl tracking number"); ltr_markasshipped.Text = GetMessage("lbl mark as shipped"); hdn_errorMessage.Value = string.Format(GetMessage("js alert field cannot include"), "< >"); hdn_errOrderNotesMessage.Value = string.Format(GetMessage("js alert field cannot include"), "< >"); ltr_desc_lbl.Text = GetMessage("generic description"); ltr_saleprice_lbl.Text = GetMessage("lbl sale price"); ltr_qty_lbl.Text = GetMessage("lbl quantity"); ltr_total_lbl.Text = GetMessage("lbl total"); ltr_transactionId_lbl.Text = GetMessage("lbl transactionid"); ltr_gateway_lbl.Text = GetMessage("lbl payment gateway"); ltr_type_lbl.Text = GetMessage("generic type"); ltr_last4_lbl.Text = GetMessage("lbl last 4 digits"); ltr_amount_lbl.Text = GetMessage("lbl payment total"); ltr_paymentdate_lbl.Text = GetMessage("lbl payment date"); ltr_authorizeddate_lbl.Text = GetMessage("lbl date authorized"); ltr_captureddate_lbl.Text = GetMessage("lbl date captured"); ltr_holdmsg.Text = m_refMsg.GetMessage("one moment msg"); ltr_showidsearch.Text = GetMessage("lbl reporting id orders"); ltr_searchid.Text = GetMessage("lbl err order id invalid"); this.ltr_address_id_lbl.Text = this.GetMessage("generic id"); this.ltr_address_name.Text = this.GetMessage("lbl address name"); this.ltr_address_company.Text = this.GetMessage("lbl address company"); this.ltr_address_line1.Text = this.GetMessage("lbl address street"); this.ltr_address_city_lbl.Text = this.GetMessage("lbl address city"); this.ltr_address_region.Text = this.GetMessage("lbl address state province"); this.ltr_address_postal.Text = this.GetMessage("lbl address postal"); this.ltr_address_country.Text = this.GetMessage("lbl address country"); this.ltr_address_phone.Text = this.GetMessage("lbl address phone"); HttpBrowserCapabilities browser = Request.Browser; Ektron.Cms.Framework.Context.CmsContextService context = new Ektron.Cms.Framework.Context.CmsContextService(); switch (this.m_sPageAction) { case "editnotes": pnl_viewall.Visible = false; pnl_trackingnumber.Visible = false; pnl_payment.Visible = false; pnl_notes.Visible = true; if (browser.Type.Contains("IE") && browser.MajorVersion >= 9) { // work around to prevent errors in IE9 when it destroys native JS objects // see http://msdn.microsoft.com/en-us/library/gg622929%28v=VS.85%29.aspx uxEditNotesIframe.Attributes.Add("src", "about:blank"); } else { uxEditNotesIframe.Attributes.Add("src", context.SitePath + "fulfillment.aspx?action=editnotes&id=" + m_iID.ToString() + "&width=350&height=250&scrolling=true&modal=true"); } //uxNotesDialog.Title = m_refMsg.GetMessage("lbl ecomm edit order notes"); //AddBackButton("javascript:$ektron('" + uxNotesDialog.Selector + "').dialog('close');"); workareamenu newMenu_1 = new workareamenu("file", GetMessage("lbl action"), m_refContentApi.AppPath + "images/UI/Icons/check.png"); newMenu_1.AddItem(m_refContentApi.AppPath + "images/ui/icons/save.png", GetMessage("btn save"), "EditNotes();"); AddMenu(newMenu_1); SetTitleBarToMessage("lbl ecomm edit order notes"); break; case "vieworder": if (Request.QueryString["page"] == "workarea") { // redirect to workarea when user clicks back button if we're in workarea AddBackButton("javascript:top.switchDesktopTab()"); } else { AddBackButton("fulfillment.aspx"); } if (bCommerceAdmin && (order != null)) { workareamenu newMenu = new workareamenu("file", GetMessage("lbl action"), m_refContentApi.AppPath + "images/UI/Icons/check.png"); IList<string> options = null; try { if (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled && !(order.WorkflowId == Guid.Empty)) { options = Ektron.Workflow.Runtime.WorkflowHandler.GetOrderEventQueue(order.WorkflowId); } } catch (Exception ex) { if (order.WorkflowId != Guid.Empty && ex.Message.IndexOf(order.WorkflowId.ToString()) == -1) { throw (ex); } } if (options != null) { int addedOptions = 0; for (int i = 0; i <= (options.Count - 1); i++) { string EventImage = "arrow_right_green.gif"; string EventName = (string)(options[i].Replace("OnOrder", "")); bool addThisItem = true; switch (EventName.ToLower()) { case "updated": EventName = GetMessage("lbl workflow updated"); addThisItem = false; break; case "processed": EventName = GetMessage("lbl workflow processed"); addedOptions++; break; case "shipped": EventName = GetMessage("lbl workflow shipped"); EventImage = "commerce/bundle.gif"; addThisItem = false; if (order.Status != EkEnumeration.OrderStatus.Fraud && order.Status != EkEnumeration.OrderStatus.Cancelled && order.Status != EkEnumeration.OrderStatus.Completed && Util_NeedsTrackingNumber()) { newMenu.AddBreak(); newMenu.AddItem(AppImgPath + "commerce/bundle.gif", GetMessage("lbl add tracking number"), "AddTrackingNumber();"); addedOptions++; } else if (Util_CanEditTrackingNumber()) { addThisItem = true; newMenu.AddBreak(); newMenu.AddItem(AppImgPath + "commerce/bundle.gif", GetMessage("lbl edit tracking number"), "AddTrackingNumber();"); addedOptions++; } break; case "cancelled": EventName = GetMessage("lbl cancel order"); EventImage = "commerce/cancel.gif"; addThisItem = false; if (order.Status != EkEnumeration.OrderStatus.Cancelled && order.Status != EkEnumeration.OrderStatus.Fraud && order.Status != EkEnumeration.OrderStatus.Completed) { newMenu.AddBreak(); newMenu.AddItem(AppImgPath + "commerce/cancel.gif", GetMessage("lbl cancel order"), "CancelOrder();"); addedOptions++; } break; case "fraud": EventName = GetMessage("lbl mark fraud"); EventImage = "commerce/fraud.gif"; addThisItem = false; if (order.Status != EkEnumeration.OrderStatus.Fraud && order.Status != EkEnumeration.OrderStatus.Cancelled && order.Status != EkEnumeration.OrderStatus.Completed) { newMenu.AddItem(AppImgPath + "commerce/fraud.gif", GetMessage("lbl mark fraud"), "MarkAsFraud();"); addedOptions++; } break; default: EventName = options[i]; addedOptions++; break; } if (addThisItem) { newMenu.AddItem(AppImgPath + EventImage, EventName, "CallOrderEvent(\'" + options[i] + "\');"); } } if (addedOptions > 0) { newMenu.AddBreak(); } } if (IsCommerceAdmin) { newMenu.AddItem(AppImgPath + "adobe-pdf.gif", "Export As PDF", "window.open(\'" + m_refContentApi.AppPath + "commerce/export/order.aspx?id=" + m_iID.ToString() + "&type=pdf\', \'PDF\');"); newMenu.AddItem(AppImgPath + "ms-excel.gif", "Export As XLS", "window.open(\'" + m_refContentApi.AppPath + "commerce/export/order.aspx?id=" + m_iID.ToString() + "&type=xls\', \'XLS\');"); newMenu.AddItem(AppImgPath + "ms-notepad.gif", "Export As CSV", "window.open(\'" + m_refContentApi.AppPath + "commerce/export/order.aspx?id=" + m_iID.ToString() + "&type=csv\', \'CSV\');"); this.AddButtonwithMessages(AppImgPath + "../UI/Icons/delete.png", m_refContentApi.AppPath + "Commerce/fulfillment.aspx?action=delete&orderid=" + m_iID.ToString(), "generic delete title", "generic delete title", " onclick=\"return confirm(\'" + GetMessage("js: confirm delete order") + "\');\" ", StyleHelper.DeleteButtonCssClass, true); } this.AddMenu(newMenu); } if (order == null) { this.pnl_view.Visible = false; } else { this.pnl_view.Visible = true; } this.SetTitleBarToMessage("lbl view order"); break; case "showpayment": pnl_viewall.Visible = false; pnl_trackingnumber.Visible = false; pnl_payment.Visible = true; tr_orderpart.Visible = false; if (browser.Type.Contains("IE") && browser.MajorVersion >= 9) { // work around to prevent errors in IE9 when it destroys native JS objects // see http://msdn.microsoft.com/en-us/library/gg622929%28v=VS.85%29.aspx uxPaymentIframe.Attributes.Add("src", "about:blank"); } else { uxPaymentIframe.Attributes.Add("src", context.SitePath + "fulfillment.aspx?action=showpayment&orderid=" + m_iID.ToString() + "&width=500&height=300&scrolling=true&modal=true"); } //AddBackButton("javascript:parent.ektb_remove();"); workareamenu newMenu_2 = new workareamenu("file", GetMessage("lbl action"), AppImgPath + "check20.gif"); if (!m_refContentApi.RequestInformationRef.CommerceSettings.OrderProcessingDisabled && !Page.IsPostBack) { if (order.Status != EkEnumeration.OrderStatus.Cancelled && order.Status != EkEnumeration.OrderStatus.Fraud) { if (payment.CapturedOn == DateTime.MinValue) { newMenu_2.AddItem(AppImgPath + "commerce/Submit.gif", GetMessage("lbl capture"), "CaptureOrder();"); if (payment.PaymentType.ToLower() == "ektron.cms.commerce.paypalpayment" || payment.PaymentType.ToLower() == "ektron.cms.commerce.checkpayment") { newMenu_2.AddItem(AppImgPath + "commerce/accept.gif", GetMessage("lbl capture and settle"), "CaptureOrderAndSettle();"); } } if (payment.CapturedOn != DateTime.MinValue && payment.CapturedOn != DateTime.MaxValue && (payment.SettledDate == DateTime.MinValue || payment.SettledDate == DateTime.MaxValue) && (payment.PaymentType.ToLower() == "ektron.cms.commerce.paypalpayment" || payment.PaymentType.ToLower() == "ektron.cms.commerce.checkpayment")) { newMenu_2.AddItem(AppImgPath + "commerce/accept.gif", GetMessage("lbl settle"), "SettlePayment();"); } } } if (payment != null && payment.PaymentType.ToLower() == "ektron.cms.commerce.paypalpayment") { newMenu_2.AddItem(AppImgPath + "commerce/paypal.gif", GetMessage("lbl check payment status"), "CheckPayPalStatus();"); } this.AddMenu(newMenu_2); SetTitleBarToMessage("lbl view payment"); break; case "trackingnumber": pnl_viewall.Visible = false; pnl_trackingnumber.Visible = true; tr_orderpart.Visible = false; AddBackButton("javascript:parent.ektb_remove();"); AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/save.png", "#", "btn save", "btn save", " onclick=\"SubmitTrackingNumber(); return false;\" ", StyleHelper.SaveButtonCssClass, true); break; //case "editaddress": // pnl_viewaddress.Visible = true; // this.tr_address_id.Visible = this.m_iID > 0; // AddBackButton("javascript:parent.ektb_remove();"); // this.AddButtonwithMessages(m_refContentApi.AppPath + "images/UI/Icons/save.png", "#", "btn save", "btn save", " onclick=\"CheckAddress(); return false;\" ", StyleHelper.SaveButtonCssClass, true); // this.SetTitleBarToString(this.GetMessage((string)(this.m_iID > 0 ? "lbl edit address" : "lbl add address"))); // break; default: // "viewall" workareamenu newMenu_3 = new workareamenu("file", GetMessage("lbl order reporting"), AppImgPath + "commerce/catalog_view.gif"); newMenu_3.AddItem(AppImgPath + "commerce/calendar_down.gif", GetMessage("lbl report most recent orders"), "window.location.href = \'fulfillment.aspx?action=mostrecent\';"); newMenu_3.AddItem(AppImgPath + "commerce/calendar.gif", GetMessage("lbl report date orders"), "ektb_show(\'" + GetMessage("lbl reporting by dates") +"\', \'bydates.aspx?EkTB_iframe=true&width=400&height=150&scrolling=true&modal=true\', false);"); newMenu_3.AddItem(AppImgPath + "menu/users2.gif", GetMessage("lbl report customer orders"), "ektb_show(\'" + GetMessage("lbl reporting by customer") + "\', \'bycustomer.aspx?EkTB_iframe=true&width=500&height=150&scrolling=true&modal=true\', false);"); newMenu_3.AddItem(m_refContentApi.AppPath + "images/ui/icons/brick.png", GetMessage("lbl report product orders"), "ektb_show(\'" + GetMessage("lbl reporting by product") + "\', \'byproduct.aspx?action=reporting&EkTB_iframe=true&width=500&height=150&scrolling=true&modal=true\', false);"); newMenu_3.AddItem(AppImgPath + "commerce/Submit.gif", GetMessage("lbl report id orders"), "ShowOrderIdSearch();"); //This option is being hidden for now (issue# 38244), and needs to be implemented in next release, which is 7.6.0 release/maintenance. //newMenu.AddItem(AppImgPath & "menu/form_blue.gif", GetMessage("lbl report custom orders"), "CustomReport();") this.AddMenu(newMenu_3); this.SetTitleBarToMessage("lbl orders"); break; } this.AddHelpButton((string)("orders" + EkFunctions.UrlEncode(m_sPageAction))); }
public void Util_PopulateCustomer(CustomerData Customer) { ltr_customername.Text = "<a href=\"customers.aspx?action=view&id=" + Customer.Id + "\">" + Customer.FirstName + " " + Customer.LastName + " (" + Customer.DisplayName + ")</a>"; if (!(Customer.IsDeleted)) { ltr_customername.Text += " <a href=\"#\" onclick=\"$ektron('" + uxEmailDialog.Selector + "').dialog('open');EktronUiDialogInit('email'," + Customer.Id.ToString() + ") \"><img alt=\"" + GetMessage("btn email") + "\" title=\"" + GetMessage("btn email") + "\" src=\"" + m_refContentApi.AppPath + "Images/ui/icons/email.png\" /></a>"; HttpBrowserCapabilities browser = Request.Browser; Ektron.Cms.Framework.Context.CmsContextService context = new Ektron.Cms.Framework.Context.CmsContextService(); if (browser.Type.Contains("IE") && browser.MajorVersion >= 9) { // work around to prevent errors in IE9 when it destroys native JS objects // see http://msdn.microsoft.com/en-us/library/gg622929%28v=VS.85%29.aspx uxEmailIframe.Attributes.Add("src", "about:blank"); uxCouponIframe.Attributes.Add("src", "about:blank"); } //else //{ // uxEmailIframe.Attributes.Add("src", context.SitePath + "../email.aspx?userarray=" + Customer.Id.ToString() + "&fromModal=true&width=500&height=620&scrolling=true&modal=true"); //} //uxEmailDialog.Title = m_refMsg.GetMessage("btn email"); jsUxDialogSelectorTxt.Text = uxEmailDialog.Selector.ToString(); jsUxCouponDlgSelectorTxt.Text = uxCouponDialog.Selector.ToString(); } ltr_customerorders.Text = Customer.TotalOrders.ToString(); ltr_customertotal.Text = defaultCurrency.ISOCurrencySymbol + EkFunctions.FormatCurrency(Customer.TotalOrderValue, defaultCurrency.CultureCode); ltr_customeravg.Text = defaultCurrency.ISOCurrencySymbol + EkFunctions.FormatCurrency(Customer.AverageOrderValue, defaultCurrency.CultureCode); }
private void Display_AddUserToSystem() { this.Controls.AddAt(0, Utilities.GetUniqueIdField(m_refContentApi.RequestInformationRef.UniqueId)); language_data = m_refSiteApi.GetAllActiveLanguages(); security_data = m_refContentApi.LoadPermissions(0, "content", 0); AddUserToSystemToolBar(); int i; // drp_editor.Items.Add(New ListItem("eWebWP", "ewebwp")) drp_editor.Items.Add(new ListItem(m_refMsg.GetMessage("lbl content designer"), "contentdesigner")); //drp_editor.Items.Add(New ListItem(m_refMsg.GetMessage("lbl jseditor"), "jseditor")) drp_editor.Items.Add(new ListItem("eWebEditPro", "ewebeditpro")); // All users default to contentdesigner since jsEditor is no longer supported //If m_intGroupType = 0 Then drp_editor.SelectedIndex = 0; //Else //drp_editor.SelectedIndex = 1 //End If language.Items.Add(new ListItem(m_refMsg.GetMessage("app default msg"), "0")); if (!(language_data == null)) { for (i = 0; i <= language_data.Length - 1; i++) { language.Items.Add(new ListItem(language_data[i].Name, language_data[i].Id.ToString())); } } if (security_data.IsAdmin && setting_data.EnableMessaging == false) { msg.Text = m_refMsg.GetMessage("application emails disabled msg"); } litDisableMessage.Text = m_refMsg.GetMessage("disable email notifications msg"); HttpBrowserCapabilities browser = Request.Browser; Ektron.Cms.Framework.Context.CmsContextService context = new Ektron.Cms.Framework.Context.CmsContextService(); if (browser.Type.Contains("IE") && browser.MajorVersion >= 9) { // work around to prevent errors in IE9 when it destroys native JS objects // see http://msdn.microsoft.com/en-us/library/gg622929%28v=VS.85%29.aspx uxAvatarUploadIframe.Attributes.Add("src", "about:blank"); } else { uxAvatarUploadIframe.Attributes.Add("src", context.WorkareaPath + "/Upload.aspx?action=edituser&addedit=true&returntarget=user_avatar&height=300&width=400&modal=true"); } jsUxDialogSelectorTxt.Text = uxDialog.Selector.ToString(); string uploadTxt = m_refMsg.GetMessage("upload txt"); uxDialog.Title = uploadTxt; ltr_upload.Text = "</asp:Literal> <a href=\"#\" onclick=\"$ektron('" + uxDialog.Selector + "').dialog('open'); AvatarDialogInit();\" title=\"" + uploadTxt + "\" class=\"button buttonInline greenHover buttonUpload btnUpload\" title=\"" + uploadTxt + "\">" + uploadTxt + "</a>"; }