Commit baac49e1 authored by fantu's avatar fantu

fix some small xhtml error

parent 5dada309
......@@ -124,8 +124,8 @@ class app {
<br /><br /><br />
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="error"><b>Error:</b><br>'.$msg;
if($next_link != '') $msg .= '<a href="'.$next_link.'">Next</a><br>';
<td class="error"><b>Error:</b><br />'.$msg;
if($next_link != '') $msg .= '<a href="'.$next_link.'">Next</a><br />';
$msg .= '</td>
</tr>
</table>
......
......@@ -118,7 +118,7 @@ class listform {
$record = array();
$values = $app->$datasource_class->$datasource_function($field, $record);
} else {
$this->errorMessage .= "Custom datasource class or function is empty<br>\r\n";
$this->errorMessage .= "Custom datasource class or function is empty<br />\r\n";
}
}
return $values;
......
......@@ -247,7 +247,7 @@ class tform {
$app->uses($datasource_class);
$values = $app->$datasource_class->$datasource_function($field, $record);
} else {
$this->errorMessage .= "Custom datasource class or function is empty<br>\r\n";
$this->errorMessage .= "Custom datasource class or function is empty<br />\r\n";
}
}
......@@ -527,7 +527,7 @@ class tform {
$field['regex'] .= 's';
if(!preg_match($field['regex'], $record[$key])) {
$errmsg = $field['errmsg'];
$this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
}
}
......@@ -561,9 +561,9 @@ class tform {
if(!preg_match($validator['regex'], $field_value)) {
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
} else {
$this->errorMessage .= $errmsg."<br>\r\n";
$this->errorMessage .= $errmsg."<br />\r\n";
}
}
break;
......@@ -573,9 +573,9 @@ class tform {
if($num_rec["number"] > 0) {
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
} else {
$this->errorMessage .= $errmsg."<br>\r\n";
$this->errorMessage .= $errmsg."<br />\r\n";
}
}
} else {
......@@ -583,9 +583,9 @@ class tform {
if($num_rec["number"] > 0) {
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
} else {
$this->errorMessage .= $errmsg."<br>\r\n";
$this->errorMessage .= $errmsg."<br />\r\n";
}
}
}
......@@ -594,9 +594,9 @@ class tform {
if(empty($field_value)) {
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
} else {
$this->errorMessage .= $errmsg."<br>\r\n";
$this->errorMessage .= $errmsg."<br />\r\n";
}
}
break;
......@@ -604,9 +604,9 @@ class tform {
if(!preg_match("/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z]{2,10}$/i", $field_value)) {
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
} else {
$this->errorMessage .= $errmsg."<br>\r\n";
$this->errorMessage .= $errmsg."<br />\r\n";
}
}
break;
......@@ -615,9 +615,9 @@ class tform {
if($tmpval === 0 and !empty($field_value)) {
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
} else {
$this->errorMessage .= $errmsg."<br>\r\n";
$this->errorMessage .= $errmsg."<br />\r\n";
}
}
break;
......@@ -625,9 +625,9 @@ class tform {
if(!is_numeric($field_value) || $field_value <= 0){
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
} else {
$this->errorMessage .= $errmsg."<br>\r\n";
$this->errorMessage .= $errmsg."<br />\r\n";
}
}
break;
......@@ -639,7 +639,7 @@ class tform {
$app->uses($validator_class);
$this->errorMessage .= $app->$validator_class->$validator_function($field_name, $field_value, $validator);
} else {
$this->errorMessage .= "Custom validator class or function is empty<br>\r\n";
$this->errorMessage .= "Custom validator class or function is empty<br />\r\n";
}
break;
default:
......@@ -671,9 +671,9 @@ class tform {
// checking permissions
if($this->formDef['auth'] == 'yes' && $_SESSION["s"]["user"]["typ"] != 'admin') {
if($action == "INSERT") {
if(!$this->checkPerm($primary_id,'i')) $this->errorMessage .= "Insert denied.<br>\r\n";
if(!$this->checkPerm($primary_id,'i')) $this->errorMessage .= "Insert denied.<br />\r\n";
} else {
if(!$this->checkPerm($primary_id,'u')) $this->errorMessage .= "Update denied.<br>\r\n";
if(!$this->checkPerm($primary_id,'u')) $this->errorMessage .= "Update denied.<br />\r\n";
}
}
......
......@@ -263,7 +263,7 @@ class tform_actions {
function onError() {
global $app, $conf;
$app->tpl->setVar("error","<b>".$app->lng('Error').":</b><br>".$app->tform->errorMessage);
$app->tpl->setVar("error","<b>".$app->lng('Error').":</b><br />".$app->tform->errorMessage);
$app->tpl->setVar($this->dataRecord);
$this->onShow();
}
......
......@@ -51,7 +51,7 @@ class tform_tpl_generator {
<label for=\"".$key."\" class=\"wf_preField\">{tmpl_var name='".$key."_txt'}</label>
<input type=\"text\" id=\"".$key."\" name=\"".$key."\" value=\"{tmpl_var name='".$key."'}\" size=\"".$field['width']."\" maxlength=\"".$field['maxlength']."\"";
if ($field['required'] == true ) {
$html .= " class=\"wf_required\"><span class=\"wf_reqMark\">*</span><br>";
$html .= " class=\"wf_required\"><span class=\"wf_reqMark\">*</span><br />";
} else {
$html .= ">";
}
......@@ -68,7 +68,7 @@ class tform_tpl_generator {
}
$html .= "{tmpl_var name='".$key."'}</textarea>";
if ($field['required'] == true ) {
$html .= "<span class=\"wf_reqMark\">*</span><br>";
$html .= "<span class=\"wf_reqMark\">*</span><br />";
}
$html .= "\r\n </span>";
break;
......@@ -83,7 +83,7 @@ class tform_tpl_generator {
}
$html .= "{tmpl_var name='".$key."'}</select>";
if ($field['required'] == true ) {
$html .= "<span class=\"wf_reqMark\">*</span><br>";
$html .= "<span class=\"wf_reqMark\">*</span><br />";
}
$html .= "\r\n </span>";
break;
......@@ -98,7 +98,7 @@ class tform_tpl_generator {
}
$html .= "{tmpl_var name='".$key."'}</select>";
if ($field['required'] == true ) {
$html .= "<span class=\"wf_reqMark\">*</span><br>";
$html .= "<span class=\"wf_reqMark\">*</span><br />";
}
$html .= "\r\n </span>";
break;
......@@ -107,7 +107,7 @@ class tform_tpl_generator {
<label for=\"".$key."\" class=\"wf_preField\">{tmpl_var name='".$key."_txt'}</label>
<input type=\"password\" id=\"".$key."\" name=\"".$key."\" value=\"{tmpl_var name='".$key."'}\" size=\"".$field['width']."\" maxlength=\"".$field['maxlength']."\"";
if ($field['required'] == true ) {
$html .= " class=\"wf_required\"><span class=\"wf_reqMark\">*</span><br>";
$html .= " class=\"wf_required\"><span class=\"wf_reqMark\">*</span><br />";
} else {
$html .= ">";
}
......@@ -120,7 +120,7 @@ class tform_tpl_generator {
$html .= " <span class=\"wf_required\">
{tmpl_var name='".$key."'}
</span>
<span class=\"wf_reqMark\">*</span><br>";
<span class=\"wf_reqMark\">*</span><br />";
} else {
$html .= " <span class=\"\">
{tmpl_var name='".$key."'}
......
......@@ -36,7 +36,7 @@ class vlibTemplateError {
$error_codes = array(
'VT_ERROR_NOFILE' => 'vlibTemplate Error: Template ('.$extra.') file not found.',
'VT_ERROR_PARSE' => 'vlibTemplate Error: Parse error!<br>To debug this file, use vlibTemplateDebug instead of vlibTemplate in the class instantiation(i.e. new vlibTemplateDebug).',
'VT_ERROR_PARSE' => 'vlibTemplate Error: Parse error!<br />To debug this file, use vlibTemplateDebug instead of vlibTemplate in the class instantiation(i.e. new vlibTemplateDebug).',
'VT_NOTICE_INVALID_TAG' => 'vlibTemplate Notice: Invalid tag ('.$extra.').',
'VT_ERROR_INVALID_TAG' => 'vlibTemplate Error: Invalid tag ('.$extra.'). To disable this you must turn of the STRICT option.',
'VT_NOTICE_INVALID_ATT' => 'vlibTemplate Notice: Invalid attribute ('.$extra.').',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment