Don't like ads? PRO users don't see any ads ;-)

Untitled

By: TranceSmile on Mar 30th, 2012  |  syntax: jQuery  |  size: 1.44 KB  |  hits: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <script type="text/javascript">
  2. /*<![CDATA[*/
  3. jQuery(function($) {
  4. $('#login-form').yiiactiveform({'validateOnSubmit':true,'attributes':[{'id':'LoginForm_username','inputID':'LoginForm_username','errorID':'LoginForm_username_em_','model':'LoginForm','name':'username','enableAjaxValidation':true,'clientValidation':function(value, messages, attribute) {
  5.  
  6. if($.trim(value)=='') {
  7.         messages.push("\u041f\u043e\u043b\u0435 \u041b\u043e\u0433\u0456\u043d \u043d\u0435 \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u044b \u043f\u043e\u0440\u043e\u0436\u043d\u0456\u043c");
  8. }
  9.  
  10. }},{'id':'LoginForm_password','inputID':'LoginForm_password','errorID':'LoginForm_password_em_','model':'LoginForm','name':'password','enableAjaxValidation':true,'clientValidation':function(value, messages, attribute) {
  11.  
  12. if($.trim(value)=='') {
  13.         messages.push("\u041f\u043e\u043b\u0435 \u041f\u0430\u0440\u043e\u043b\u044c \u043d\u0435 \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u044b \u043f\u043e\u0440\u043e\u0436\u043d\u0456\u043c");
  14. }
  15.  
  16. }},{'id':'LoginForm_rememberMe','inputID':'LoginForm_rememberMe','errorID':'LoginForm_rememberMe_em_','model':'LoginForm','name':'rememberMe','enableAjaxValidation':true,'clientValidation':function(value, messages, attribute) {
  17.  
  18. if($.trim(value)!='' && value!="1" && value!="0") {
  19.         messages.push("\u0417\u0430\u043f\u0430\u043c'\u044f\u0442\u0430\u0442\u0438 \u043c\u0435\u043d\u0435 must be either 1 or 0.");
  20. }
  21.  
  22. }}]});
  23. });
  24. /*]]>*/
  25. </script>