vishwamano

source of vishwamano.com
git clone git://git.ricketyspace.net/vishwamano.git
Log | Files | Refs

commit e084f4efb07408d78a8bbeb82ab4633a888269dd
parent baff582400b0519e31ffc9dd5afc09b95a25cf96
Author: rsiddharth <s@ricketyspace.net>
Date:   Wed, 31 Oct 2018 18:06:45 -0400

themes: Remove modal cruft.

Diffstat:
themes/bs3/js/site.js | 40----------------------------------------
themes/bs3/templates/aside.tpl | 73-------------------------------------------------------------------------
themes/bs3/templates/js.tpl | 2--
3 files changed, 0 insertions(+), 115 deletions(-)

diff --git a/themes/bs3/js/site.js b/themes/bs3/js/site.js @@ -1,40 +0,0 @@ -$('#vm-bshoot-form').submit(function(event){ - event.preventDefault(); - bshoot_submit(); -}); - -function bshoot_submit() { - $.post('/post.php', $('#vm-bshoot-form').serialize()) - .done(function(data) { - if(data === 'success') - book_shoot_success(); - else - book_shoot_error(); - }); -} - -function book_shoot_success() { - var stype = $('#vm-bshoot-form').find('input[name=stype]:checked').val(); - var alert_text = 'You have successfully requested for ' + stype; - alert_text += ' shoot. <strong>Vishwa Manoharan</strong> will get back to you soon. Should you have a query, kindly call/WhatsApp <strong>+91-9176560151</strong>.'; - show_global_alert(alert_text, 'alert-success'); -} - -function book_shoot_error() { - var alert_text = '<strong>Shoot request unsuccessful</strong>, please try again. If problem persists email <strong>Vishwa Manoharan &lt;vishwa91photography@gmail.com&gt;</strong>.' - show_global_alert(alert_text, 'alert-danger'); -} - - -function show_global_alert(text, type) { - $('#vm-globle-alert-box').html(text); - $('#vm-globle-alert-box').attr('class', 'alert ' + type); - $('.vm-global-alert-container').css('display', 'block'); - setTimeout(function() { - $('.vm-global-alert-container').fadeOut('slow'); - }, 20000); - $('#vm-bshoot-modal').modal('hide'); - $('#vm-bshoot-modal').on('hidden.bs.modal', function(e){ - $('html, body').animate({ scrollTop: 0 }, 'slow'); - }); -} diff --git a/themes/bs3/templates/aside.tpl b/themes/bs3/templates/aside.tpl @@ -11,76 +11,3 @@ </div> <!-- sitouch end --> </div> <!-- aside row end --> <hr class="hr-long"/> - -<!-- book a shoot modal start --> -<div class="modal fade" id="vm-bshoot-modal" tabindex="-1" role="dialog" - aria-labelledby="vm-bshoot-modal-label"> - <div class="modal-dialog" role="document"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">&times;</span> - </button> - <h3 class="modal-title" id="vm-bshoot-modal-label">Book a shoot</h3> - </div> - <div class="modal-body"> - <form id="vm-bshoot-form" method="POST"> - <div class="form-group"> - <label for="vm-bshoot-shoot-name" class="control-label">Name:</label> - <input type="text" name="name" class="form-control" id="vm-bshoot-shoot-name" required> - </div> - <div class="form-group"> - <label for="vm-bshoot-email" class="control-label">Email:</label> - <input type="email" name="email" class="form-control" id="vm-bshoot-email" required> - </div> - <div class="form-group"> - <label for="vm-bshoot-phone" class="control-label">Phone:</label> - <input type="tel" name="phone" class="form-control" id="vm-bshoot-phone"> - </div> - - <div class="form-group"> - <label class="control-label">Type of Shoot:</label> - <div class="radio"> - <label> - <input type="radio" name="stype" id="vm-bshoot-rdio-kp" value="Kid Portraitures" - required> - Kid Portraitures - </label> - </div> - <div class="radio"> - <label> - <input type="radio" name="stype" id="vm-bshoot-rdio-mp" value="Modelling Portfolio"> - Modelling Portfolio - </label> - </div> - <div class="radio"> - <label> - <input type="radio" name="stype" id="vm-bshoot-rdio-cp" value="Couple Portraitures"> - Couple Portraitures - </label> - </div> - <div class="radio"> - <label> - <input type="radio" name="stype" id="vm-bshoot-rdio-corpp" value="Corporate Portraitures"> - Corporate Portraitures - </label> - </div> - <div class="radio"> - <label> - <input type="radio" name="stype" id="vm-bshoot-rdio-others" value="Other"> - Other - </label> - </div> - </div> <!-- radios end --> - <div class="form-group"> - <label for="vm-bshoot-humantest" class="control-label">What is 100 + 1?:</label> - <input type="number" name="humantest" class="form-control" id="vm-bshoot-humantest" required> - </div> - </form> - </div> <!-- modal body end --> - <div class="modal-footer"> - <button id="vm-bshoot-submit" type="submit" form="vm-bshoot-form" class="btn btn-primary">Book</button> - </div> - </div> <!-- modal dialog end --> - </div> <!-- modal dialog end --> -</div><!-- book a shoot modal start --> diff --git a/themes/bs3/templates/js.tpl b/themes/bs3/templates/js.tpl @@ -1,4 +1,2 @@ <script type="text/javascript" src="{$doc_root}themes/bs3/js/vm.min.js"></script> -<script type="text/javascript" - src="{$doc_root}themes/bs3/js/site.js"></script>