zenario_enable_site: 
    priv: _PRIV_EDIT_SITE_SETTING
    key: 
        id: ""
        isHead: false
    hide_tab_bar: true
    title: Site status
    tabs: 
        site: 
            edit_mode: 
                enabled: true
                on: true
            fields: 
                site_enabled_desc:
                    snippet:
                        html: |
                            Use this to set the running status of the site.
                
                site_enabled:
                    indent: 1
                    type: checkbox
                    onoff: true
                    label: Enable site
                    value: 1
                    redraw_onchange: true
                site_enabled_note:
                    indent: 1
                    visible_if:
                        lib.value: site_enabled
                site_disabled_note:
                    indent: 1
                    visible_if:
                        lib.valueIsEmpty: site_enabled
                    note_below: |
                        Site disabled, and the front-end only visible when logged in as an administrator.
                        You can define text for a holding page that visitors can see in the [[link_start]]Logos and branding[[link_end]] site setting.
                
                
                
                clear_cache_desc:
                    snippet:
                        html: >
                            <p>
                                Click the following button to clear cache and check for changes.
                                You do not need to do this if developer mode is enabled, as performing
                                a browser reload in admin mode will achieve the same result.
                            </p>
                
                clear_cache:
                    indent: 1
                    type: submit
                    value: 'Clear cache and check for changes'
                    class: zenario_submit_button
                    format_onchange: true
                    notices_below:
                        checked: 
                            hidden: true
                            type: success
                            message: Cache cleared; checked for changes.
                
                clear_cache_note:
                    note_below: |
                        <p>This button will:</p>
                        <ul>
                            <li>Clear the <code>cache/</code> directory of all cached web pages, plugins, <code>.css</code>, <code>.js</code> and <code>.yaml</code> files (they will be freshly re-created on visitor demand)</li>
                            <li>Re-create the minified copies of skins in the <code>public/css/</code> directory</li>
                            <li>Cause visitors' browser caches to be cleared on next load.</li>
                        </ul>
                        <p>This button will also, where applicable, restart any running background scripts managed by the Scheduled Task Manager, and cause any reverse proxy cache's data to be cleared.</p>
                
                
                
                dev_mode_desc:
                    notices_below:
                        head_warning:
                            type: warning
                            visible_if: |
                                lib.tuix.key.isHead
                            html: true
                            message: |
                                    This site is running on the &ldquo;HEAD&rdquo; development codebase of Zenario.
                                    (In <code>zenario/admin/db_updates/latest_revision_no.inc.php</code>
                                    the constant <code>ZENARIO_IS_HEAD</code> is set to true.)
                                    Because of this, we recommend that you run the site in developer mode, with the Auto option.
                
                enable_dev_mode:
                    indent: 1
                    type: checkbox
                    onoff: true
                    label: Enable developer mode
                    redraw_onchange: true
                
                site_in_dev_mode:
                    indent: 2
                    visible_if:
                        lib.value: enable_dev_mode
                    type: radios
                    values:
                        3600:
                            label: For 1 hour
                        28800:
                            label: For 8 hours
                        129600:
                            label: For 36 hours
                        432000:
                            label: For 5 days
                        head:
                            visible_if: |
                                lib.tuix.key.isHead
                            label: Auto (recommended when codebase is HEAD)
                        timed:
                            hidden: true
                            label: ''
                            pre_field_html: |
                                <br/>
                    redraw_onchange: true
                    enable_microtemplates_in_properties: true
                    note_below: |
                        In developer mode, when a developer changes a file within Zenario, the effect of any
                        changes will be seen by administrators on next page load, so bypassing Zenario's cache;
                        but the site will run more slowly for administrators.
                        It will have no effect on regular website visitors or extranet users.
                        
                        <% if (lib.tuix.key.isHead) { %>
                            </br></br>
                            By choosing Auto, developer mode will be enabled so long as ZENARIO_IS_HEAD is still true.
                            When the Zenario codebase becomes a branch, this constant will be set to false and developer mode
                            will be automatically switched off.
                        <% } %>
                
                dev_mode_disabled_note:
                    indent: 1
                    visible_if:
                        lib.valueIsEmpty: enable_dev_mode
                    note_below: |
                        The site will run more quickly for administrators when developer mode is disabled,
                        but if a developer changes a file,
                        they will need to manually press the button above.


