Beispiel #1
0
    public function getPageContent(Website $website, Request $request)
    {
        $languages = $this->get_sub_directory_names($website->getUriTranslations());
        $user_account_creation_checked = $this->user_account_creation ? 'checked="checked"' : '';
        $top_message = $website->t("site_settings.editing_site_settings.explained");
        $tokenName = RequestToken::FIELD_NAME;
        $tokenHtml = htmlSpecialChars($this->token->getTokenString());
        if ($this->saved) {
            $top_message = <<<EOT
                <em>{$website->t("site_settings.site_settings")} {$website->t("editor.are_changed")}</em>
                <a class="arrow" href="{$website->getUrlPage("admin")}">
                    {$website->t("main.admin")}
                </a>
EOT;
        }
        return <<<EOT
            <p>
                {$top_message}
            </p>
            <p>
                {$website->t("main.fields_required")}
            </p>
            <form action="{$website->getUrlPage("site_settings")}" method="post">
                <p>
                    <label for="option_title">{$website->t("site_settings.title")}</label>:<span class="required">*</span>
                    <br />
                    <input type="text" name="option_title" id="option_title" value="{$this->title}" />
                    <br />
                    <em>{$website->t("site_settings.title.explained")}</em>
                </p>
                <p>
                    <label for="option_copyright">{$website->t("site_settings.copyright")}</label>:
                    <br />
                    <input type="text" name="option_copyright" id="option_copyright" value="{$this->copyright}" />
                    <br />
                    <em>{$website->t("site_settings.copyright.explained")}</em>
                </p>
                <p>
                    <label for="option_password">{$website->t("site_settings.password")}</label>:
                    <br />
                    <input type="text" name="option_password" id="option_password" value="{$this->password}" />
                    <br />
                    <em>{$website->t("site_settings.password.explained")}</em>
                </p>
                <p>
                    <label for="option_language">{$website->t("site_settings.language")}</label>:<span class="required">*</span>
                    <br />
                    {$this->get_dropdown_list("option_language", $languages, $this->language, true)}
                    <br />
                    <em>{$website->t("site_settings.language.explained")}</em>
                </p>
                <p>
                    <label for="option_user_account_creation">
                        <input class="checkbox" type="checkbox" name="option_user_account_creation" id="option_user_account_creation" {$user_account_creation_checked} />
                        {$website->t("site_settings.user_account_creation")}
                    </label>
                    <br />
                    <em>{$website->t("site_settings.user_account_creation.explained")}</em>
                </p>
                <p>
                    <input type="hidden" name="{$tokenName}" value="{$tokenHtml}" />
                    <input type="submit" name="submit" class="button primary_button" value="{$website->t("editor.save")}" />
                </p>
            </form>
            <p>
                <a class="arrow" href="{$website->getUrlPage("admin")}">
                    {$website->t("main.admin")}
                </a>
            </p>
EOT;
    }