Fixed templates, refs #186

This commit is contained in:
Andreas Burchert (scarya)
2011-04-24 10:30:30 +02:00
parent 5a5653d594
commit 194e4cfd20
4 changed files with 114 additions and 50 deletions

View File

@@ -56,6 +56,12 @@ elseif($page == 'backup')
redirectTo($filename, Array('page' => $page, 's' => $s)); redirectTo($filename, Array('page' => $page, 's' => $s));
} }
$backup_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.backup.php';
$backup_form = htmlform::genHTMLForm($backup_data);
$title = $backup_data['backup']['title'];
$image = $backup_data['backup']['image'];
eval("echo \"" . getTemplate("extras/backup") . "\";"); eval("echo \"" . getTemplate("extras/backup") . "\";");
} }
elseif($page == 'htpasswds') elseif($page == 'htpasswds')

View File

@@ -0,0 +1,46 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'backup' => array(
'title' => $lng['backup'],
'image' => 'icons/backup.png',
'sections' => array(
'section_a' => array(
'title' => $lng['backup'],
'image' => 'icons/backup.png',
'fields' => array(
'info' => array(
'label' => $lng['extras']['backup_info'],
'type' => 'label',
'value' => ''
),
'path' => array(
'label' => $lng['extras']['backup_create'],
'desc' => ($settings['system']['backup_bigfile'] == 1 ? $lng['extras']['backup_info_big'] : $lng['extras']['backup_info_sep']),
'type' => 'yesno',
'yesno_var' => $backup_enabled
),
'count' => array(
'label' => $lng['extras']['backup_count_info'],
'type' => 'label',
'value' => ''
),
)
)
)
)
);

View File

@@ -1,26 +1,32 @@
$header $header
<form method="post" action="$filename"> <article>
<input type="hidden" name="s" value="$s" /> <header>
<input type="hidden" name="page" value="$page" /> <h2>
<input type="hidden" name="action" value="$action" /> <img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
<input type="hidden" name="id" value="$id" /> {$title}
</h2>
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60"> </header>
<tr>
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" />&nbsp;{$lng['backup']}</b></td> <section class="fullform bradiusodd">
</tr>
<tr> <form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<td class="main_field_name">{$lng['extras']['backup_info']} <fieldset>
<if $settings['system']['backup_bigfile'] == 1 >{$lng['extras']['backup_info_big']}</if> <legend>Froxlor&nbsp;-&nbsp;{$title}</legend>
<if $settings['system']['backup_bigfile'] == 0 >{$lng['extras']['backup_info_sep']}</if>
<if $settings['system']['backup_count'] == 1 > {$lng['extras']['backup_count_info']} </if>:</td> <table class="formtable">
<td class="main_field_display" nowrap="nowrap">{$lng['extras']['backup_create']}&nbsp;$backup_enabled</td> {$backup_form}
</tr> </table>
<tr>
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['panel']['save']}" /></td> <p style="display: none;">
</tr> <input type="hidden" name="s" value="$s" />
</table> <input type="hidden" name="page" value="$page" />
</form> <input type="hidden" name="action" value="$action" />
<br /> <input type="hidden" name="send" value="send" />
<br /> </p>
$footer </fieldset>
</form>
</section>
</article>
$footer

View File

@@ -1,26 +1,32 @@
$header $header
<form method="post" action="$filename"> <article>
<input type="hidden" name="s" value="$s" /> <header>
<input type="hidden" name="page" value="$page" /> <h2>
<input type="hidden" name="action" value="$action" /> <img src="images/Froxlor/{$image}" alt="{$title}" />&nbsp;
<input type="hidden" name="id" value="$id" /> {$title}
</h2>
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60"> </header>
<tr>
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" />&nbsp;{$lng['backup']}</b></td> <section class="fullform bradiusodd">
</tr>
<tr> <form action="$filename" method="post" enctype="application/x-www-form-urlencoded">
<td class="main_field_name">{$lng['extras']['backup_info']} <fieldset>
<if $settings['system']['backup_bigfile'] == 1 >{$lng['extras']['backup_info_big']}</if> <legend>Froxlor&nbsp;-&nbsp;{$title}</legend>
<if $settings['system']['backup_bigfile'] == 0 >{$lng['extras']['backup_info_sep']}</if>
<if $settings['system']['backup_count'] == 1 > {$lng['extras']['backup_count_info']} </if>:</td> <table class="formtable">
<td class="main_field_display" nowrap="nowrap">{$lng['extras']['backup_create']}&nbsp;$backup_enabled</td> {$backup_form}
</tr> </table>
<tr>
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['panel']['save']}" /></td> <p style="display: none;">
</tr> <input type="hidden" name="s" value="$s" />
</table> <input type="hidden" name="page" value="$page" />
</form> <input type="hidden" name="action" value="$action" />
<br /> <input type="hidden" name="send" value="send" />
<br /> </p>
$footer </fieldset>
</form>
</section>
</article>
$footer