#* @vtlvariable name="action" type="com.atlassian.confluence.admin.actions.GeneralConfigurationAction" *#
<html>
	<head>
		<title>$action.getText("title.edit.config")</title>
		<meta name="help-path" content="/admin/help/generalconfig.vm"/>
    </head>
	<body>
        #requireResource("confluence.web.resources:ajs")
        #requireResource("confluence.sections.admin.generalconfig:resources")

        #parse ( "/template/includes/actionerrors.vm" )

        <form method="POST" name="editgeneralconfig" action="doeditgeneralconfig.action">
            #form_xsrfToken()
            <div class="steptitle">$action.getText("sub.title.site")</div>
            <div class="smalltext">$action.getText("sub.title.site.description")</div>
            <table class="grid" width="100%">
                #tag( "TextField" "label='site.title'" "name='siteTitle'" "value=siteTitle" "size=50" )
                #tag( "TextField" "id=editbaseurl" "label='domain.name'" "name='domainName'" "value=domainName" "size=50" "disabled=!$systemAdmin")
                #tag( "Select" "label='site.homepage'" "name='siteHomePage'" "list=siteHomePages" "listKey=key" "listValue=value" )
                #tag( "Textarea" "label='site.welcomemessage'" "name='siteWelcomeMessage'" "rows=8" "cols=50" )
                #bodytag( "Component" "label='view.space.goes.to.browse.space'" "name='viewSpaceGoesToSpaceSummary'" "value=viewSpaceGoesToSpaceSummary" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                #tag( "TextField" "label='site.supportaddress'" "name='siteSupportAddress'" "value=siteSupportAddress" "size=50" )
            </table>

            <a name="features"></a>
            <div class="steptitle topPadding">$action.getText("sub.title.features")</div>
            #if ($systemAdmin)
                <div class="smalltext">$action.getText("sub.title.features.description", [ "$req.contextPath/admin/plugins.action" ])</div>
            #end
            <table class="grid" width="100%">
                #bodytag( "Component" "label='enable.wysiwyg'" "name='enableWysiwyg'" "value=enableWysiwyg" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='use.wysiwyg.by.default'" "name='useWysiwygByDefault'" "value=useWysiwygByDefault" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='allow.camel.case'" "name='allowCamelCase'" "value=allowCamelCase" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='allow.threaded.comments'" "name='allowThreadedComments'" "value=allowThreadedComments" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='allow.trackbacks'" "name='allowTrackbacks'" "value=allowTrackbacks" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='allow.remoteapi'" "name='allowRemoteApi'" "value=allowRemoteApi" "theme='custom'" "template='onofflist.vm'" "disabled=!$systemAdmin") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='gzip.response.encoding'" "name='gzipResponseEncoding'" "value=gzipResponseEncoding" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                <tr>
                    <td nowrap valign="top" align="right"><span class="label">$action.getText("did.you.mean.search.suggestions") <span class="grey">($action.getText("did.you.mean.only.english.supported"))</span>:</span></td>
                    <td>
                        <input type="radio" name="enableDidYouMean" id="did-you-mean-on" value="true" #if ($enableDidYouMean) checked #end>
                        <label class="did-you-mean" for="did-you-mean-on">$action.getText('common.words.on.small')</label>

                        <input type="radio" name="enableDidYouMean" id="did-you-mean-off" value="false" #if (!$enableDidYouMean) checked #end>
                        <label class="did-you-mean" for="did-you-mean-off">$action.getText('common.words.off.small')</label>
                        #if ($action.didYouMeanIndexExists()) <input type="hidden" id="dymIndexExists" value="true"/> #end
                        <div id="did-you-mean-warning" class="grey">
                            $action.getText('did.you.mean.to.enable', ["<a href='${req.contextPath}/admin/search-indexes.action'>", '</a>'])
                        </div>
                    </td>
                </tr>

                <tr><td class="label" align="right">$action.getText('draft.save.interval'):</td>
                <td>
                    #fielderror('draftSaveInterval')
                    #tag( "TextField" "name='draftSaveIntervalMinutes'" "value=draftSaveIntervalMinutes" "size=6" "theme='simple'") Minute(s)
                    #tag( "TextField" "name='draftSaveIntervalSeconds'" "value=draftSaveIntervalSeconds" "size=6" "theme='simple'") Second(s)
                </td></tr>
                #tag( "TextField" "id='numberOfBreadcrumbAncestors'" "label='numberOfBreadcrumbAncestors'" "name='numberOfBreadcrumbAncestors'" "value=numberOfBreadcrumbAncestors" "size=4")
                <tr>
                    <td nowrap valign="top" align="right"><span class="label">$action.getText("quick.nav"):</span></td>
                    <td>
                        <input type="radio" name="enableQuickNav" id="quick_nav_on" value="true" #if ($enableQuickNav == 'true') checked #end>
                        <label for="quick_nav_on">$action.getText('common.words.on.small')</label>

                        <input type="radio" name="enableQuickNav" id="quick_nav_off" value="false" #if ($enableQuickNav == 'false') checked #end>
                        <label for="quick_nav_off">$action.getText('common.words.off.small')</label><br/>
                        #fielderror('maxSimultaneousQuickNavRequests')
                        <label id="maxSimultaneousQuickNavRequestsLabel" for="maxSimultaneousQuickNavRequests">$action.getText("quick.nav.max.simultaneous.requests"):</label>&nbsp;<input type="text" id="maxSimultaneousQuickNavRequests" name="maxSimultaneousQuickNavRequests" value="$!maxSimultaneousQuickNavRequests">
                    </td>
                </tr>
                #bodytag( "Component" "label='open.search'" "name='enableOpenSearch'" "value=enableOpenSearch" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end

            </table>

            <a name="security"></a>
            <div class="steptitle topPadding">$action.getText("sub.title.security")</div>
            <div class="smalltext">$action.getText("sub.title.security.description")</div>
            <table class="grid" width="100%">
                #bodytag( "Component" "label='ext.user.management'" "name='externalUserManagement'" "value=externalUserManagement" "theme='custom'" "template='onofflist.vm'" "disabled=!$systemAdmin") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='users.addwildcards'" "name='addWildcardsToUserAndGroupSearches'" "value=addWildcardsToUserAndGroupSearches" "theme='custom'" "disabled=!$systemAdmin" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='allow.public.signup'" "name='allowPublicSignup'" "value=allowPublicSignup" "theme='custom'" "template='onofflist.vm'" "disabled=!$systemAdmin") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='nofollow.external.links'" "name='nofollowExternalLinks'" "value=nofollowExternalLinks" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                #tag( "Select" "label='email.address.visibility'" "name='emailAddressVisibility'" "value=emailAddressVisibility" "list=emailAddressVisibilityTypes" "listKey=key" "listValue=value" "theme='custom'" "template='radiolist.vm'")
                #bodytag( "Component" "label='allow.remoteapi.anonymous'" "name='allowRemoteApiAnonymous'" "value=allowRemoteApiAnonymous" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='anti.xss.mode'" "name='antiXssMode'" "value=antiXssMode" "theme='custom'" "template='onofflist.vm'" "disabled=!$systemAdmin") #param ("cssClassForLabel" "label") #end
                #bodytag( "Component" "label='enable.space.styles'" "name='enableSpaceStyles'" "value=enableSpaceStyles" "theme='custom'" "template='onofflist.vm'" "disabled=!$systemAdmin") #param ("cssClassForLabel" "label") #end
                #tag( "TextField" "id=maxRssItems" "label='rss.max.items'" "name='maxRssItems'" "value=maxRssItems" "size=5" "disabled=!$systemAdmin" )
            </table>

            <a name="formatting"></a>
            <div class="steptitle topPadding">$action.getText("sub.title.formatting")</div>
            <div class="smalltext">$action.getText("sub.title.formatting.description", [ "$req.contextPath/admin/configurelanguage.action" ])</div>
            <table class="grid" width="100%">
                #tag( "TextField" "label='defaultEncoding'" "name='defaultEncoding'" "value=defaultEncoding" "size=30" )
                #tag( "Select" "label='indexing.language'" "name='indexingLanguage'" "list=indexingLanguages" "listKey=key" "listValue=value" )
                #tag( "TextField" "label='defaultTimeFormatterPattern'" "name='defaultTimeFormatterPattern'" "value=defaultTimeFormatterPattern" "size=30" )
                #tag( "TextField" "label='defaultDayFormatterPattern'" "name='defaultDayFormatterPattern'" "value=defaultDayFormatterPattern" "size=30" )
                #tag( "TextField" "label='defaultDateTimeFormatterPattern'" "name='defaultDateTimeFormatterPattern'" "value=defaultDateTimeFormatterPattern" "size=30" )
                #tag( "TextField" "label='defaultDateFormatterPattern'" "name='defaultDateFormatterPattern'" "value=defaultDateFormatterPattern" "size=30" )
                #tag( "TextField" "label='defaultLongNumberFormatterPattern'" "name='defaultLongNumberFormatterPattern'" "value=defaultLongNumberFormatterPattern" "size=30" )
                #tag( "TextField" "label='defaultDecimalNumberFormatterPattern'" "name='defaultDecimalNumberFormatterPattern'" "value=defaultDecimalNumberFormatterPattern" "size=30" )
                #bodytag( "Component" "label='display.link.icons'" "name='displayLinkIcons'" "value=displayLinkIcons" "theme='custom'" "template='onofflist.vm'") #param ("cssClassForLabel" "label") #end
            </table>

            <a name="attachment"></a>
            <div class="steptitle topPadding">$action.getText("sub.title.attachment")</div>
            #if ($systemAdmin)
                <div class="smalltext">$action.getText("sub.title.attachment.description", [ "$req.contextPath/admin/attachmentstoragesetup.action" ])</div>
            #end
            <table class="grid" width="100%">
                #tag( "TextField" "label='attachment.max.size'" "name='attachmentMaxSize'" "value=attachmentMaxSize" "size=10" )
                #tag( "TextField" "label='attachment.max.upload'" "name='maxAttachmentsInUI'" "value=maxAttachmentsInUI" "size=10" )
                #tag( "TextField" "label='thumbnail.max.height'" "name='maxThumbHeight'" "value=maxThumbHeight" "size=10" )
                #tag( "TextField" "label='thumbnail.max.width'" "name='maxThumbWidth'" "value=maxThumbWidth" "size=10" )
            </table>

            <a name="connectionTimeouts"></a>
            <div class="steptitle topPadding">$action.getText('timeouts.heading')</div>
            <table class="grid" width="100%">
                #bodytag( "Component" "label='timeouts.enabled'" "name='connectionsEnabled'" "value=connectionsEnabled" "theme='custom'" "template='onofflist.vm'" "disabled=!$systemAdmin") #param ("cssClassForLabel" "label") #end
                #tag( "TextField" "id=connectionTimeouts" "label='timeouts.connectionTimeout'" "name='connectionTimeout'" "value=connectionTimeout" "disabled=!$systemAdmin" "size=10" )
                #tag( "TextField" "id=socketTimeouts" "label='timeouts.socketTimeout'" "name='socketTimeout'" "value=socketTimeout" "disabled=!$systemAdmin" "size=10" )
            </table>

            <table width="100%">
                <tr>
                    <td colspan="2" align="center">
                        #tag( "Submit" "id=confirm" "name='confirm'" "value='update.name'" "theme='notable'" )
                        #tag( "Submit" "id=cancel" "name='cancel'" "value='cancel.name'" "theme='notable'" )
                    </td>
                </tr>
            </table>
        </form>

		#parse("/breadcrumbs.vm")
	</body>
</html>
