diff options
| -rw-r--r-- | HISTORY | 1 | ||||
| -rw-r--r-- | framework/Web/Javascripts/source/prado/validator/validation3.js | 4 | ||||
| -rw-r--r-- | framework/Web/UI/WebControls/TValidationSummary.php | 14 | 
3 files changed, 18 insertions, 1 deletions
@@ -18,6 +18,7 @@ BUG: Issue#136 - TActiveDatePicker don't callback when ShowCalendar is false (Ch  CHG: Issue#7 - Clients Scripts are not combined anymore in Debug application mode (Christophe)  ENH: Issue#115 - Registry for Prado generated clientside counterparts of serverside controls (Yves Berkholz)  ENH: Issue#135 - Add AutoPostBack property to TActiveFileUpload (Bradley) +ENH: Issue#117 - TValidationSummary: new display mode "HeaderOnly" that only render value of HeaderText property (Yves)  ENH: Added caching of message files to TException (Michael)  ENH: Updated to scriptaculous 1.8.2 & Prototype 1.6.0.3  ENH: replace is_null() function calls with native language constuct (Yves) diff --git a/framework/Web/Javascripts/source/prado/validator/validation3.js b/framework/Web/Javascripts/source/prado/validator/validation3.js index 9db1e7d6..850536ab 100644 --- a/framework/Web/Javascripts/source/prado/validator/validation3.js +++ b/framework/Web/Javascripts/source/prado/validator/validation3.js @@ -675,7 +675,7 @@ Prado.WebUI.TValidationSummary.prototype =  	/**
  	 * Return the format parameters for the summary.
  	 * @function {object} ?
 -	 * @param {string} type - Format type: "List", "SingleParagraph" or "BulletList" (default)
 +	 * @param {string} type - Format type: "List", "SingleParagraph", "HeaderOnly" or "BulletList" (default)
  	 * @return Object with format parameters:
  	 * @... {string} header - Text for header
  	 * @... {string} first - Text to prepend before message list
 @@ -691,6 +691,8 @@ Prado.WebUI.TValidationSummary.prototype =  				return { header : "<br />", first : "", pre : "", post : "<br />", last : ""};
  			case "SingleParagraph":
  				return { header : " ", first : "", pre : "", post : " ", last : "<br />"};
 +			case "HeaderOnly":
 +				return { header : "", first : "<!--", pre : "", post : "", last : "-->"};
  			case "BulletList":
  			default:
  				return { header : "", first : "<ul>", pre : "<li>", post : "</li>", last : "</ul>"};
 diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php index e60a40db..ab066f78 100644 --- a/framework/Web/UI/WebControls/TValidationSummary.php +++ b/framework/Web/UI/WebControls/TValidationSummary.php @@ -324,6 +324,9 @@ class TValidationSummary extends TWebControl  				case TValidationSummaryDisplayMode::BulletList:
  					$this->renderBulletList($writer);
  					break;
 +				case TValidationSummaryDisplayMode::HeaderOnly:
 +					$this->renderHeaderOnly($writer);
 +					break;
  			}
  		}
  	}
 @@ -382,6 +385,15 @@ class TValidationSummary extends TWebControl  		}
  		$writer->write($content);
  	}
 +
 +	/**
 +	 * Render the validation summary header text only.
 +	 * @param THtmlWriter the writer used for the rendering purpose
 +	 */
 +	protected function renderHeaderOnly($writer)
 +	{
 +		$writer->write($this->getHeaderText());
 +	}
  }
  /**
 @@ -468,6 +480,7 @@ class TClientSideValidationSummaryOptions extends TClientSideOptions   * - SimpleList: the error messages are displayed as a list without any decorations.
   * - SingleParagraph: the error messages are concatenated together into a paragraph.
   * - BulletList: the error messages are displayed as a bulleted list.
 + * - HeaderOnly: only the HeaderText will be display.
   *
   * @author Qiang Xue <qiang.xue@gmail.com>
   * @version $Id$
 @@ -479,6 +492,7 @@ class TValidationSummaryDisplayMode extends TEnumerable  	const SimpleList='SimpleList';
  	const SingleParagraph='SingleParagraph';
  	const BulletList='BulletList';
 +	const HeaderOnly='HeaderOnly';
  }
  | 
