Update edit and submit routines for transactions.

This commit is contained in:
James Cole
2018-02-24 14:31:20 +01:00
parent ac66e89edb
commit 211caa07dc
7 changed files with 440 additions and 66 deletions

View File

@@ -24,6 +24,7 @@ var countConversions = 0;
$(document).ready(function () {
"use strict";
console.log('in common.js document.ready');
setCommonAutocomplete();
runModernizer();
});
@@ -45,6 +46,7 @@ function runModernizer() {
* Auto complete things in both edit and create routines:
*/
function setCommonAutocomplete() {
console.log('In setCommonAutoComplete()');
$.getJSON('json/tags').done(function (data) {
var opt = {
typeahead: {
@@ -82,12 +84,13 @@ function setCommonAutocomplete() {
/**
* When the user changes the currency in the amount drop down, it may jump from being
* the native currency to a foreign currency. This triggers the display of several
* the native currency to a foreign currency. Thi s triggers the display of several
* information things that make sure that the user always supplies the amount in the native currency.
*
* @returns {boolean}
*/
function selectsForeignCurrency() {
console.log('In selectsForeignCurrency()');
var foreignCurrencyId = parseInt($('input[name="amount_currency_id_amount"]').val());
var selectedAccountId = getAccountId();
var nativeCurrencyId = parseInt(accountInfo[selectedAccountId].preferredCurrency);