Commit f11f3de4 authored by Kevin Whitaker's avatar Kevin Whitaker

Support enter key in some text boxes as button click that matches.

parent f75419cf
......@@ -41,6 +41,7 @@ LoginInterface::LoginInterface(WebInterface* app)
usernameField = new Wt::WLineEdit();
passwordField = new Wt::WLineEdit();
passwordField->setEchoMode(Wt::WLineEdit::EchoMode::Password);
passwordField->enterPressed().connect(this, &LoginInterface::loginCheck);
usernameArea->addWidget(new Wt::WText("Username:"));
usernameArea->addWidget(usernameField);
passwordArea->addWidget(new Wt::WText("Password:"));
......
......@@ -43,6 +43,7 @@ RequestInterface::RequestInterface(WebInterface* app)
searchBtn->setTextFormat(Wt::XHTMLText);
searchBtn->decorationStyle().font().setFamily(Wt::WFont::Default,"FontAwesome");
searchBtn->setText("");
searchBox->enterPressed().connect(this, &RequestInterface::searchClicked);
searchLayout->addWidget(searchBox);
searchLayout->addWidget(searchBtn);
searchBtn->clicked().connect(this, &RequestInterface::searchClicked);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment