Source for file UserClientScript.php
Documentation is available at UserClientScript.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see http://nettephp.com
- 12: *
- 18: */
- 26: /**
- 27: * User validation JavaScript generator.
- 28: *
- 32: */
- 34: {
- 41: {
- 43: }
- 47: /**
- 48: * Generates the client side validation script.
- 50: */
- 52: {
- 53: $this->form->getElementPrototype()->attrs['data-nette-rules'] = json_encode($this->exportContainer($this->form));
- 54: }
- 58: /**
- 59: * Exports description for JavaScript.
- 61: */
- 63: {
- 71: }
- 72: }
- 77: }
- 81: /**
- 82: * Exports description for JavaScript.
- 84: */
- 86: {
- 91: 'scope' => $control instanceof ISubmitterControl ? (bool) $control->getValidationScope() : NULL,
- 93: }
- 97: /**
- 98: * Exports rules for JavaScript.
- 100: */
- 102: {
- 116: }
- 118: /*return array(
- 119: 'rules' => $data,
- 120: 'toggles' => $this->toggles,
- 121: );*/
- 122: }
- 124: }