Changeset 178 for trunk/lib/FormValidator.inc.php
- Timestamp:
- Jun 22, 2006 9:27:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FormValidator.inc.php
r166 r178 43 43 var $errors = array(); 44 44 45 // Default error marker.46 var $marker = ' sc-msg-error ';47 48 45 /** 49 46 * Return the current list of errors. … … 92 89 foreach ($this->errors as $err) { 93 90 if ($err['name'] == $form_name) { 94 return true;91 return $err['type']; 95 92 } 96 93 } … … 160 157 function err($form_name, $marker=null) 161 158 { 162 if ( $this->anyErrors($form_name)) {159 if (false !== ($type = $this->anyErrors($form_name))) { 163 160 if (isset($marker)) { 164 161 echo $marker; 165 162 } else { 166 echo $this->marker; 163 switch ($type) { 164 case MSG_ERR: 165 default: 166 echo ' sc-msg-error '; 167 break; 168 169 case MSG_WARNING: 170 echo ' sc-msg-warning '; 171 break; 172 173 case MSG_SUCCESS: 174 echo ' sc-msg-success '; 175 break; 176 177 case MSG_NOTICE: 178 echo ' sc-msg-notice '; 179 break; 180 } 167 181 } 168 182 }
Note: See TracChangeset
for help on using the changeset viewer.