From d63157b22bb8a7294080be29ca0fca8ecda96db9 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 05 Dec 2012 17:36:16 -0500
Subject: [PATCH] Checkbox to automatically set the new ssl certificate alias

---
 src/com/gitblit/authority/NewSSLCertificateDialog.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/com/gitblit/authority/NewSSLCertificateDialog.java b/src/com/gitblit/authority/NewSSLCertificateDialog.java
index 1ff542a..821e9e9 100644
--- a/src/com/gitblit/authority/NewSSLCertificateDialog.java
+++ b/src/com/gitblit/authority/NewSSLCertificateDialog.java
@@ -24,6 +24,7 @@
 import java.util.Date;
 
 import javax.swing.JButton;
+import javax.swing.JCheckBox;
 import javax.swing.JDialog;
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
@@ -41,6 +42,7 @@
 	
 	JDateChooser expirationDate;
 	JTextField hostname;
+	JCheckBox serveCertificate;
 	boolean isCanceled = true;
 
 	public NewSSLCertificateDialog(Frame owner, Date defaultExpiration) {
@@ -60,6 +62,7 @@
 		
 		expirationDate = new JDateChooser(defaultExpiration);
 		hostname = new JTextField(20);
+		serveCertificate = new JCheckBox(Translation.get("gb.serveCertificate"), true);
 		
 		JPanel panel = new JPanel(new GridLayout(0, 2, Utils.MARGIN, Utils.MARGIN));
 		
@@ -68,6 +71,9 @@
 
 		panel.add(new JLabel(Translation.get("gb.expires")));
 		panel.add(expirationDate);
+		
+		panel.add(new JLabel(""));
+		panel.add(serveCertificate);
 		
 		JButton ok = new JButton(Translation.get("gb.ok"));
 		ok.addActionListener(new ActionListener() {
@@ -123,7 +129,11 @@
 	public Date getExpiration() {
 		return expirationDate.getDate();
 	}
-	
+
+	public boolean isServeCertificate() {
+		return serveCertificate.isSelected();
+	}
+
 	public boolean isCanceled() {
 		return isCanceled;
 	}

--
Gitblit v1.9.1