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 https://nette.org
- 12: *
- 19: */
- 27: /**
- 28: * User validation JavaScript generator.
- 29: *
- 33: */
- 35: {
- 42: {
- 44: }
- 48: /**
- 49: * Generates the client side validation script.
- 51: */
- 53: {
- 54: $this->form->getElementPrototype()->attrs['data-nette-rules'] = json_encode($this->exportContainer($this->form));
- 55: }
- 59: /**
- 60: * Exports description for JavaScript.
- 62: */
- 64: {
- 72: }
- 73: }
- 78: }
- 82: /**
- 83: * Exports description for JavaScript.
- 85: */
- 87: {
- 92: 'scope' => $control instanceof ISubmitterControl ? (bool) $control->getValidationScope() : NULL,
- 94: }
- 98: /**
- 99: * Exports rules for JavaScript.
- 101: */
- 103: {
- 117: }
- 119: /*return array(
- 120: 'rules' => $data,
- 121: 'toggles' => $this->toggles,
- 122: );*/
- 123: }
- 125: }