mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
update the applcations section to handle apps that aren't display on the navbar
This commit is contained in:
parent
8e765f2af7
commit
f514d209db
@ -30,7 +30,7 @@
|
||||
. lang("Edit") . "</td> <td> " . lang("Delete") . " </td> <td> "
|
||||
. lang("Enabled") . " </td> <td></tr>";
|
||||
|
||||
$phpgw->db->query("select * from applications $ordermethod");
|
||||
$phpgw->db->query("select * from applications $ordermethod",__LINE__,__FILE__);
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
@ -48,7 +48,7 @@
|
||||
. " </a></td>";
|
||||
|
||||
echo "<td width=5%>";
|
||||
if ($phpgw->db->f("app_enabled") == 1) {
|
||||
if ($phpgw->db->f("app_enabled") != 0) {
|
||||
echo lang("Yes");
|
||||
} else {
|
||||
echo "<b>" . lang("No") . "</b>";
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
if ($old_app_name != $n_app_name) {
|
||||
$phpgw->db->query("select count(*) from applications where app_name='"
|
||||
. addslashes($n_app_name) . "'");
|
||||
. addslashes($n_app_name) . "'",__LINE__,__FILE__);
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->db->f(0) != 0) {
|
||||
@ -44,13 +44,13 @@
|
||||
if (! $phpgw->templateotalerrors) {
|
||||
$phpgw->db->query("update applications set app_name='" . addslashes($n_app_name) . "',"
|
||||
. "app_title='" . addslashes($n_app_title) . "', app_enabled='"
|
||||
. "$n_app_enabled' where app_name='$old_app_name'");
|
||||
. "$n_app_status' where app_name='$old_app_name'",__LINE__,__FILE__);
|
||||
|
||||
Header("Location: " . $phpgw->link("applications.php"));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$phpgw->db->query("select * from applications where app_name='$app_name'");
|
||||
$phpgw->db->query("select * from applications where app_name='$app_name'",__LINE__,__FILE__);
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->templateotalerrors) {
|
||||
@ -61,10 +61,10 @@
|
||||
} else {
|
||||
$phpgw->template->set_var("error","");
|
||||
|
||||
$n_app_name = $phpgw->db->f("app_name");
|
||||
$n_app_title = $phpgw->db->f("app_title");
|
||||
$n_app_enabled = $phpgw->db->f("app_enabled");
|
||||
$old_app_name = $phpgw->db->f("app_name");
|
||||
$n_app_name = $phpgw->db->f("app_name");
|
||||
$n_app_title = $phpgw->db->f("app_title");
|
||||
$n_app_status = $phpgw->db->f("app_enabled");
|
||||
$old_app_name = $phpgw->db->f("app_name");
|
||||
}
|
||||
|
||||
$phpgw->template->set_var("lang_header",lang("Edit application"));
|
||||
@ -73,12 +73,17 @@
|
||||
$phpgw->template->set_var("form_action",$phpgw->link("editapplication.php"));
|
||||
$phpgw->template->set_var("lang_app_name",lang("application name"));
|
||||
$phpgw->template->set_var("lang_app_title",lang("application title"));
|
||||
$phpgw->template->set_var("lang_enabled",lang("enabled"));
|
||||
$phpgw->template->set_var("lang_status",lang("Status"));
|
||||
$phpgw->template->set_var("lang_submit_button",lang("edit"));
|
||||
|
||||
$phpgw->template->set_var("app_name_value",$n_app_name);
|
||||
$phpgw->template->set_var("app_title_value",$n_app_title);
|
||||
$phpgw->template->set_var("app_enabled_checked",($n_app_enabled?" checked":""));
|
||||
|
||||
$selected[$n_app_status] = " selected";
|
||||
$status_html = '<option value="0"' . $selected[0] . '>' . lang("Disabled") . '</option>'
|
||||
. '<option value="1"' . $selected[1] . '>' . lang("Enabled") . '<option>'
|
||||
. '<option value="2"' . $selected[2] . '>' . lang("Enabled - Hidden from navbar") . '</option>';
|
||||
$phpgw->template->set_var("select_status",$status_html);
|
||||
|
||||
$phpgw->template->pparse("out","form");
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
$phpgw->templateotalerrors = 0;
|
||||
|
||||
$phpgw->db->query("select count(*) from applications where app_name='"
|
||||
. addslashes($n_app_name) . "'");
|
||||
. addslashes($n_app_name) . "'",__LINE__,__FILE__);
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->db->f(0) != 0) {
|
||||
@ -41,7 +41,7 @@
|
||||
if (! $phpgw->templateotalerrors) {
|
||||
$phpgw->db->query("insert into applications (app_name,app_title,app_enabled) values('"
|
||||
. addslashes($n_app_name) . "','" . addslashes($n_app_title) . "',"
|
||||
. "$n_app_enabled)");
|
||||
. "$n_app_status)",__LINE__,__FILE__);
|
||||
|
||||
Header("Location: " . $phpgw->link("applications.php"));
|
||||
exit;
|
||||
@ -60,12 +60,17 @@
|
||||
$phpgw->template->set_var("form_action",$phpgw->link("newapplication.php"));
|
||||
$phpgw->template->set_var("lang_app_name",lang("application name"));
|
||||
$phpgw->template->set_var("lang_app_title",lang("application title"));
|
||||
$phpgw->template->set_var("lang_enabled",lang("enabled"));
|
||||
$phpgw->template->set_var("lang_status",lang("Status"));
|
||||
$phpgw->template->set_var("lang_submit_button",lang("add"));
|
||||
|
||||
$phpgw->template->set_var("app_name_value",$n_app_name);
|
||||
$phpgw->template->set_var("app_title_value",$n_app_value);
|
||||
$phpgw->template->set_var("app_enabled_checked",($n_app_enabled?" checked":""));
|
||||
|
||||
$selected[$n_app_status] = " selected";
|
||||
$status_html = '<option value="0"' . $selected[0] . '>' . lang("Disabled") . '</option>'
|
||||
. '<option value="1"' . $selected[1] . '>' . lang("Enabled") . '<option>'
|
||||
. '<option value="2"' . $selected[2] . '>' . lang("Enabled - Hidden from navbar") . '</option>';
|
||||
$phpgw->template->set_var("select_status",$status_html);
|
||||
|
||||
$phpgw->template->pparse("out","form");
|
||||
|
||||
|
@ -16,8 +16,12 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{lang_enabled}</td>
|
||||
<td><input type="checkbox" name="n_app_enabled" value="1"{app_enabled_checked}></td>
|
||||
<td>{lang_status}</td>
|
||||
<td>
|
||||
<select name="n_app_status">
|
||||
{select_status}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user