diff --git a/EAPMethods/locale/EAPMethods.pot b/EAPMethods/locale/EAPMethods.pot index bf18952..8c71416 100644 --- a/EAPMethods/locale/EAPMethods.pot +++ b/EAPMethods/locale/EAPMethods.pot @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: EAPMethods\n" -"POT-Creation-Date: 2016-08-31 16:49+0200\n" +"POT-Creation-Date: 2016-08-31 17:41+0200\n" "PO-Revision-Date: 2016-06-02 12:27+0200\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" @@ -170,18 +170,38 @@ msgid "Your helpdesk phone number" msgstr "" #: lib/EAPBase_UI/res/wxEAP_UI.cpp:524 -msgid "Configuration Lock" +msgid "Provider Unique Identifier" msgstr "" #: lib/EAPBase_UI/res/wxEAP_UI.cpp:535 -msgid "Your configuration can be locked to prevent accidental modification by end-users. Users will only be allowed to enter credentials." +msgid "Assign your organization a unique ID to allow sharing the same credential set across different network profiles." msgstr "" #: lib/EAPBase_UI/res/wxEAP_UI.cpp:542 +msgid "Provider unique &identifier:" +msgstr "" + +#: lib/EAPBase_UI/res/wxEAP_UI.cpp:547 +msgid "Your organization ID to assign same credentials from other profiles" +msgstr "" + +#: lib/EAPBase_UI/res/wxEAP_UI.cpp:551 +msgid "(Examples: contoso.com, DOT-UK, etc.)" +msgstr "" + +#: lib/EAPBase_UI/res/wxEAP_UI.cpp:576 +msgid "Configuration Lock" +msgstr "" + +#: lib/EAPBase_UI/res/wxEAP_UI.cpp:587 +msgid "Your configuration can be locked to prevent accidental modification by end-users. Users will only be allowed to enter credentials." +msgstr "" + +#: lib/EAPBase_UI/res/wxEAP_UI.cpp:594 msgid "&Lock this configuration and prevent any further modification via user interface." msgstr "" -#: lib/EAPBase_UI/res/wxEAP_UI.cpp:545 +#: lib/EAPBase_UI/res/wxEAP_UI.cpp:597 msgid "(Warning: Once locked, you can not revert using this dialog!)" msgstr "" @@ -190,8 +210,8 @@ msgstr "" msgid "%s Credentials" msgstr "" -#: lib/EAPBase_UI/src/EAP_UI.cpp:123 lib/EAPBase_UI/include/EAP_UI.h:346 -#: lib/EAPBase_UI/include/EAP_UI.h:356 lib/EAPBase_UI/res/wxEAP_UI.h:118 +#: lib/EAPBase_UI/src/EAP_UI.cpp:123 lib/EAPBase_UI/include/EAP_UI.h:351 +#: lib/EAPBase_UI/include/EAP_UI.h:361 lib/EAPBase_UI/res/wxEAP_UI.h:118 msgid "EAP Credentials" msgstr "" @@ -409,14 +429,14 @@ msgstr "" msgid "Custom outer identity to use" msgstr "" -#: lib/TTLS_UI/src/Module.cpp:269 lib/TTLS_UI/src/Module.cpp:279 -#: lib/EAPBase_UI/include/EAP_UI.h:662 +#: lib/TTLS_UI/src/Module.cpp:272 lib/TTLS_UI/src/Module.cpp:282 +#: lib/EAPBase_UI/include/EAP_UI.h:690 #, c-format msgid "Error writing credentials to Credential Manager: %hs (error %u)" msgstr "" -#: lib/TTLS_UI/src/Module.cpp:271 lib/TTLS_UI/src/Module.cpp:281 -#: lib/EAPBase_UI/include/EAP_UI.h:665 +#: lib/TTLS_UI/src/Module.cpp:274 lib/TTLS_UI/src/Module.cpp:284 +#: lib/EAPBase_UI/include/EAP_UI.h:693 msgid "Writing credentials failed." msgstr "" @@ -436,42 +456,42 @@ msgstr "" msgid "Outer Authentication" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:283 +#: lib/EAPBase_UI/include/EAP_UI.h:288 #, c-format msgid "Are you sure you want to permanently remove %ls provider from configuration?" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:283 +#: lib/EAPBase_UI/include/EAP_UI.h:288 msgid "Warning" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:521 +#: lib/EAPBase_UI/include/EAP_UI.h:548 msgid "Provider Settings" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:678 +#: lib/EAPBase_UI/include/EAP_UI.h:706 #, c-format msgid "Deleting credentials failed (error %u)." msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:711 +#: lib/EAPBase_UI/include/EAP_UI.h:739 #, c-format msgid "" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:715 +#: lib/EAPBase_UI/include/EAP_UI.h:743 msgid "" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:726 lib/EAPBase_UI/include/EAP_UI.h:735 +#: lib/EAPBase_UI/include/EAP_UI.h:754 lib/EAPBase_UI/include/EAP_UI.h:763 msgid "" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:726 lib/EAPBase_UI/include/EAP_UI.h:735 +#: lib/EAPBase_UI/include/EAP_UI.h:754 lib/EAPBase_UI/include/EAP_UI.h:763 msgid "" msgstr "" -#: lib/EAPBase_UI/include/EAP_UI.h:940 +#: lib/EAPBase_UI/include/EAP_UI.h:968 msgid "" msgstr "" diff --git a/lib/EAPBase_UI/include/EAP_UI.h b/lib/EAPBase_UI/include/EAP_UI.h index 3d50afc..883ccf1 100644 --- a/lib/EAPBase_UI/include/EAP_UI.h +++ b/lib/EAPBase_UI/include/EAP_UI.h @@ -72,10 +72,15 @@ class wxEAPCredentialWarningPanel; /// class wxEAPConfigWindow; +/// +/// EAP provider contact info config panel +/// +class wxEAPProviderContactInfoPanel; + /// /// EAP provider identity config panel /// -class wxEAPProviderIdentityPanel; +class wxEAPProviderIDPanel; /// /// EAP provider configuration dialog @@ -463,16 +468,16 @@ protected: }; -class wxEAPProviderIdentityPanel : public wxEAPProviderIdentityPanelBase +class wxEAPProviderContactInfoPanel : public wxEAPProviderContactInfoPanelBase { public: /// - /// Constructs a provider identity pannel + /// Constructs a provider contact info pannel /// /// \param[inout] prov Provider configuration data /// \param[in] parent Parent window /// - wxEAPProviderIdentityPanel(eap::config_provider &prov, wxWindow* parent); + wxEAPProviderContactInfoPanel(eap::config_provider &prov, wxWindow* parent); friend class wxEAPConfigProvider; // Allows direct setting of keyboard focus @@ -483,7 +488,29 @@ protected: /// \endcond protected: - eap::config_provider &m_prov; ///< EAP method configuration + eap::config_provider &m_prov; ///< Provider configuration +}; + + +class wxEAPProviderIDPanel : public wxEAPProviderIDPanelBase +{ +public: + /// + /// Constructs a provider identity pannel + /// + /// \param[inout] prov Provider configuration data + /// \param[in] parent Parent window + /// + wxEAPProviderIDPanel(eap::config_provider &prov, wxWindow* parent); + +protected: + /// \cond internal + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + /// \endcond + +protected: + eap::config_provider &m_prov; ///< Provider configuration }; @@ -521,9 +548,10 @@ public: wxEAPConfigProvider(eap::config_provider &prov, wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &title = _("Provider Settings"), const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE); protected: - eap::config_provider &m_prov; ///< EAP method configuration - wxEAPProviderIdentityPanel *m_identity; ///< Provider identity panel - wxEAPProviderLockPanel *m_lock; ///< Provider lock panel + eap::config_provider &m_prov; ///< EAP method configuration + wxEAPProviderContactInfoPanel *m_contact; ///< Provider contact info panel + wxEAPProviderIDPanel *m_identity; ///< Provider identity panel + wxEAPProviderLockPanel *m_lock; ///< Provider lock panel }; @@ -847,7 +875,7 @@ public: bool layout = false; if (!m_prov.m_lbl_alt_credential.empty()) { m_credentials_label->SetLabel(m_prov.m_lbl_alt_credential); - m_credentials_label->Wrap( 446 ); + m_credentials_label->Wrap( 445 ); layout = true; } diff --git a/lib/EAPBase_UI/res/wxEAP_UI.cpp b/lib/EAPBase_UI/res/wxEAP_UI.cpp index eaf9f0f..1efe615 100644 --- a/lib/EAPBase_UI/res/wxEAP_UI.cpp +++ b/lib/EAPBase_UI/res/wxEAP_UI.cpp @@ -239,7 +239,7 @@ wxEAPCredentialsConfigPanelBase::wxEAPCredentialsConfigPanelBase( wxWindow* pare sb_credentials_vert = new wxBoxSizer( wxVERTICAL ); m_credentials_label = new wxStaticText( sb_credentials->GetStaticBox(), wxID_ANY, _("Manage credentials used to connect."), wxDefaultPosition, wxDefaultSize, 0 ); - m_credentials_label->Wrap( 446 ); + m_credentials_label->Wrap( 445 ); sb_credentials_vert->Add( m_credentials_label, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* sb_cred_radio; @@ -364,7 +364,7 @@ wxEAPCredentialsPassPanelBase::wxEAPCredentialsPassPanelBase( wxWindow* parent, sb_credentials_vert = new wxBoxSizer( wxVERTICAL ); m_credentials_label = new wxStaticText( sb_credentials->GetStaticBox(), wxID_ANY, _("Please provide your user ID and password."), wxDefaultPosition, wxDefaultSize, 0 ); - m_credentials_label->Wrap( 446 ); + m_credentials_label->Wrap( 445 ); sb_credentials_vert->Add( m_credentials_label, 0, wxALL|wxEXPAND, 5 ); wxFlexGridSizer* sb_credentials_tbl; @@ -414,10 +414,114 @@ wxEAPCredentialsPassPanelBase::~wxEAPCredentialsPassPanelBase() { } -wxEAPProviderIdentityPanelBase::wxEAPProviderIdentityPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +wxEAPProviderContactInfoPanelBase::wxEAPProviderContactInfoPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxStaticBoxSizer* sb_provider_contact; + sb_provider_contact = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Your Organization") ), wxVERTICAL ); + + wxBoxSizer* sb_provider_contact_horiz; + sb_provider_contact_horiz = new wxBoxSizer( wxHORIZONTAL ); + + m_provider_contact_icon = new wxStaticBitmap( sb_provider_contact->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + sb_provider_contact_horiz->Add( m_provider_contact_icon, 0, wxALL, 5 ); + + wxBoxSizer* sb_provider_contact_vert; + sb_provider_contact_vert = new wxBoxSizer( wxVERTICAL ); + + m_provider_contact_label = new wxStaticText( sb_provider_contact->GetStaticBox(), wxID_ANY, _("Describe your organization to customize user prompts. When organization is introduced, end-users find program messages easier to understand and act."), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_contact_label->Wrap( 445 ); + sb_provider_contact_vert->Add( m_provider_contact_label, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* sb_provider_name; + sb_provider_name = new wxBoxSizer( wxVERTICAL ); + + m_provider_name_label = new wxStaticText( sb_provider_contact->GetStaticBox(), wxID_ANY, _("Your organization &name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_name_label->Wrap( -1 ); + sb_provider_name->Add( m_provider_name_label, 0, wxBOTTOM, 5 ); + + m_provider_name = new wxTextCtrl( sb_provider_contact->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_name->SetToolTip( _("Your organization name as it will appear on helpdesk contact notifications") ); + + sb_provider_name->Add( m_provider_name, 0, wxEXPAND|wxBOTTOM, 5 ); + + m_provider_name_note = new wxStaticText( sb_provider_contact->GetStaticBox(), wxID_ANY, _("(Keep it short, please)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_name_note->Wrap( -1 ); + sb_provider_name->Add( m_provider_name_note, 0, wxALIGN_RIGHT, 5 ); + + + sb_provider_contact_vert->Add( sb_provider_name, 0, wxEXPAND|wxALL, 5 ); + + wxBoxSizer* sb_provider_helpdesk; + sb_provider_helpdesk = new wxBoxSizer( wxVERTICAL ); + + m_provider_helpdesk_label = new wxStaticText( sb_provider_contact->GetStaticBox(), wxID_ANY, _("Helpdesk contact &information:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_helpdesk_label->Wrap( -1 ); + sb_provider_helpdesk->Add( m_provider_helpdesk_label, 0, wxBOTTOM, 5 ); + + wxFlexGridSizer* sb_provider_helpdesk_inner; + sb_provider_helpdesk_inner = new wxFlexGridSizer( 0, 2, 0, 0 ); + sb_provider_helpdesk_inner->AddGrowableCol( 1 ); + sb_provider_helpdesk_inner->SetFlexibleDirection( wxBOTH ); + sb_provider_helpdesk_inner->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_provider_web_icon = new wxStaticText( sb_provider_contact->GetStaticBox(), wxID_ANY, _("¶"), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_web_icon->Wrap( -1 ); + m_provider_web_icon->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Wingdings") ) ); + + sb_provider_helpdesk_inner->Add( m_provider_web_icon, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); + + m_provider_web = new wxTextCtrl( sb_provider_contact->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_web->SetToolTip( _("Your helpdesk website address") ); + + sb_provider_helpdesk_inner->Add( m_provider_web, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); + + m_provider_email_icon = new wxStaticText( sb_provider_contact->GetStaticBox(), wxID_ANY, _("*"), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_email_icon->Wrap( -1 ); + m_provider_email_icon->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Wingdings") ) ); + + sb_provider_helpdesk_inner->Add( m_provider_email_icon, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); + + m_provider_email = new wxTextCtrl( sb_provider_contact->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_email->SetToolTip( _("Your helpdesk e-mail address") ); + + sb_provider_helpdesk_inner->Add( m_provider_email, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); + + m_provider_phone_icon = new wxStaticText( sb_provider_contact->GetStaticBox(), wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_phone_icon->Wrap( -1 ); + m_provider_phone_icon->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Wingdings") ) ); + + sb_provider_helpdesk_inner->Add( m_provider_phone_icon, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_provider_phone = new wxTextCtrl( sb_provider_contact->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_phone->SetToolTip( _("Your helpdesk phone number") ); + + sb_provider_helpdesk_inner->Add( m_provider_phone, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + + sb_provider_helpdesk->Add( sb_provider_helpdesk_inner, 0, wxEXPAND, 5 ); + + + sb_provider_contact_vert->Add( sb_provider_helpdesk, 0, wxEXPAND|wxALL, 5 ); + + + sb_provider_contact_horiz->Add( sb_provider_contact_vert, 1, wxEXPAND, 5 ); + + + sb_provider_contact->Add( sb_provider_contact_horiz, 1, wxEXPAND, 5 ); + + + this->SetSizer( sb_provider_contact ); + this->Layout(); +} + +wxEAPProviderContactInfoPanelBase::~wxEAPProviderContactInfoPanelBase() +{ +} + +wxEAPProviderIDPanelBase::wxEAPProviderIDPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { wxStaticBoxSizer* sb_provider_id; - sb_provider_id = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Your Organization") ), wxVERTICAL ); + sb_provider_id = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Provider Unique Identifier") ), wxVERTICAL ); wxBoxSizer* sb_provider_id_horiz; sb_provider_id_horiz = new wxBoxSizer( wxHORIZONTAL ); @@ -428,80 +532,28 @@ wxEAPProviderIdentityPanelBase::wxEAPProviderIdentityPanelBase( wxWindow* parent wxBoxSizer* sb_provider_id_vert; sb_provider_id_vert = new wxBoxSizer( wxVERTICAL ); - m_provider_id_label = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _("Describe your organization to customize user prompts. When organization is introduced, end-users find program messages easier to understand and act."), wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_id_label->Wrap( 446 ); - sb_provider_id_vert->Add( m_provider_id_label, 0, wxALL|wxEXPAND, 5 ); + m_provider_id_label_outer = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _("Assign your organization a unique ID to allow sharing the same credential set across different network profiles."), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_id_label_outer->Wrap( 445 ); + sb_provider_id_vert->Add( m_provider_id_label_outer, 0, wxALL|wxEXPAND, 5 ); - wxBoxSizer* sb_provider_name; - sb_provider_name = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* sb_provider_id_inner; + sb_provider_id_inner = new wxBoxSizer( wxVERTICAL ); - m_provider_name_label = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _("Your organization &name:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_name_label->Wrap( -1 ); - sb_provider_name->Add( m_provider_name_label, 0, wxBOTTOM, 5 ); + m_provider_id_label = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _("Provider unique &identifier:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_id_label->Wrap( -1 ); + sb_provider_id_inner->Add( m_provider_id_label, 0, wxBOTTOM, 5 ); - m_provider_name = new wxTextCtrl( sb_provider_id->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_name->SetToolTip( _("Your organization name as it will appear on helpdesk contact notifications") ); + m_provider_id = new wxTextCtrl( sb_provider_id->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_id->SetToolTip( _("Your organization ID to assign same credentials from other profiles") ); - sb_provider_name->Add( m_provider_name, 0, wxEXPAND|wxBOTTOM, 5 ); + sb_provider_id_inner->Add( m_provider_id, 0, wxEXPAND|wxBOTTOM, 5 ); - m_provider_name_note = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _("(Keep it short, please)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_name_note->Wrap( -1 ); - sb_provider_name->Add( m_provider_name_note, 0, wxALIGN_RIGHT, 5 ); + m_provider_id_note = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _("(Examples: contoso.com, DOT-UK, etc.)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_provider_id_note->Wrap( -1 ); + sb_provider_id_inner->Add( m_provider_id_note, 0, wxALIGN_RIGHT, 5 ); - sb_provider_id_vert->Add( sb_provider_name, 0, wxEXPAND|wxALL, 5 ); - - wxBoxSizer* sb_provider_helpdesk; - sb_provider_helpdesk = new wxBoxSizer( wxVERTICAL ); - - m_provider_helpdesk_label = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _("Helpdesk contact &information:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_helpdesk_label->Wrap( -1 ); - sb_provider_helpdesk->Add( m_provider_helpdesk_label, 0, wxBOTTOM, 5 ); - - wxFlexGridSizer* sb_provider_helpdesk_inner; - sb_provider_helpdesk_inner = new wxFlexGridSizer( 0, 2, 0, 0 ); - sb_provider_helpdesk_inner->AddGrowableCol( 1 ); - sb_provider_helpdesk_inner->SetFlexibleDirection( wxBOTH ); - sb_provider_helpdesk_inner->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_provider_web_icon = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _("¶"), wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_web_icon->Wrap( -1 ); - m_provider_web_icon->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Wingdings") ) ); - - sb_provider_helpdesk_inner->Add( m_provider_web_icon, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); - - m_provider_web = new wxTextCtrl( sb_provider_id->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_web->SetToolTip( _("Your helpdesk website address") ); - - sb_provider_helpdesk_inner->Add( m_provider_web, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - - m_provider_email_icon = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _("*"), wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_email_icon->Wrap( -1 ); - m_provider_email_icon->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Wingdings") ) ); - - sb_provider_helpdesk_inner->Add( m_provider_email_icon, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); - - m_provider_email = new wxTextCtrl( sb_provider_id->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_email->SetToolTip( _("Your helpdesk e-mail address") ); - - sb_provider_helpdesk_inner->Add( m_provider_email, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - - m_provider_phone_icon = new wxStaticText( sb_provider_id->GetStaticBox(), wxID_ANY, _(")"), wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_phone_icon->Wrap( -1 ); - m_provider_phone_icon->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxT("Wingdings") ) ); - - sb_provider_helpdesk_inner->Add( m_provider_phone_icon, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_provider_phone = new wxTextCtrl( sb_provider_id->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_phone->SetToolTip( _("Your helpdesk phone number") ); - - sb_provider_helpdesk_inner->Add( m_provider_phone, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - - sb_provider_helpdesk->Add( sb_provider_helpdesk_inner, 1, wxEXPAND, 5 ); - - - sb_provider_id_vert->Add( sb_provider_helpdesk, 1, wxEXPAND, 5 ); + sb_provider_id_vert->Add( sb_provider_id_inner, 0, wxEXPAND|wxALL, 5 ); sb_provider_id_horiz->Add( sb_provider_id_vert, 1, wxEXPAND, 5 ); @@ -514,7 +566,7 @@ wxEAPProviderIdentityPanelBase::wxEAPProviderIdentityPanelBase( wxWindow* parent this->Layout(); } -wxEAPProviderIdentityPanelBase::~wxEAPProviderIdentityPanelBase() +wxEAPProviderIDPanelBase::~wxEAPProviderIDPanelBase() { } @@ -533,21 +585,21 @@ wxEAPProviderLockPanelBase::wxEAPProviderLockPanelBase( wxWindow* parent, wxWind sb_provider_lock_vert = new wxBoxSizer( wxVERTICAL ); m_provider_lock_label = new wxStaticText( sb_provider_lock->GetStaticBox(), wxID_ANY, _("Your configuration can be locked to prevent accidental modification by end-users. Users will only be allowed to enter credentials."), wxDefaultPosition, wxDefaultSize, 0 ); - m_provider_lock_label->Wrap( 446 ); + m_provider_lock_label->Wrap( 445 ); sb_provider_lock_vert->Add( m_provider_lock_label, 0, wxALL|wxEXPAND, 5 ); - wxBoxSizer* sb_provider_name; - sb_provider_name = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* sb_provider_lock_inner; + sb_provider_lock_inner = new wxBoxSizer( wxVERTICAL ); m_provider_lock = new wxCheckBox( sb_provider_lock->GetStaticBox(), wxID_ANY, _("&Lock this configuration and prevent any further modification via user interface."), wxDefaultPosition, wxDefaultSize, 0 ); - sb_provider_name->Add( m_provider_lock, 0, wxEXPAND|wxBOTTOM, 5 ); + sb_provider_lock_inner->Add( m_provider_lock, 0, wxEXPAND|wxBOTTOM, 5 ); m_provider_lock_note = new wxStaticText( sb_provider_lock->GetStaticBox(), wxID_ANY, _("(Warning: Once locked, you can not revert using this dialog!)"), wxDefaultPosition, wxDefaultSize, 0 ); m_provider_lock_note->Wrap( -1 ); - sb_provider_name->Add( m_provider_lock_note, 0, wxALIGN_RIGHT, 5 ); + sb_provider_lock_inner->Add( m_provider_lock_note, 0, wxALIGN_RIGHT, 5 ); - sb_provider_lock_vert->Add( sb_provider_name, 0, wxEXPAND|wxALL, 5 ); + sb_provider_lock_vert->Add( sb_provider_lock_inner, 0, wxEXPAND|wxALL, 5 ); sb_provider_lock_horiz->Add( sb_provider_lock_vert, 1, wxEXPAND, 5 ); diff --git a/lib/EAPBase_UI/res/wxEAP_UI.fbp b/lib/EAPBase_UI/res/wxEAP_UI.fbp index c3215e6..bd4b4ba 100644 --- a/lib/EAPBase_UI/res/wxEAP_UI.fbp +++ b/lib/EAPBase_UI/res/wxEAP_UI.fbp @@ -1623,7 +1623,7 @@ - 446 + 445 @@ -2579,7 +2579,7 @@ - 446 + 445 @@ -3079,7 +3079,7 @@ wxID_ANY - wxEAPProviderIdentityPanelBase + wxEAPProviderContactInfoPanelBase 500,-1 @@ -3121,7 +3121,7 @@ wxID_ANY Your Organization - sb_provider_id + sb_provider_contact wxVERTICAL none @@ -3131,7 +3131,7 @@ 1 - sb_provider_id_horiz + sb_provider_contact_horiz wxHORIZONTAL none @@ -3174,7 +3174,7 @@ 0 1 - m_provider_id_icon + m_provider_contact_icon 1 @@ -3221,7 +3221,7 @@ 1 - sb_provider_id_vert + sb_provider_contact_vert wxVERTICAL none @@ -3264,7 +3264,7 @@ 0 1 - m_provider_id_label + m_provider_contact_label 1 @@ -3281,7 +3281,7 @@ - 446 + 445 @@ -3577,8 +3577,8 @@ 5 - wxEXPAND - 1 + wxEXPAND|wxALL + 0 sb_provider_helpdesk @@ -3670,7 +3670,7 @@ 5 wxEXPAND - 1 + 0 2 wxBOTH @@ -4215,6 +4215,522 @@ + + 0 + wxAUI_MGR_DEFAULT + + + 1 + 1 + impl_virtual + + + 0 + wxID_ANY + + + wxEAPProviderIDPanelBase + + 500,-1 + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wxID_ANY + Provider Unique Identifier + + sb_provider_id + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + + sb_provider_id_horiz + wxHORIZONTAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Icon Resource; ; [32; 32] + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_provider_id_icon + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + sb_provider_id_vert + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Assign your organization a unique ID to allow sharing the same credential set across different network profiles. + + 0 + + + 0 + + 1 + m_provider_id_label_outer + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + 445 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + + sb_provider_id_inner + wxVERTICAL + none + + 5 + wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Provider unique &identifier: + + 0 + + + 0 + + 1 + m_provider_id_label + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_provider_id + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Your organization ID to assign same credentials from other profiles + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + (Examples: contoso.com, DOT-UK, etc.) + + 0 + + + 0 + + 1 + m_provider_id_note + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 wxAUI_MGR_DEFAULT @@ -4431,7 +4947,7 @@ - 446 + 445 @@ -4463,7 +4979,7 @@ 0 - sb_provider_name + sb_provider_lock_inner wxVERTICAL none diff --git a/lib/EAPBase_UI/res/wxEAP_UI.h b/lib/EAPBase_UI/res/wxEAP_UI.h index d98143a..cafa5f3 100644 --- a/lib/EAPBase_UI/res/wxEAP_UI.h +++ b/lib/EAPBase_UI/res/wxEAP_UI.h @@ -214,15 +214,15 @@ class wxEAPCredentialsPassPanelBase : public wxEAPCredentialsPanelBase }; /////////////////////////////////////////////////////////////////////////////// -/// Class wxEAPProviderIdentityPanelBase +/// Class wxEAPProviderContactInfoPanelBase /////////////////////////////////////////////////////////////////////////////// -class wxEAPProviderIdentityPanelBase : public wxPanel +class wxEAPProviderContactInfoPanelBase : public wxPanel { private: protected: - wxStaticBitmap* m_provider_id_icon; - wxStaticText* m_provider_id_label; + wxStaticBitmap* m_provider_contact_icon; + wxStaticText* m_provider_contact_label; wxStaticText* m_provider_name_label; wxTextCtrl* m_provider_name; wxStaticText* m_provider_name_note; @@ -236,8 +236,29 @@ class wxEAPProviderIdentityPanelBase : public wxPanel public: - wxEAPProviderIdentityPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL ); - ~wxEAPProviderIdentityPanelBase(); + wxEAPProviderContactInfoPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL ); + ~wxEAPProviderContactInfoPanelBase(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class wxEAPProviderIDPanelBase +/////////////////////////////////////////////////////////////////////////////// +class wxEAPProviderIDPanelBase : public wxPanel +{ + private: + + protected: + wxStaticBitmap* m_provider_id_icon; + wxStaticText* m_provider_id_label_outer; + wxStaticText* m_provider_id_label; + wxTextCtrl* m_provider_id; + wxStaticText* m_provider_id_note; + + public: + + wxEAPProviderIDPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL ); + ~wxEAPProviderIDPanelBase(); }; diff --git a/lib/EAPBase_UI/src/EAP_UI.cpp b/lib/EAPBase_UI/src/EAP_UI.cpp index ed1ffba..5aecfb1 100644 --- a/lib/EAPBase_UI/src/EAP_UI.cpp +++ b/lib/EAPBase_UI/src/EAP_UI.cpp @@ -288,34 +288,34 @@ void wxEAPConfigWindow::OnInitDialog(wxInitDialogEvent& /*event*/) ////////////////////////////////////////////////////////////////////// -// wxEAPProviderIdentityPanel +// wxEAPProviderContactInfoPanel ////////////////////////////////////////////////////////////////////// -wxEAPProviderIdentityPanel::wxEAPProviderIdentityPanel(eap::config_provider &prov, wxWindow* parent) : +wxEAPProviderContactInfoPanel::wxEAPProviderContactInfoPanel(eap::config_provider &prov, wxWindow* parent) : m_prov(prov), - wxEAPProviderIdentityPanelBase(parent) + wxEAPProviderContactInfoPanelBase(parent) { // Load and set icon. winstd::library lib_shell32; if (lib_shell32.load(_T("shell32.dll"), NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE)) - m_provider_id_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(259))); + m_provider_contact_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(259))); } -bool wxEAPProviderIdentityPanel::TransferDataToWindow() +bool wxEAPProviderContactInfoPanel::TransferDataToWindow() { m_provider_name ->SetValue(m_prov.m_name ); m_provider_web ->SetValue(m_prov.m_help_web ); m_provider_email->SetValue(m_prov.m_help_email); m_provider_phone->SetValue(m_prov.m_help_phone); - return wxEAPProviderIdentityPanelBase::TransferDataToWindow(); + return wxEAPProviderContactInfoPanelBase::TransferDataToWindow(); } -bool wxEAPProviderIdentityPanel::TransferDataFromWindow() +bool wxEAPProviderContactInfoPanel::TransferDataFromWindow() { - wxCHECK(wxEAPProviderIdentityPanelBase::TransferDataFromWindow(), false); + wxCHECK(wxEAPProviderContactInfoPanelBase::TransferDataFromWindow(), false); m_prov.m_name = m_provider_name ->GetValue(); m_prov.m_help_web = m_provider_web ->GetValue(); @@ -326,6 +326,39 @@ bool wxEAPProviderIdentityPanel::TransferDataFromWindow() } +////////////////////////////////////////////////////////////////////// +// wxEAPProviderIDPanel +////////////////////////////////////////////////////////////////////// + +wxEAPProviderIDPanel::wxEAPProviderIDPanel(eap::config_provider &prov, wxWindow* parent) : + m_prov(prov), + wxEAPProviderIDPanelBase(parent) +{ + // Load and set icon. + winstd::library lib_shell32; + if (lib_shell32.load(_T("shell32.dll"), NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE)) + m_provider_id_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(29))); +} + + +bool wxEAPProviderIDPanel::TransferDataToWindow() +{ + m_provider_id->SetValue(m_prov.m_id); + + return wxEAPProviderIDPanelBase::TransferDataToWindow(); +} + + +bool wxEAPProviderIDPanel::TransferDataFromWindow() +{ + wxCHECK(wxEAPProviderIDPanelBase::TransferDataFromWindow(), false); + + m_prov.m_id = m_provider_id->GetValue(); + + return true; +} + + ////////////////////////////////////////////////////////////////////// // wxEAPProviderLockPanel ////////////////////////////////////////////////////////////////////// @@ -370,13 +403,16 @@ wxEAPConfigProvider::wxEAPConfigProvider(eap::config_provider &prov, wxWindow *p // Set banner title. m_banner->m_title->SetLabel(title); - m_identity = new wxEAPProviderIdentityPanel(prov, this); + m_contact = new wxEAPProviderContactInfoPanel(prov, this); + AddContent(m_contact); + + m_identity = new wxEAPProviderIDPanel(prov, this); AddContent(m_identity); m_lock = new wxEAPProviderLockPanel(prov, this); AddContent(m_lock); - m_identity->m_provider_name->SetFocusFromKbd(); + m_contact->m_provider_name->SetFocusFromKbd(); } diff --git a/lib/TLS_UI/res/wxTLS_UI.cpp b/lib/TLS_UI/res/wxTLS_UI.cpp index 7f4f8c4..75b31dd 100644 --- a/lib/TLS_UI/res/wxTLS_UI.cpp +++ b/lib/TLS_UI/res/wxTLS_UI.cpp @@ -26,7 +26,7 @@ wxEAPTLSServerTrustConfigPanelBase::wxEAPTLSServerTrustConfigPanelBase( wxWindow sb_server_trust_vert = new wxBoxSizer( wxVERTICAL ); m_server_trust_label = new wxStaticText( sb_server_trust->GetStaticBox(), wxID_ANY, _("Describe the servers you trust to prevent credential interception in case of man-in-the-middle attacks."), wxDefaultPosition, wxDefaultSize, 0 ); - m_server_trust_label->Wrap( 446 ); + m_server_trust_label->Wrap( 445 ); sb_server_trust_vert->Add( m_server_trust_label, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* sb_root_ca; @@ -129,7 +129,7 @@ wxTLSCredentialsPanelBase::wxTLSCredentialsPanelBase( wxWindow* parent, wxWindow sb_credentials_vert = new wxBoxSizer( wxVERTICAL ); m_credentials_label = new wxStaticText( sb_credentials->GetStaticBox(), wxID_ANY, _("Please select your client certificate to use for authentication."), wxDefaultPosition, wxDefaultSize, 0 ); - m_credentials_label->Wrap( 446 ); + m_credentials_label->Wrap( 445 ); sb_credentials_vert->Add( m_credentials_label, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* sb_cert_radio; diff --git a/lib/TLS_UI/res/wxTLS_UI.fbp b/lib/TLS_UI/res/wxTLS_UI.fbp index 5ec5ab8..371d02d 100644 --- a/lib/TLS_UI/res/wxTLS_UI.fbp +++ b/lib/TLS_UI/res/wxTLS_UI.fbp @@ -242,7 +242,7 @@ - 446 + 445 @@ -1215,7 +1215,7 @@ - 446 + 445 diff --git a/lib/TTLS_UI/res/wxTTLS_UI.cpp b/lib/TTLS_UI/res/wxTTLS_UI.cpp index 236b3f3..eec016b 100644 --- a/lib/TTLS_UI/res/wxTTLS_UI.cpp +++ b/lib/TTLS_UI/res/wxTTLS_UI.cpp @@ -26,7 +26,7 @@ wxTTLSConfigPanelBase::wxTTLSConfigPanelBase( wxWindow* parent, wxWindowID id, c sb_outer_identity_vert = new wxBoxSizer( wxVERTICAL ); m_outer_identity_label = new wxStaticText( sb_outer_identity->GetStaticBox(), wxID_ANY, _("Select the user ID supplicant introduces itself as to authenticator:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_outer_identity_label->Wrap( 446 ); + m_outer_identity_label->Wrap( 445 ); sb_outer_identity_vert->Add( m_outer_identity_label, 0, wxALL|wxEXPAND, 5 ); wxBoxSizer* sb_outer_identity_radio; diff --git a/lib/TTLS_UI/res/wxTTLS_UI.fbp b/lib/TTLS_UI/res/wxTTLS_UI.fbp index 47b1e0f..87741c0 100644 --- a/lib/TTLS_UI/res/wxTTLS_UI.fbp +++ b/lib/TTLS_UI/res/wxTTLS_UI.fbp @@ -242,7 +242,7 @@ - 446 + 445