"cadastro locais"
Bootstrap 3.2.0 Snippet by kadufreitas

<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-8 col-md-8 col-sm-offset-2 col-md-offset-3"> <form role="form"> <h2>Cadastrar ponto turistico</h2> <hr class="colorgraph"> <div class="form-group"> <input type="text" name="display_name" id="display_name" class="form-control input-lg" placeholder="Nome" tabindex="3"> </div> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-6"> <div class="form-group"> <input type="time" name="abertura" id="abertura" class="form-control input-lg" tabindex="5"> <p class="help-block">Horario de abertura</pl> </div> </div> <div class="col-xs-12 col-sm-6 col-md-6"> <div class="form-group"> <input type="time" name="fechamento" id="fechamento" class="form-control input-lg" tabindex="5"> <p class="help-block">Horario de fechamento </pl> </div> </div> </div> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-6"> <input type="number" name="preço" id="preço" class="form-control input-lg" placeholder="Preço da entrada" tabindex="3"> </div> </div><br> <hr class="colorgraph"> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-6"><input type="text" name="pais" id="pais" class="form-control input-lg" placeholder="Pais" tabindex="3"></div> </div><br> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-6"><input type="text" name="estado" id="estado" class="form-control input-lg" placeholder="Estado" tabindex="3"></div> </div><br> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-6"><input type="text" name="cidade" id="cidade" class="form-control input-lg" placeholder="Cidade" tabindex="3"></div> </div><br> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-6"><input type="text" name="bairro" id="bairro" class="form-control input-lg" placeholder="Bairro" tabindex="3"></div> </div><br> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-6"><input type="text" name="rua" id="rua" class="form-control input-lg" placeholder="Rua" tabindex="3"></div> </div><br> <hr class="colorgraph"> <div class="form-group"> <div class="col-xs-12 col-md-6"><input type="submit" value="Cadastrar" class="btn btn-primary btn-block btn-lg" tabindex="7"></div> </div> </form> </div> </div>
/* Credit to bootsnipp.com for the css for the color graph */ .colorgraph { height: 5px; border-top: 0; background: #c4e17f; border-radius: 5px; background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); }
$(function () { $('.button-checkbox').each(function () { // Settings var $widget = $(this), $button = $widget.find('button'), $checkbox = $widget.find('input:checkbox'), color = $button.data('color'), settings = { on: { icon: 'glyphicon glyphicon-check' }, off: { icon: 'glyphicon glyphicon-unchecked' } }; // Event Handlers $button.on('click', function () { $checkbox.prop('checked', !$checkbox.is(':checked')); $checkbox.triggerHandler('change'); updateDisplay(); }); $checkbox.on('change', function () { updateDisplay(); }); // Actions function updateDisplay() { var isChecked = $checkbox.is(':checked'); // Set the button's state $button.data('state', (isChecked) ? "on" : "off"); // Set the button's icon $button.find('.state-icon') .removeClass() .addClass('state-icon ' + settings[$button.data('state')].icon); // Update the button's color if (isChecked) { $button .removeClass('btn-default') .addClass('btn-' + color + ' active'); } else { $button .removeClass('btn-' + color + ' active') .addClass('btn-default'); } } // Initialization function init() { updateDisplay(); // Inject the icon if applicable if ($button.find('.state-icon').length == 0) { $button.prepend('<i class="state-icon ' + settings[$button.data('state')].icon + '"></i>'); } } init(); }); });

Related: See More


Questions / Comments: