mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
Converted editapplication.php over to templates
This commit is contained in:
parent
e6d27b6166
commit
6fa81f4c59
@ -17,6 +17,10 @@
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
|
||||
$t = new Template($phpgw_info["server"]["template_dir"]);
|
||||
$t->set_file(array("form" => "application_form.tpl"));
|
||||
|
||||
if ($submit) {
|
||||
if (! $n_app_name || ! $n_app_title) {
|
||||
$error = lang_admin("You must enter an application name and title.");
|
||||
@ -37,37 +41,28 @@
|
||||
$phpgw->common->navbar();
|
||||
}
|
||||
|
||||
echo "<p>" . lang_admin("Edit application") . "<hr>";
|
||||
$t->set_var("lang_header",lang_admin("Add new application"));
|
||||
|
||||
if ($error) {
|
||||
echo "<p><center>$error</center><br>";
|
||||
$t->set_var("error","<p><center>$error</center><br>");
|
||||
} else {
|
||||
$t->set_var("error","");
|
||||
}
|
||||
$t->set_var("session_hidden_var",$phpgw->session->hidden_var()
|
||||
. '<input type="hidden" name="old_app_name" value="'
|
||||
. $phpgw->db->f("app_name") . '">');
|
||||
|
||||
?>
|
||||
<form action="editapplication.php">
|
||||
<input type="hidden" name="old_app_name" value="<?php echo $phpgw->db->f("app_name"); ?>">
|
||||
<?php echo $phpgw->session->hidden_var(); ?>
|
||||
$t->set_var("form_action","editapplication.php");
|
||||
$t->set_var("lang_app_name",lang_admin("application name"));
|
||||
$t->set_var("lang_app_title",lang_admin("application title"));
|
||||
$t->set_var("lang_enabled",lang_admin("enabled"));
|
||||
$t->set_var("lang_add",lang_common("add"));
|
||||
|
||||
<table border="0" width="35%" align="center">
|
||||
<tr>
|
||||
<td><?php echo lang_admin("application name"); ?></td>
|
||||
<td><input name="n_app_name" value="<?php echo $phpgw->db->f("app_name"); ?>"></td>
|
||||
</tr>
|
||||
$t->set_var("app_name_value",$phpgw->db->f("app_name"));
|
||||
$t->set_var("app_title_value",$phpgw->db->f("app_title"));
|
||||
$t->set_var("app_enabled_checked",($phpgw->db->f("app_enabled") == 1?" checked":""));
|
||||
|
||||
<tr>
|
||||
<td><?php echo lang_admin("application title"); ?></td>
|
||||
<td><input name="n_app_title" value="<?php echo $phpgw->db->f("app_title"); ?>"></td>
|
||||
</tr>
|
||||
$t->pparse("out","form");
|
||||
|
||||
<tr>
|
||||
<td><?php echo lang_admin("enabled"); ?></td>
|
||||
<td><input type="checkbox" name="n_app_enabled" value="1"<?php echo ($phpgw->db->f("app_enabled") == 1?" checked":""); ?>></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="center"><input type="submit" name="submit" value="<?php echo lang_common("Change"); ?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
||||
|
@ -17,8 +17,9 @@
|
||||
|
||||
$phpgw_flags["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
$t = new Template($phpgw_info["server"]["template_dir"]);
|
||||
|
||||
$t = new Template($phpgw_info["server"]["template_dir"]);
|
||||
//$t->set_unknowns("remove");
|
||||
$t->set_file(array("form" => "application_form.tpl"));
|
||||
|
||||
if ($submit) {
|
||||
@ -45,12 +46,18 @@
|
||||
} else {
|
||||
$t->set_var("error","");
|
||||
}
|
||||
|
||||
$t->set_var("session_hidden_var",$phpgw->session->hidden_var());
|
||||
$t->set_var("form_action","newapplication.php");
|
||||
$t->set_var("lang_app_name",lang_admin("application name"));
|
||||
$t->set_var("lang_app_title",lang_admin("application title"));
|
||||
$t->set_var("lang_enabled",lang_admin("enabled"));
|
||||
$t->set_var("lang_add",lang_common("add"));
|
||||
|
||||
$t->set_var("app_name_value","");
|
||||
$t->set_var("app_title_value","");
|
||||
$t->set_var("app_enabled_checked","");
|
||||
|
||||
$t->pparse("out","form");
|
||||
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
Loading…
Reference in New Issue
Block a user