From ffc8edeb9f05685c42ffa01e030e66436bd1d3c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 21 Oct 2012 20:28:08 +0000 Subject: [PATCH] Made 'add_grade' partly working (XML template and some logic is still missing) --- inc/modules/admin/what-list_grade_data.php | 10 ++++++++-- templates/de/html/admin/admin_add_grade_data.tpl | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/inc/modules/admin/what-list_grade_data.php b/inc/modules/admin/what-list_grade_data.php index d6eb5bf20f..6de20d18d9 100644 --- a/inc/modules/admin/what-list_grade_data.php +++ b/inc/modules/admin/what-list_grade_data.php @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); $show = TRUE; // Check for '???_id' element -if ((countRequestPost() > 0) && (!ifPostContainsSelections('grade_id'))) { +if ((countRequestPost() > 0) && (!isFormSent('add_grade')) && (!ifPostContainsSelections('grade_id'))) { // Not found so output message displayMessage('{--ADMIN_GRADE_DATA_NO_SELECTIONS--}'); @@ -56,7 +56,13 @@ if ((countRequestPost() > 0) && (!ifPostContainsSelections('grade_id'))) { } // END - if // Edit or delete button hit? -if (isFormSent('edit')) { +if (isFormSent('add_grade')) { + // Add grade + showEntriesByXmlCallback('admin_add_do_grade_data'); + + // Do not show the list of URLs after this template + $show = FALSE; +} elseif (isFormSent('edit')) { // Show entries for editing showEntriesByXmlCallback('admin_edit_show_grade_data'); diff --git a/templates/de/html/admin/admin_add_grade_data.tpl b/templates/de/html/admin/admin_add_grade_data.tpl index bb7f79abab..5453ed0061 100644 --- a/templates/de/html/admin/admin_add_grade_data.tpl +++ b/templates/de/html/admin/admin_add_grade_data.tpl @@ -40,7 +40,7 @@ - + -- 2.39.5