Full view if you want:
<form id="myform">
    <div>
        <p>
            <h4>Проверка электронной почты</h4>
        </p>
    </div>
    <div class="form-group row">
        <div class="col-md-12">
            <input type="checkbox" id="country" name="country" 
value="Россия" class="form-check-input left" checked="checked" />
            <label for="country" style="font-weight: 400;" 
class="form-check-label left">Я являюсь гражданином Российской Федерации и 
даю своё согласие на обработку персональных данных.</label>
        </div>
    </div>
    <div id="target" class="form-group row"></div>
    <div class="form-group row">
        <div class="col-md-4 mb-3">
            <label for="email" style="font-weight: 400;">E-mail:</label>
            <input name="email" id="email" type="email" 
class="form-control" placeholder="email" />
        </div>
        <div class="col-md-4 mb-3">
            <label id="btnCodeLabel" style="padding: 0 !important;margin: 
0px !important;visibility:hidden;">
                <div style="padding: 0;margin: 0;float:left;font-weight: 
400;">Ожидайте:&nbsp;</div>
                <div style="padding: 0;margin: 0;float:left;font-weight: 
400;" id="timer">60</div>
                <div style="padding: 0;margin: 0;float:left;font-weight: 
400;">&nbsp;сек.</div>
            </label>
            <input type="submit" id="btnCode" name="send_message" 
value="Получить код" class="btn btn-primary" style="width: 100%;" />
        </div>
        <div class="col-md-4 mb-3">
            <label id="inputCodeLabel" for="code" style="font-weight: 
400;visibility:hidden;">Введите код подтверждения:</label>
            <input type="text" class="form-control" name="code" id="code" 
placeholder="Код подтверждения" disabled="disabled" />
        </div>
    </div>
</form>

<script>
jQuery('#myform').submit(function() {
  ajax('{{=URL("new_post")}}',
       ['email', 'country'], 'target');
  return false;
});
</script>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to