<?xml version="1.0" encoding="utf-8"?>
<config>
    <!-- =============================================
	MAIN SETTINGS
	================================================== -->
	<fieldset name="main" label="COM_FAILEDLOGINATTEMPTS" addfieldpath="/plugins/system/web357framework/elements">

        <!-- ENABLE LOGS -->
        <field type="header" label="PLG_FLA_ENABLE_LOGS_HEADER" />
        <field name="enabled_for_backend" type="radio" class="btn-group btn-group-yesno" default="1" label="PLG_FLA_ENABLE_LOGS_FOR_BACKEND_LBL" description="PLG_FLA_ENABLE_LOGS_FOR_BACKEND_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        
        <field name="enabled_for_frontend" type="radio" class="btn-group btn-group-yesno" default="1" label="PLG_FLA_ENABLE_LOGS_FOR_FRONTEND_LBL" description="PLG_FLA_ENABLE_LOGS_FOR_FRONTEND_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        
        <field name="successful_login_attempts" type="radio" addfieldpath="/plugins/system/web357framework/elements" class="btn-group btn-group-yesno" default="1" label="PLG_FLA_SUCCESSFULL_LOGIN_ATTEMPTS_LBL" description="PLG_FLA_SUCCESSFULL_LOGIN_ATTEMPTS_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        
        <!-- EMAIL NOTIFICATIONS -->
        <field type="header" label="PLG_FLA_EMAIL_NOTIFICATIONS_HEADER" />
        <field name="notify_me_by_email" type="radio" class="btn-group btn-group-yesno" default="1" label="PLG_FLA_DIRECT_NOTIFICATIONS_LBL" description="PLG_FLA_DIRECT_NOTIFICATIONS_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        <field name="email_address" type="text" label="PLG_FLA_EMAIL_LBL" default="" description="PLG_FLA_EMAIL_DESC" size="30" validate="email" showon="notify_me_by_email:1" />

        <!-- Email Subjects (Front-end) -->
        <field type="header" class="w357_small_header" label="Email subjects (variables)" showon="notify_me_by_email:1" />
        <field name="noteEmailSubjects" type="note" description="PLG_FLA_EMAIL_SUBJECTS_NOTES" showon="notify_me_by_email:1"  />

        <!-- Email Subjects (Front-end) -->
        <field type="header" class="w357_small_header" label="Email subjects for the Front-end" showon="notify_me_by_email:1" />
        <field name="email_sbj_succesfully_login_attempt_frontend" type="profeature" label="PLG_FLA_EMAIL_SBJ_SUCCESFULLY_LOGIN_ATTEMPT_FRONTEND_LBL" default="Successful Login Attempt, at Front-end" description="" class="w357-large-input-text" showon="notify_me_by_email:1" />
        <field name="email_sbj_pass_not_allowed_frontend" type="profeature" label="PLG_FLA_EMAIL_SBJ_PASS_NOT_ALLOWED_FRONTEND_LBL" default="Failed Login Attempt, at Front-end | Empty password not allowed." description="" class="w357-large-input-text" showon="notify_me_by_email:1" />
        <field name="email_sbj_username_and_pass_do_not_match_frontend" type="profeature" label="PLG_FLA_EMAIL_SBJ_USERNAME_AND_PASS_DO_NOT_MATCH_FRONTEND_LBL" description="" class="w357-large-input-text" default="Failed Login Attempt, at Front-end | Username and password do not match or you do not have an account yet." showon="notify_me_by_email:1" />
        <field name="email_sbj_login_denied_account_blocked_frontend" type="profeature" label="PLG_FLA_EMAIL_SBJ_LOGIN_DENIED_ACCOUNT_BLOCKED_FRONTEND_LBL" default="Login denied, at Front-end! Your account has either been blocked or you have not activated it yet." description="" class="w357-large-input-text" showon="notify_me_by_email:1" />

        <!-- Email Subjects (Back-end) -->
        <field type="header" class="w357_small_header" label="Email subjects for the Back-end" showon="notify_me_by_email:1" />
        <field name="email_sbj_succesfully_login_attempt_backend" type="profeature" label="PLG_FLA_EMAIL_SBJ_SUCCESFULLY_LOGIN_ATTEMPT_BACKEND_LBL" default="Successful Login Attempt, at Back-end" description="" class="w357-large-input-text" showon="notify_me_by_email:1" />
        <field name="email_sbj_pass_not_allowed_backend" type="profeature" label="PLG_FLA_EMAIL_SBJ_PASS_NOT_ALLOWED_BACKEND_LBL" default="Failed Login Attempt, at Back-end | Empty password not allowed." description="" class="w357-large-input-text" showon="notify_me_by_email:1" />
        <field name="email_sbj_username_and_pass_do_not_match_backend" type="profeature" label="PLG_FLA_EMAIL_SBJ_USERNAME_AND_PASS_DO_NOT_MATCH_BACKEND_LBL" description="" class="w357-large-input-text" default="Failed Login Attempt, at Back-end | Username and password do not match or you do not have an account yet." showon="notify_me_by_email:1" />
        <field name="email_sbj_login_denied_account_blocked_backend" type="profeature" label="PLG_FLA_EMAIL_SBJ_LOGIN_DENIED_ACCOUNT_BLOCKED_BACKEND_LBL" default="Login denied, at Back-end! Your account has either been blocked or you have not activated it yet." description="" class="w357-large-input-text" showon="notify_me_by_email:1" />

        <!-- LOGS -->
        <field type="header" label="PLG_FLA_LOGS_HEADER" />
        <field name="save_logs_to_db" type="radio" class="btn-group btn-group-yesno" default="1" label="PLG_FLA_SAVE_LOGS_LBL" description="PLG_FLA_SAVE_LOGS_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        
        <!-- LOG DATA -->
        <field type="header" label="PLG_FLA_LOG_DATA_HEADER" />
        <field name="ip_address" type="radio" class="btn-group btn-group-yesno" default="1" label="PLG_FLA_IP_LBL" description="PLG_FLA_IP_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        <field name="name" type="radio" class="btn-group btn-group-yesno" default="1" label="PLG_FLA_NAME_LBL" description="PLG_FLA_NAME_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        <field name="username" type="radio" class="btn-group btn-group-yesno" default="1" label="PLG_FLA_USERNAME_LBL" description="PLG_FLA_USERNAME_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        <field name="password" type="profeature" class="btn-group btn-group-yesno" default="0" label="PLG_FLA_PASS_LBL" description="PLG_FLA_PASS_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        <field name="datetime" type="radio" class="btn-group btn-group-yesno" default="1" label="PLG_FLA_DATETIME_LBL" description="PLG_FLA_DATETIME_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        <field name="country" type="profeature" class="btn-group btn-group-yesno" default="0" label="PLG_FLA_COUNTRY_LBL" description="PLG_FLA_COUNTRY_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        <field name="browser" type="profeature" class="btn-group btn-group-yesno" default="0" label="PLG_FLA_BROWSER_LBL" description="PLG_FLA_BROWSER_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>
        <field name="operating_system" type="profeature" class="btn-group btn-group-yesno" default="0" label="PLG_FLA_OS_LBL" description="PLG_FLA_OS_DESC">
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>

        <!-- BLOCK IP ADDRESS -->
        <field type="header" label="PLG_FLA_BLOCK_IP_ADDRESS_HEADER" />
        <field
            name="enable_firewall"
            type="radio"
            class="btn-group btn-group-yesno"
            default="1"
            label="PLG_FAILEDLOGINATTEMPTS_ENABLE_FIREWALL_LBL"
            description="PLG_FAILEDLOGINATTEMPTS_ENABLE_FIREWALL_DESC"
        >
            <option value="1">JYes</option>
            <option value="0">JNo</option>
        </field>

        <field
            name="block_message"
            type="editor"
            label="PLG_FAILEDLOGINATTEMPTS_BLOCK_MESSAGE_LABEL"
            description="PLG_FAILEDLOGINATTEMPTS_BLOCK_MESSAGE_DESC"
            filter="safehtml"
            buttons="true"
            hide="readmore,pagebreak"
            default="Access Denied - Your IP Has Been Blocked. Your IP address has been blacklisted by the Failed Login Attempts extension due to multiple failed login attempts. If you believe this is a mistake, please contact the site administrator and request removal of your IP from the blocked list."
            rows="5"
            cols="30"
            class="input-xxlarge"
            showon="enable_firewall:1"
        />

        <field
            name="automatically_block_ip_after_failed_attempts_count"
            type="profeature"
            label="COM_FAILEDLOGINATTEMPTS_AUTO_BLOCK_ATTEMPTS_COUNT_LABEL"
            description="COM_FAILEDLOGINATTEMPTS_AUTO_BLOCK_ATTEMPTS_COUNT_DESC"
            default="3"
            min="1"
            step="1"
            filter="integer"
            validate="number"
            class="input-mini"
            showon="enable_firewall:1"
        />
        <field
            name="admin_secret_key"
            type="profeature"
            label="COM_FAILEDLOGINATTEMPTS_ADMIN_SECRET_KEY_LABEL"
            description="COM_FAILEDLOGINATTEMPTS_ADMIN_SECRET_KEY_DESC"
            default="fla"
            filter="string"
            class="input-xxlarge"
            required="true"
            hint="fla"
            showon="enable_firewall:1"
        >
            <option value="">JNONE</option>
        </field>
        
        <!-- FIX ORDERING -->
        <field type="header" label="PLG_FLA_FIX_ORDERING_HEADER" />
        <field name="fixordering" id="fixordering" type="fixordering" addfieldpath="/plugins/authentication/failedloginattempts/elements" />

        <!-- BEGIN: JED Review -->
		<field type="header" class="w357_large_header" label="W357FRM_HEADER_JED_REVIEW_AND_RATING" />
		<field name="jedreview" id="jedreview" type="jedreview" extension_type="module" extension_name="failedloginattempts" real_name="COM_FAILEDLOGINATTEMPTS" plugin_type="" label="" addfieldpath="/plugins/system/web357framework/elements" jed_url="" />
		<!-- END: JED Review -->

		<!-- BEGIN: Version Check -->
		<field type="header" label="W357FRM_HEADER_VERSION_CHECK" />
		<field name="info" id="info" type="info" extension_type="plugin" extension_name="failedloginattempts" real_name="COM_FAILEDLOGINATTEMPTS" plugin_type="" label="" addfieldpath="/plugins/system/web357framework/elements" url_slug="failed-login-attempts-joomla-plugin" />
		<!-- END: Version Check -->
        
        <!-- BEGIN: Check if Web357 Framework plugin exists -->
		<field name="w357frmrk" id="w357frmrk" type="w357frmrk" addfieldpath="/plugins/user/failedloginattempts/elements" />
		<!-- END: Check if Web357 Framework plugin exists -->

    </fieldset>
    
	<!-- =============================================
	PERMISSIONS
	================================================== -->
    <fieldset name="permissions" description="JCONFIG_PERMISSIONS_DESC" label="JCONFIG_PERMISSIONS_LABEL">
        <field name="rules" type="rules" component="com_failedloginattempts" class="inputbox" filter="rules" validate="rules" label="JCONFIG_PERMISSIONS_LABEL" section="component" />
    </fieldset>

    <!-- =============================================
	ABOUT EXTENSION
	================================================== -->
	<fieldset name="description" label="COM_FAILEDLOGINATTEMPTS_FIELDSET_TITLE_ABOUT_FAILEDLOGINATTEMPTS">

		<!-- ====== VERSION CHECK ======  -->
		<field type="header" label="W357FRM_HEADER_VERSION_CHECK" />
		<field name="info" id="info" type="info" extension_type="component" extension_name="com_failedloginattempts" real_name="COM_FAILEDLOGINATTEMPTS" plugin_type="" label="" addfieldpath="/plugins/system/web357framework/elements" position="bottom" url_slug="failed-login-attempts-joomla-plugin" />
		
		<!-- ====== DESCRIPTION ======  -->
		<field type="header" label="W357FRM_HEADER_DESCRIPTION" />
		<field name="description" id="description" type="description" extension_type="component" extension_name="failedloginattempts" real_name="COM_FAILEDLOGINATTEMPTS" plugin_type="" label="" addfieldpath="/plugins/system/web357framework/elements" />
	
	</fieldset>

	<!-- =============================================
	ABOUT WEB357
	================================================== -->
	<fieldset name="about" label="COM_FAILEDLOGINATTEMPTS_FIELDSET_TITLE_ABOUT_WEB357">
		
		<!-- ====== ABOUT WEB357 ======  -->
		<field type="header" label="W357FRM_HEADER_ABOUT_WEB357" />
		<field name="about" id="about" type="about" label="" addfieldpath="/plugins/system/web357framework/elements" />
		
	</fieldset>

</config>