|
|
@@ -9,16 +9,16 @@ class NTKETax
|
|
|
$this->tax_rate = $tax_rate;
|
|
|
$this->new = $new;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
function getHtml()
|
|
|
{
|
|
|
$html = "";
|
|
|
$html .= "<div width=\"100%\" height=\"100%\">\n";
|
|
|
-
|
|
|
+
|
|
|
$html .= "<form name=\"tax_form_".$this->tax_id."\" action=\"configuration.php\" method=\"POST\">\n";
|
|
|
$html .= "<input type=\"hidden\" name=\"page\" value=\"tax\">\n";
|
|
|
$html .= "<input type=\"hidden\" name=\"tax_id\" value=\"".$this->tax_id."\">\n";
|
|
|
-
|
|
|
+
|
|
|
$html .= "<table width=\"100%\" height=\"100%\">\n";
|
|
|
$html .= "<tr>\n";
|
|
|
$html .= "<td>\n";
|
|
|
@@ -37,11 +37,11 @@ class NTKETax
|
|
|
$entry = new NTKEntry("tax_rate", $this->tax_rate);
|
|
|
$html .= $entry->getHtml();
|
|
|
$html .= "</td>\n";
|
|
|
-
|
|
|
+
|
|
|
if($this->new)
|
|
|
{
|
|
|
$html .= "<td colspan=\"2\">\n";
|
|
|
- $button = new NTKButton("button_delete", "hinzufügen", "document.forms['tax_form_".$this->tax_id."'].submit();");
|
|
|
+ $button = new NTKButton("button_new", "hinzufügen", "document.forms['tax_form_".$this->tax_id."'].submit();");
|
|
|
$html .= $button->getHtml();
|
|
|
$html .= "</td>\n";
|
|
|
$html .= "<input type=\"hidden\" name=\"action\" value=\"new\">\n";
|
|
|
@@ -54,18 +54,18 @@ class NTKETax
|
|
|
$html .= "</td>\n";
|
|
|
$html .= "<input type=\"hidden\" name=\"action\" value=\"edit\">\n";
|
|
|
$html .= "<td>\n";
|
|
|
- $button = new NTKButton("button_delete", "löschen", "location.href = 'configuration.php?page=tax&action=delete&tax_id=".$this->tax_id."';");
|
|
|
+ $button = new NTKButton("button_delete", "löschen", "if(confirm('Wirklich loeschen?')) location.href = 'configuration.php?page=tax&action=delete&tax_id=".$this->tax_id."';");
|
|
|
$html .= $button->getHtml();
|
|
|
- $html .= "</td>\n";
|
|
|
+ $html .= "</td>\n";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$html .= "</tr>\n";
|
|
|
$html .= "</table>\n";
|
|
|
-
|
|
|
+
|
|
|
$html .= "</form>\n";
|
|
|
-
|
|
|
+
|
|
|
$html .= "</div>\n";
|
|
|
-
|
|
|
+
|
|
|
return $html;
|
|
|
}
|
|
|
}
|