mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
[ticket/10073] Add @config_text to admin_form
PHPBB3-10073
This commit is contained in:
parent
35b88624f5
commit
ef8d7b995e
@ -253,6 +253,7 @@ services:
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @config_text
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
|
@ -17,6 +17,9 @@ namespace phpbb\message;
|
||||
*/
|
||||
class admin_form extends form
|
||||
{
|
||||
/** @var \phpbb\config\db_text */
|
||||
protected $config_text;
|
||||
|
||||
/** @var string */
|
||||
protected $subject;
|
||||
/** @var string */
|
||||
@ -24,6 +27,23 @@ class admin_form extends form
|
||||
/** @var string */
|
||||
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}
|
||||
*/
|
||||
@ -116,12 +136,15 @@ class admin_form extends form
|
||||
*/
|
||||
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(
|
||||
'S_CONTACT_ADMIN' => true,
|
||||
'S_CONTACT_FORM' => $this->config['contact_admin_form_enable'],
|
||||
'S_IS_REGISTERED' => $this->user->data['is_registered'],
|
||||
|
||||
'CONTACT_INFO' => '', /** TODO: $this->config['contact_admin_info'] */
|
||||
'CONTACT_INFO' => $l_admin_info,
|
||||
'MESSAGE' => $this->body,
|
||||
'SUBJECT' => $this->subject,
|
||||
'NAME' => $this->sender_name,
|
||||
|
@ -11,7 +11,11 @@
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<!-- 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" />
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user