PluginProbe
ShiftController Employee Shift Scheduling / 4.9.26
ShiftController Employee Shift Scheduling v4.9.26
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / sh4 / _wordpress / conf / html / admin / view / email.php

email.php in ShiftController Employee Shift Scheduling 4.9.26, at sh4/_wordpress/conf/html/admin/view/email.php

73 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (! defined('ABSPATH')) exit; // Exit if accessed directly
2 class SH4_Conf_Html_Admin_View_Email
3 {
4 protected $ui = NULL;
5 protected $settings = NULL;
6
7 public function __construct(
8 HC3_Hooks $hooks,
9
10 HC3_Ui $ui,
11 HC3_Ui_Layout1 $layout,
12
13 HC3_Settings $settings
14 )
15 {
16 $this->ui = $ui;
17 $this->layout = $layout;
18
19 $this->settings = $hooks->wrap($settings);
20 $this->self = $hooks->wrap($this);
21 }
22
23 public function render()
24 {
25 $pnames = array( 'email_from', 'email_fromname', 'email_html' );
26 foreach( $pnames as $pname ){
27 $values[$pname] = $this->settings->get($pname);
28 }
29
30 $inputs = array();
31
32 $inputs[] = $this->ui->makeInputText( 'email_from', '__Send Email From Address__', $values['email_from'] );
33 $inputs[] = $this->ui->makeInputText( 'email_fromname', '__Send Email From Name__', $values['email_fromname'] );
34
35 $formatOptions = array(
36 '1' => 'HTML',
37 '0' => '__Plain Text__',
38 );
39 $inputs[] = $this->ui->makeInputRadioSet( 'email_html', '__Email Format__', $formatOptions, $values['email_html'] );
40
41 $inputs = $this->ui->makeList( $inputs );
42
43 $out = $this->ui->makeForm(
44 'admin/conf/email',
45 $this->ui->makeList(
46 array( $inputs, $this->ui->makeInputSubmit( '__Save__')->tag('primary') )
47 )
48 );
49
50 $this->layout
51 ->setContent( $out )
52 ->setBreadcrumb( $this->self->breadcrumb() )
53 ->setHeader( $this->self->header() )
54 // ->setMenu( $this->self->menu() )
55 ;
56
57 $out = $this->layout->render();
58 return $out;
59 }
60
61 public function header()
62 {
63 $out = '__Email__';
64 return $out;
65 }
66
67 public function breadcrumb()
68 {
69 $return = array();
70 $return['admin'] = array( 'admin', '__Administration__' );
71 return $return;
72 }
73 }