summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/NewProviderDialog.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/se/leap/leapclient/NewProviderDialog.java')
-rw-r--r--src/se/leap/leapclient/NewProviderDialog.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/se/leap/leapclient/NewProviderDialog.java b/src/se/leap/leapclient/NewProviderDialog.java
index 88e4711c..61018463 100644
--- a/src/se/leap/leapclient/NewProviderDialog.java
+++ b/src/se/leap/leapclient/NewProviderDialog.java
@@ -8,13 +8,14 @@ import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
+import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Toast;
public class NewProviderDialog extends DialogFragment {
public interface NewProviderDialogInterface {
- public void saveProvider(String url_provider);
+ public void saveProvider(String url_provider, boolean danger_on);
}
NewProviderDialogInterface interface_with_ConfigurationWizard;
@@ -43,13 +44,16 @@ public class NewProviderDialog extends DialogFragment {
LayoutInflater inflater = getActivity().getLayoutInflater();
View new_provider_dialog_view = inflater.inflate(R.layout.new_provider_dialog, null);
final EditText url_input_field = (EditText)new_provider_dialog_view.findViewById(R.id.new_provider_url);
+ final CheckBox danger_checkbox = (CheckBox)new_provider_dialog_view.findViewById(R.id.danger_checkbox);
+
builder.setView(new_provider_dialog_view)
.setMessage(R.string.introduce_new_provider)
.setPositiveButton(R.string.save, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
String entered_url = url_input_field.getText().toString().trim();
+ boolean danger_on = danger_checkbox.isChecked();
if(validURL(entered_url)) {
- interface_with_ConfigurationWizard.saveProvider(entered_url);
+ interface_with_ConfigurationWizard.saveProvider(entered_url, danger_on);
Toast.makeText(getActivity().getApplicationContext(), "It seems your URL is well formed", Toast.LENGTH_LONG).show();
} else {
url_input_field.setText("");