From 103f6f0d0e113e446b4e0c1382cfcb0e63904be1 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Mon, 25 Sep 2017 17:53:23 +0200 Subject: [PATCH] Testing currency box blur --- Site/Controls/v5/Financial/CurrencyTextBox.ascx | 7 +++++++ Site/Controls/v5/Financial/CurrencyTextBox.ascx.cs | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Site/Controls/v5/Financial/CurrencyTextBox.ascx b/Site/Controls/v5/Financial/CurrencyTextBox.ascx index af8168a3..e0bf139f 100644 --- a/Site/Controls/v5/Financial/CurrencyTextBox.ascx +++ b/Site/Controls/v5/Financial/CurrencyTextBox.ascx @@ -28,4 +28,11 @@ // <%=this.ClientID%>_enable(); } + $(document).ready(function() { + $('#<%=this.ClientID%>_TextInput').blur(function() { + alert('currency blur'); + }); + + }); + diff --git a/Site/Controls/v5/Financial/CurrencyTextBox.ascx.cs b/Site/Controls/v5/Financial/CurrencyTextBox.ascx.cs index 0e4a2a50..4cb04b2b 100644 --- a/Site/Controls/v5/Financial/CurrencyTextBox.ascx.cs +++ b/Site/Controls/v5/Financial/CurrencyTextBox.ascx.cs @@ -9,7 +9,7 @@ namespace Swarmops.Frontend.Controls.Financial /// This is an ordinary textbox, except it does culture-sensitive and /// asynchronous validation of currency input. /// - public partial class CurrencyTextBox : UserControl + public partial class CurrencyTextBox : ControlV5Base { protected void Page_Load (object sender, EventArgs e) { @@ -19,8 +19,12 @@ namespace Swarmops.Frontend.Controls.Financial { this.Layout = LayoutDirection.Vertical; } + + this.DefaultCurrency = this.CurrentAuthority.Organization.Currency; } + public Logic.Financial.Currency DefaultCurrency { get; set; } + public Int64 Cents { get