Skip to content

Commit

Permalink
Extracts HTML from UserPassword.php to twig template #14801
Browse files Browse the repository at this point in the history
Signed-off-by: Jayati Shrivastava <gaurijove@gmail.com>
  • Loading branch information
victorphoenix3 committed Dec 4, 2019
1 parent f87e318 commit 1123779
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/classes/UserPassword.php
Expand Up @@ -13,6 +13,7 @@
use PhpMyAdmin\Message;
use PhpMyAdmin\Response;
use PhpMyAdmin\Server\Privileges;
use PhpMyAdmin\Template;
use PhpMyAdmin\Url;
use PhpMyAdmin\Util;

Expand Down Expand Up @@ -278,9 +279,8 @@ private function changePassDisplayPage($message, $sql_query)
$sql_query,
'success'
);
echo '<a href="' , Url::getFromRoute('/')
, ' target="_parent">' , "\n"
, '<strong>' , __('Back') , '</strong></a>';
$template = new Template();
echo $template->render('user_password');
exit;
}
}
2 changes: 2 additions & 0 deletions templates/user_password.twig
@@ -0,0 +1,2 @@
<a href="{{ url('/') }}" target="_parent">
<strong>{% trans 'Back' %}</strong></a>

0 comments on commit 1123779

Please sign in to comment.