import java.awt.Dimension;\r
import java.awt.EventQueue;\r
import java.awt.FlowLayout;\r
+import java.awt.GridLayout;\r
import java.awt.Insets;\r
import java.awt.Point;\r
import java.awt.event.ActionEvent;\r
import javax.swing.JTable;\r
import javax.swing.JTextArea;\r
import javax.swing.JTextField;\r
+import javax.swing.JToolBar;\r
import javax.swing.RowFilter;\r
import javax.swing.SwingConstants;\r
import javax.swing.UIManager;\r
}\r
};\r
\r
- JTextField durationTF = new JTextField(4);\r
- durationTF.setInputVerifier(verifier);\r
- durationTF.setVerifyInputWhenFocusTarget(true);\r
- durationTF.setText("" + certificateConfig.duration);\r
- JPanel durationPanel = Utils.newFieldPanel(Translation.get("gb.duration"), durationTF, Translation.get("gb.duration.days").replace("{0}", "").trim());\r
+ JTextField siteNameTF = new JTextField(20);\r
+ siteNameTF.setText(gitblitSettings.getString(Keys.web.siteName, "Gitblit"));\r
+ JPanel siteNamePanel = Utils.newFieldPanel(Translation.get("gb.siteName"),\r
+ siteNameTF, Translation.get("gb.siteNameDescription"));\r
+\r
+ JTextField validityTF = new JTextField(4);\r
+ validityTF.setInputVerifier(verifier);\r
+ validityTF.setVerifyInputWhenFocusTarget(true);\r
+ validityTF.setText("" + certificateConfig.duration);\r
+ JPanel validityPanel = Utils.newFieldPanel(Translation.get("gb.validity"),\r
+ validityTF, Translation.get("gb.duration.days").replace("{0}", "").trim());\r
+ \r
+ JPanel p1 = new JPanel(new GridLayout(0, 1, 5, 2));\r
+ p1.add(siteNamePanel);\r
+ p1.add(validityPanel);\r
+ \r
DefaultOidsPanel oids = new DefaultOidsPanel(metadata);\r
\r
JPanel panel = new JPanel(new BorderLayout());\r
- panel.add(durationPanel, BorderLayout.NORTH);\r
+ panel.add(p1, BorderLayout.NORTH);\r
panel.add(oids, BorderLayout.CENTER);\r
\r
int result = JOptionPane.showConfirmDialog(GitblitAuthority.this, \r
if (result == JOptionPane.OK_OPTION) {\r
try {\r
oids.update(metadata);\r
- certificateConfig.duration = Integer.parseInt(durationTF.getText());\r
+ certificateConfig.duration = Integer.parseInt(validityTF.getText());\r
certificateConfig.store(config, metadata);\r
config.save();\r
+ \r
+ Map<String, String> updates = new HashMap<String, String>();\r
+ updates.put(Keys.web.siteName, siteNameTF.getText());\r
+ gitblitSettings.saveSettings(updates);\r
} catch (Exception e1) {\r
Utils.showException(GitblitAuthority.this, e1);\r
}\r
}\r
});\r
\r
- JPanel buttonControls = new JPanel(new FlowLayout(FlowLayout.LEFT, Utils.MARGIN, Utils.MARGIN));\r
+ JToolBar buttonControls = new JToolBar(JToolBar.HORIZONTAL);\r
+ buttonControls.setFloatable(false);\r
buttonControls.add(certificateDefaultsButton);\r
buttonControls.add(newSSLCertificate);\r
buttonControls.add(emailBundle);\r