/**
  * Use template to render the backend.
  *
  * @return string
  */
 public function render()
 {
     if (isset($_GET['curry_context']) && $_GET['curry_context'] == 'main') {
         return new Response($this->mainContent);
     }
     return parent::render();
 }
Пример #2
0
 public function showTestEmail()
 {
     $form = $this->getTestEmailForm();
     if (isPost() && $form->isValid($_POST)) {
         $values = $form->getValues(true);
         $ret = $this->sendTestEmail($values);
         $this->addMessage($ret);
     } else {
         $this->addMainContent($form);
     }
     return parent::render();
 }
Пример #3
0
    public function showSetupComplete(Request $request)
    {
        // Disable setup and enable backend authorization
        $config = $this->app->openConfiguration();
        $config->setup = false;
        $config->backend->noauth = false;
        $this->app->writeConfiguration($config);
        $backendUrl = $request->getBasePath() . $this->app['backend.basePath'];
        $frontendUrl = $request->getBasePath() . '/';
        $this->addMainContent(<<<HTML
<div style="text-align:center">
  <h1>Installation complete!</h1>
  <p><img src="shared/backend/common/images/install-finished.png" alt="" /></p>
  <p>Proceed to <a href="{$backendUrl}">login in to the backend</a> or <a href="{$frontendUrl}">visit your webpage</a>.</p>
</div>
HTML
);
        return parent::render();
    }