1#line 2 "src/Gui/AccountEditor.cpp"
4#include <Wt/WTextArea.h>
5#include <Wt/WVBoxLayout.h>
6#include <Wt/WFitLayout.h>
7#include <Wt/WGridLayout.h>
8#include <Wt/WPushButton.h>
9#include <Wt/WComboBox.h>
10#include <Wt/WCheckBox.h>
37 if( def.backendName == _initialValue )
65 addItem(
TR(
"gcw.AccountEditor.usecommodity" ) );
81Tab1(
const std::string & _accountGuid )
82: m_accountGuid( _accountGuid )
90 auto lw =
setLayout( std::make_unique< Wt::WVBoxLayout >() );
91 auto t1 =
lw->
addWidget( std::make_unique< Wt::WTemplate >(
TR(
"gcw_gui.accounteditor.form.tab1" ) ) );
93 t1-> bindString(
"name-label" ,
TR(
"gcw.AccountEditor.name" ) );
94 t1-> bindString(
"code-label" ,
TR(
"gcw.AccountEditor.code" ) );
95 t1-> bindString(
"desc-label" ,
TR(
"gcw.AccountEditor.desc" ) );
96 t1-> bindString(
"parent-label" ,
TR(
"gcw.AccountEditor.parent" ) );
97 t1-> bindString(
"accountType-label" ,
TR(
"gcw.AccountEditor.accountType" ) );
98 t1-> bindString(
"security-label" ,
TR(
"gcw.AccountEditor.security" ) );
99 t1-> bindString(
"fraction-label" ,
TR(
"gcw.AccountEditor.fraction" ) );
100 t1-> bindString(
"color-label" ,
TR(
"gcw.AccountEditor.color" ) );
101 t1-> bindString(
"notes-label" ,
TR(
"gcw.AccountEditor.notes" ) );
130 auto lw =
setLayout( std::make_unique< Wt::WFitLayout >() );
131 auto t2 =
lw->
addWidget( std::make_unique< Wt::WTemplate >(
TR(
"gcw_gui.accounteditor.form.tab2" ) ) );
148 auto lw =
setLayout( std::make_unique< Wt::WVBoxLayout >() );
150 lw->
addWidget( std::make_unique< Wt::WText >(
TR(
"gcw.AccountEditor.editaccount").arg(
accountItem-> fullName() ) ) )->
165 auto model = std::make_shared< Wt::WFormModel >();
168 auto footer =
lw->
addWidget( std::make_unique< Wt::WTemplate >(
TR(
"gcw_gui.accounteditor.form.footer" ) ) );
186 wApp-> doJavaScript(
"window.open( '/dox/html/AccountEditor.html', '_blank' )" );
202 std::cout << __FILE__ <<
":" << __LINE__ <<
" " << std::endl;
208:
Wt::WDialog(
"Edit Account" )
215 contents()-> addNew< GCW::Gui::AccountEditor >( _accountGuid );
AccountTypeCombo(const std::string &_initialValue)
AccountEditorDialog(const std::string &_accountGuid)
std::string m_accountGuid
Tab1(const std::string &_accountGuid)
Tab2(const std::string &_accountGuid)
std::string m_accountGuid
Wt::WTabWidget * m_tabWidget
Wt::WTabWidget * tabWidget()
AccountEditor(const std::string &_accountGuid)
void setCurrentIndex(int index)
void addItem(const WString &text)
void setResizable(bool resizable)
virtual void setMinimumSize(const WLength &width, const WLength &height) override
WContainerWidget * contents() const
void rejectWhenEscapePressed(bool enable=true)
void setClosable(bool closable)
static WString tr(const char *key)
std::string toUTF8() const
const Wt::WFormModel::Field name
auto load(const std::string &_guid) -> Item::Ptr
Load Account by GUID.
const std::vector< AccountDef_t > s_accountDefs