<?xml version="1.0" encoding="UTF-8"?>
<ajxp_plugin label="CONF_MESSAGE[]" description="CONF_MESSAGE[]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd" mixins="dibidriver_provider" id="boot.conf">
    <class_definition classname="BootConfLoader" filename="plugins/boot.conf/class.BootConfLoader.php" />
    <client_settings>
        <resources>
            <i18n namespace="installer" path="plugins/boot.conf/i18n"/>
        </resources>
    </client_settings>
    <server_settings>
        <global_param group="&lt;span class='icon-key'&gt;&lt;/span&gt; Admin access" name="adminLegend" type="legend" label="" description="Please set up a login and password for the administrator user. This step is necessary to let you login the first time. You can create more administrators later by going to the 'Settings' workspace."/>
        <global_param group="&lt;span class='icon-key'&gt;&lt;/span&gt; Admin access" name="ADMIN_USER_LOGIN" type="string" label="Admin Login" description="Alphanumeric login" mandatory="true"/>
        <global_param group="&lt;span class='icon-key'&gt;&lt;/span&gt; Admin access" name="ADMIN_USER_NAME" type="string" label="Admin Display Name" description="User-friendly name of the user" mandatory="true"/>
        <global_param group="&lt;span class='icon-key'&gt;&lt;/span&gt; Admin access" name="ADMIN_USER_PASS" type="password" label="Admin Password" description="Password" mandatory="true"/>
        <global_param group="&lt;span class='icon-key'&gt;&lt;/span&gt; Admin access" name="ADMIN_USER_PASS2" type="password" label="Confirm" description="Confirm password" mandatory="true"/>
        <global_param group="&lt;span class='icon-cogs'&gt;&lt;/span&gt; Global options" name="sysLegend" type="legend" label="" description="Set up some application parameters. If you enable Emails, please use the Test button to check if your php is correctly configured."/>
        <global_param group="&lt;span class='icon-cogs'&gt;&lt;/span&gt; Global options" name="APPLICATION_TITLE" type="string" label="Application Title" description="Your system title" default="Pydio" mandatory="false"/>
        <global_param group="&lt;span class='icon-cogs'&gt;&lt;/span&gt; Global options" name="APPLICATION_WELCOME" type="textarea" label="Welcome Message" description="An additional message displayed at startup, on the splash screen and the login screen." default="Welcome to Pydio" mandatory="false"/>
        <global_param group="&lt;span class='icon-cogs'&gt;&lt;/span&gt; Global options" name="APPLICATION_LANGUAGE" type="select" choices="AJXP_AVAILABLE_LANGUAGES" label="Default Language" description="Select a language activated by default( users will still be able to switch)" default="en" mandatory="true"/>
        <global_param group="&lt;span class='icon-cogs'&gt;&lt;/span&gt; Global options" name="MAILER_ENABLE" type="group_switch:mailer" label="Enable emails" description="Set up system to send emails" default="no" mandatory="true"/>
        <global_param group_switch_name="mailer" group_switch_value="no" group_switch_label="No (you can enable mails later)" name="status" type="hidden" label="No" description="s" default="no"/>
        <global_param group_switch_name="mailer" group_switch_value="yes" group_switch_label="Yes (requires a correct PHP configuration)" name="status" type="hidden" label="Yes" description="s" default="yes"/>
        <global_param group_switch_name="mailer" group_switch_value="yes" group_switch_label="Yes" name="MAILER_SYSTEM" type="select" label="Php Mailer" description="Set up the correct value to send emails" choices="mail|Mail,sendmail|Sendmail" default="mail" mandatory="true"/>
        <global_param group_switch_name="mailer" group_switch_value="yes" group_switch_label="Yes" name="MAILER_ADMIN" type="string" label="Administrator Email" description="Default 'From' email used to send emails." mandatory="true"/>
        <global_param group_switch_name="mailer" group_switch_label="yes" group_switch_value="yes" type="button" name="TEST_MAILER" choices="boot_test_mailer" label="CONF_MESSAGE[Test Mailer]" description="CONF_MESSAGE[Try sending an email with the configured data]" mandatory="false"/>
        <global_param group="&lt;span class='icon-save'&gt;&lt;/span&gt; Configurations storage" name="StorageLegend" type="legend" label="" description="How the application configuration data will be stored (users, plugins, etc. &lt;b&gt;not&lt;/b&gt; how your actual documents are managed). To get started rapidly, select No Database. To enable more advanced features, configure a database connexion."/>
        <global_param group="&lt;span class='icon-save'&gt;&lt;/span&gt; Configurations storage" name="STORAGE_TYPE" type="group_switch:storage_type" label="Storage Type" description="Select how the configurations will be stored." default="" mandatory="false"/>
        <global_param group_switch_name="storage_type" group_switch_label="No Database (Quick Start)" group_switch_value="serial" name="type" default="serial" label="No Database" description="h" type="hidden" mandatory="true"/>
        <global_param group_switch_name="storage_type" group_switch_label="Database (Requires MySQL or SQLite)" group_switch_value="db" name="type" default="db" label="Database" description="Driver type (do not touch)" type="hidden" mandatory="true"/>
        <global_param group_switch_name="storage_type" group_switch_label="Enable Notifications" group_switch_value="db" name="notifications" default="true" label="Enable Notifications" description="Log all events and alerts" type="boolean" mandatory="false"/>
        <global_param group_switch_name="storage_type" group_switch_label="Database" group_switch_value="db" name="db_type" default="mysql" label="Database" description="Driver type (do not touch)" type="group_switch:dibi_provider" mandatory="true" choices="mysql|MySQL,sqlite3|Sqlite 3"/>
        <global_param group_switch_name="storage_type" group_switch_label="Database" group_switch_value="db" type="button" name="TEST_SQL" choices="boot_test_sql_connexion" label="CONF_MESSAGE[Test SQL Connexion]" description="CONF_MESSAGE[Try connecting to the database]" mandatory="false"/>
        <global_param group="&lt;span class='icon-group'&gt;&lt;/span&gt; Add some users" name="usersLegend" type="legend" label="" description="Create users for your organization right now. You can do this later by going to the Settings workspace."/>
        <global_param group="&lt;span class='icon-group'&gt;&lt;/span&gt; Add some users" name="USER_LOGIN" type="string" label="Login" replicationGroup="users" description="Alphanumeric login"/>
        <global_param group="&lt;span class='icon-group'&gt;&lt;/span&gt; Add some users" name="USER_MAIL" type="string" label="User Email" replicationGroup="users" description="User-friendly name of the user"/>
        <global_param group="&lt;span class='icon-group'&gt;&lt;/span&gt; Add some users" name="USER_NAME" type="string" label="User Name" replicationGroup="users" description="User-friendly name of the user"/>
        <global_param group="&lt;span class='icon-group'&gt;&lt;/span&gt; Add some users" name="USER_PASS" type="password" label="Password" replicationGroup="users" description="Password"/>
        <global_param group="&lt;span class='icon-group'&gt;&lt;/span&gt; Add some users" name="USER_PASS2" type="password" label="Confirm" replicationGroup="users" description="Confirm password"/>
    </server_settings>
    <registry_contributions>
        <actions>
            <action name="load_installer_form">
                <processing><serverCallback methodName="loadInstallerForm"/></processing>
            </action>
            <action name="boot_test_sql_connexion">
                <processing><serverCallback methodName="testConnexions"/></processing>
            </action>
            <action name="boot_test_mailer">
                <processing><serverCallback methodName="testConnexions"/></processing>
            </action>
            <action name="apply_installer_form">
                <processing><serverCallback methodName="applyInstallerForm"/></processing>
            </action>
            <action name="ajxp_installer">
                <gui iconClass="icon-magic" src="" text="installer.1" title="installer.1">
                    <context dir="" recycle="false" selection="false" actionBar="true" actionBarGroup="user"/>
                </gui>
                <rightsContext adminOnly="false" noUser="false" read="false" userLogged="false" write="false"/>
                <processing>
                    <clientCallback dialogOpenForm="installer_form" dialogSkipButtons="true" prepareModal="true">
                        <dialogOnOpen><![CDATA[
                            ResourcesManager.prototype.loadJSResource('plugins/boot.conf/class.AjxpInstaller.js', 'AjxpInstaller');
                            var installer = new AjxpInstaller(modal.getForm().down('#installer_form'), {});
                        ]]></dialogOnOpen>
                        <dialogOnComplete><![CDATA[

                        ]]></dialogOnComplete>
                    </clientCallback>
                    <clientForm id="installer_form"><![CDATA[
                        <div id="installer_form" box_padding="0" box_resize="true" box_width="560" overlayStyle='{"backgroundColor":"white","opacity":10,"backgroundImage":"url(\"AJXP_THEME_FOLDER/images/grid_t.png\")"}' style="padding: 10px; overflow:auto; background-color: white;">
                            <img src="plugins/gui.ajax/PydioLogo250.png" style="display:block;">
                            <div class="dialogLegend installerWelcome"> Thank you for installing Pydio!<br> This tool will make sure your new sharing platform is up and running in no time: browse through the various sections to set up the general behaviour of the application. You can fly over the fields labels with your mouse to get more information. <br>Are you ready ? <span id="start_button">Start wizard!</span></div>
                            <div id="the_form" style="display:none; margin:0 5px;"></div>
                            <div id="configuration_progress" class="dialogLegend installerWelcome" style="display:none; margin:0 5px;">
                                Please wait while Pydio is being configured! It will be up and running in a couple of seconds...
                                <div style="margin: 20px auto; width: 40px;">
                                    <span class="icon-spinner rotating spinner_large"></span>
                                </div>
                            </div>
                            <div style="margin-top:20px;">
                                <div id="save_button" class="SF_input SF_inlineButton disabled"><span class="icon-play-circle"></span>Install Pydio Now!</div>
                            </div>
                        </div>
                        <style type="text/css">
                            #installer_form #save_button{
                                font-size: 17px;
                                clear: left;
                                width: 220px !important;
                                padding: 5px !important;
                                margin: 5px 174px !important;
                            }
                            #installer_form #save_button.disabled{
                                color: #ccc;
                                cursor: default;
                            }
                            .installerWelcome{
                                font-size: 15px;
                                line-height: 21px;
                                padding: 7px;
                                padding-bottom: 0;
                            }
                            #installer_form .accordion_toggle{
                                border: 1px solid #fff;
                                padding-top: 7px;
                                border-bottom: 0;
                                background-position-y: 2px;
                            }
                            #installer_form .accordion_toggle_active{
                                border: 1px solid rgb(117, 128, 139);
                                border-radius: 4px 4px 0 0;
                                border-bottom: 0;
                            }
                            #installer_form .accordion_content{
                                border: 1px solid rgb(117, 128, 139);
                                border-radius: 0 0 4px 4px;
                                border-top: 0;
                                padding-bottom: 9px;
                            }
                            #installer_form #start_button{
                                cursor: pointer;
                                text-decoration: underline;
                                font-weight: bold;
                            }
                        </style>
                    ]]></clientForm>
                    <clientListener name="init"><![CDATA[
                        ajaxplorer.actionBar.fireAction("ajxp_installer");
                    ]]></clientListener>
                </processing>
            </action>
        </actions>
    </registry_contributions>
</ajxp_plugin>
