mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10073] Add @config_text to admin_form
PHPBB3-10073
This commit is contained in:
parent
35b88624f5
commit
ef8d7b995e
3 changed files with 30 additions and 2 deletions
|
@ -253,6 +253,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
- @config_text
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @user
|
- @user
|
||||||
- %core.root_path%
|
- %core.root_path%
|
||||||
|
|
|
@ -17,6 +17,9 @@ namespace phpbb\message;
|
||||||
*/
|
*/
|
||||||
class admin_form extends form
|
class admin_form extends form
|
||||||
{
|
{
|
||||||
|
/** @var \phpbb\config\db_text */
|
||||||
|
protected $config_text;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $subject;
|
protected $subject;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
|
@ -24,6 +27,23 @@ class admin_form extends form
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $sender_address;
|
protected $sender_address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct
|
||||||
|
*
|
||||||
|
* @param \phpbb\auth\auth $auth
|
||||||
|
* @param \phpbb\config\config $config
|
||||||
|
* @param \phpbb\config\db_text $config_text
|
||||||
|
* @param \phpbb\db\driver\driver_interface $db
|
||||||
|
* @param \phpbb\user $user
|
||||||
|
* @param string $phpbb_root_path
|
||||||
|
* @param string $phpEx
|
||||||
|
*/
|
||||||
|
public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\config\db_text $config_text, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $phpEx)
|
||||||
|
{
|
||||||
|
parent::__construct($auth, $config, $db, $user, $phpbb_root_path, $phpEx);
|
||||||
|
$this->config_text = $config_text;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {inheritDoc}
|
* {inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@ -116,12 +136,15 @@ class admin_form extends form
|
||||||
*/
|
*/
|
||||||
public function render(\phpbb\template\template $template)
|
public function render(\phpbb\template\template $template)
|
||||||
{
|
{
|
||||||
|
// @todo Add option to fill the db with it and add migration
|
||||||
|
$l_admin_info = '';//$this->config_text['contact_admin_info'];
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_CONTACT_ADMIN' => true,
|
'S_CONTACT_ADMIN' => true,
|
||||||
'S_CONTACT_FORM' => $this->config['contact_admin_form_enable'],
|
'S_CONTACT_FORM' => $this->config['contact_admin_form_enable'],
|
||||||
'S_IS_REGISTERED' => $this->user->data['is_registered'],
|
'S_IS_REGISTERED' => $this->user->data['is_registered'],
|
||||||
|
|
||||||
'CONTACT_INFO' => '', /** TODO: $this->config['contact_admin_info'] */
|
'CONTACT_INFO' => $l_admin_info,
|
||||||
'MESSAGE' => $this->body,
|
'MESSAGE' => $this->body,
|
||||||
'SUBJECT' => $this->subject,
|
'SUBJECT' => $this->subject,
|
||||||
'NAME' => $this->sender_name,
|
'NAME' => $this->sender_name,
|
||||||
|
|
|
@ -11,7 +11,11 @@
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<!-- IF CONTACT_INFO -->
|
<!-- IF CONTACT_INFO -->
|
||||||
<div class="postbody"><div class="content">{CONTACT_INFO}</div></div>
|
<div class="postbody">
|
||||||
|
<div class="content">
|
||||||
|
{CONTACT_INFO}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue