filip
2010-10-12 d88165c8c17e6ff6860cf113b486108ba6d45e6c
Added admin_name and admin_email to mail system config tab.
Using these variables in welcome email from admin, when mailbox is created.

5 files modified
36 ■■■■■ changed files
interface/web/admin/form/system_config.tform.php 18 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/cz_system_config.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en_system_config.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/admin/templates/system_config_mail_edit.htm 8 ●●●●● patch | view | raw | blame | history
interface/web/mail/mail_user_edit.php 6 ●●●●● patch | view | raw | blame | history
interface/web/admin/form/system_config.tform.php
@@ -180,6 +180,22 @@
            'width'        => '30',
            'maxlength'    => '255'
        ),
        'admin_mail' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'default'    => '',
            'value'        => '',
            'width'        => '30',
            'maxlength'    => '255'
        ),
        'admin_name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'default'    => '',
            'value'        => '',
            'width'        => '30',
            'maxlength'    => '255'
        ),
    ##################################
    # ENDE Datatable fields
    ##################################
@@ -233,4 +249,4 @@
);
?>
?>
interface/web/admin/lib/lang/cz_system_config.lng
@@ -19,4 +19,6 @@
$wb['use_domain_module_hint'] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They can not free edit the domain-field.You have to re-login after changing this value, to make the changes visible.';
$wb['new_domain_txt'] = 'HTML to create a new domain';
$wb['webftp_url_txt'] = 'WebFTP URL';
$wb['admin_mail_txt'] = 'E-mail Administrátora';
$wb['admin_name_txt'] = 'Jméno Administrátora';
?>
interface/web/admin/lib/lang/en_system_config.lng
@@ -19,4 +19,6 @@
$wb["use_domain_module_hint"] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They cannot free edit the domain-field.You have to re-login after changing this value, to make the changes visible.';
$wb["new_domain_txt"] = 'HTML to create a new domain';
$wb["webftp_url_txt"] = 'WebFTP URL';
$wb['admin_mail_txt'] = 'Administrator's e-mail';
$wb['admin_name_txt'] = 'Administrator's name';
?>
interface/web/admin/templates/system_config_mail_edit.htm
@@ -15,6 +15,14 @@
          <label for="webmail_url">{tmpl_var name='webmail_url_txt'}</label>
        <input name="webmail_url" id="webmail_url" value="{tmpl_var name='webmail_url'}" size="30" maxlength="255" type="text" class="textInput" />
      </div>
    <div class="ctrlHolder">
          <label for="admin_mail">{tmpl_var name='admin_mail_txt'}</label>
        <input name="admin_mail" id="admin_mail" value="{tmpl_var name='admin_mail'}" size="30" maxlength="255" type="text" class="textInput" />
      </div>
    <div class="ctrlHolder">
          <label for="admin_name">{tmpl_var name='admin_name_txt'}</label>
        <input name="admin_name" id="admin_name" value="{tmpl_var name='admin_name'}" size="30" maxlength="255" type="text" class="textInput" />
      </div>
    </fieldset>
    <input type="hidden" name="id" value="{tmpl_var name='id'}">
interface/web/mail/mail_user_edit.php
@@ -242,6 +242,12 @@
        $welcomeFromName  = $app->tform->lng("welcome_mail_fromname_txt");
        $welcomeFromEmail = $app->tform->lng("welcome_mail_fromemail_txt");
        $app->uses('getconf');
        $global_config = $app->getconf->get_global_config('mail');
        if(!empty($global_config['admin_mail']))$welcomeFromEmail = $global_config['admin_mail'];
        if(!empty($global_config['admin_name']))$welcomeFromName = $global_config['admin_name'];
        $mailHeaders      = "MIME-Version: 1.0" . "\n";
        $mailHeaders     .= "Content-type: text/plain; charset=utf-8" . "\n";
        $mailHeaders     .= "Content-Transfer-Encoding: 8bit" . "\n";