| | |
| | |
|
| | | /**
|
| | | * Dialog to create or edit a Gitblit registration.
|
| | | * |
| | | *
|
| | | * @author James Moger
|
| | | * |
| | | *
|
| | | */
|
| | | public class EditRegistrationDialog extends JDialog {
|
| | |
|
| | |
| | | KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
|
| | | JRootPane rootPane = new JRootPane();
|
| | | rootPane.registerKeyboardAction(new ActionListener() {
|
| | | @Override
|
| | | public void actionPerformed(ActionEvent actionEvent) {
|
| | | setVisible(false);
|
| | | }
|
| | |
| | |
|
| | | JButton cancel = new JButton(Translation.get("gb.cancel"));
|
| | | cancel.addActionListener(new ActionListener() {
|
| | | @Override
|
| | | public void actionPerformed(ActionEvent event) {
|
| | | setVisible(false);
|
| | | }
|
| | |
| | |
|
| | | final JButton save = new JButton(Translation.get(isLogin ? "gb.login" : "gb.save"));
|
| | | save.addActionListener(new ActionListener() {
|
| | | @Override
|
| | | public void actionPerformed(ActionEvent event) {
|
| | | if (validateFields()) {
|
| | | canceled = false;
|
| | |
| | |
|
| | | // on enter in password field, save or login
|
| | | passwordField.addActionListener(new ActionListener() {
|
| | | @Override
|
| | | public void actionPerformed(ActionEvent event) {
|
| | | save.doClick();
|
| | | }
|