empty var fixes

This commit is contained in:
Matthew Saunders Brown 2022-09-27 15:53:10 -07:00
parent 50c03d6d17
commit 2b0c906615
5 changed files with 10 additions and 6 deletions

View File

@ -22,6 +22,10 @@ class AutorespondersAdd extends \Panel\Vmail {
static function get($f3) { static function get($f3) {
/* initialize autoresponder_array */
$autoresponder_array = array('subject' => '', 'body' => '', 'mode' => 'Vacation', 'status' => '1');
$f3->set('autoresponder_array', $autoresponder_array);
echo \Template::instance()->render('vmail/autoresponders-add.html'); echo \Template::instance()->render('vmail/autoresponders-add.html');
} }

View File

@ -34,7 +34,7 @@ class AutorespondersEdit extends \Panel\Vmail {
$body = substr_replace($body, "", -1); $body = substr_replace($body, "", -1);
$autoresponder_array[0]['body'] = $body; $autoresponder_array[0]['body'] = $body;
$autoresponders_array[$k] = $autoresponder_array; $autoresponders_array[0] = $autoresponder_array;
$f3->set('autoresponder_array', $autoresponder_array[0]); $f3->set('autoresponder_array', $autoresponder_array[0]);

View File

@ -22,6 +22,9 @@ class ForwardsAdd extends \Panel\Vmail {
static function get($f3) { static function get($f3) {
/* initialize forward_array */
$forward_array = array('forward' => '', 'save_local' => '0');
$f3->set('forward_array', $forward_array);
echo \Template::instance()->render('vmail/forwards-add.html'); echo \Template::instance()->render('vmail/forwards-add.html');
} }

View File

@ -3,9 +3,6 @@
<check if="isset(@autoresponders_array)"> <check if="isset(@autoresponders_array)">
<table> <table>
<!-- <tr>
<th colspan="2">Autoresponder for {{ @mbox }}@{{ @domain }} </th>
</tr>-->
<tr> <tr>
<td align="right"><b>Subject:</b></td> <td align="right"><b>Subject:</b></td>

View File

@ -6,10 +6,10 @@
<legend>Edit Email Account {{ @PARAMS.mbox }}@{{ @PARAMS.domain }} (All fields are required)</legend> <legend>Edit Email Account {{ @PARAMS.mbox }}@{{ @PARAMS.domain }} (All fields are required)</legend>
<label for="password">Password <small>(leave empty to keep same password)</small></label> <label for="password">Password <small>(leave empty to keep same password)</small></label>
<input id="password" name="password" type="password" value="{{ @mbox.password }}"> <input id="password" name="password" type="password" value="">
<label for="password_confirm">Confirm Password <small>(repeat same password, only if making a change)</small></label> <label for="password_confirm">Confirm Password <small>(repeat same password, only if making a change)</small></label>
<input id="password_confirm" name="password_confirm" type="password" value="{{ @mbox.password_confirm }}"> <input id="password_confirm" name="password_confirm" type="password" value="">
<label for="status">Status</label> <label for="status">Status</label>
<select id="status" name="status"> <select id="status" name="status">