Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" id="s-1" enctype="multipart/form-data" autocomplete="off">
- <input type="hidden" name="token" value="{{ csrf_token('home-form') }}" />
- <input type="hidden" name="image" id="img-preview" value="">
- <div class="row">
- <div class="col-xs-12">
- <div class="faq-wrapper" id="friends_block">
- <div class="faq-item">
- <a href="#" data-ix="show-faq-answer" class="faq-link-block w-inline-block">
- <div class="faq-title" id="vk_block" style="text-align: center; font-size: 17px;">Мои друзья</div>
- <div id="vk_api_transport"></div> <img src="{{ asset('bundles/app/theme/joke/images/arrow.svg?1') }}" class="faq-icon" style="transform-style: preserve-3d; transition: transform 200ms; transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);"> </a>
- <div data-ix="hide-faq-answer" class="faq-answer-block">
- <div class="list-group" id="users"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-xs-12">
- <center>
- <div class="col-xs-6">
- <div class="loader_2" style="z-index: 99999;"></div>
- <div id="image">
- <img class="img-thumbnail" style="max-width: 350px; max-height: 200px; margin-bottom: 5px;">
- </div>
- </div>
- <div class="col-xs-6">
- <label class="button w-button fileContainer" style="text-align: center; height: 35px; max-width: 200px;">
- Фото <i class="icon-file-picture"></i>
- <input type="file" name="photo" id="upload"> </label>
- </div>
- </center> </div>
- <div class="col-xxs-12 col-xs-6 mt">
- <div class="input-field field-news-firstname">
- <label for="from" style="display: none;">Имя:</label>
- <input type="text" name="name" class="form-control field underline-field w-input" id="news-name" placeholder="Введите имя" required> </div>
- </div>
- <div class="col-xxs-12 col-xs-6 mt">
- <div class="input-field field-news-lastname">
- <label for="from" style="display: none;">Фамилия:</label>
- <input type="text" name="last_name" class="form-control field underline-field w-input" id="news-lastname" placeholder="Введите фамилию" required> </div>
- </div>
- <div class="col-xxs-12 col-xs-6 mt alternate">
- <div class="input-field field-news-age">
- <label for="from" style="display: none;">Возраст:</label>
- <input type="text" name="age" class="form-control field underline-field w-input" id="news-age" placeholder="Укажите возраст" required> </div>
- </div>
- <div class="col-xxs-12 col-xs-6 mt alternate">
- <div class="input-field field-news-city_id">
- <label for="from" style="display: none;">Город:</label>
- <input type="text" name="city" class="form-control field underline-field w-input" id="news-city_id" placeholder="Укажите город" required> </div>
- </div>
- <div class="col-sm-12 mt">
- <section>
- <label for="class" style="display: none;">Пол:</label>
- <select name="gender" id="news-gender" class="cs-select cs-skin-border field underline-field w-input" required>
- <option value="" disabled selected>Укажите пол</option>
- <option value="1">Мужской</option>
- <option value="2">Женский</option>
- </select>
- </section>
- </div>
- <div class="col-sm-12 mt">
- <section>
- <label for="class" style="display: none;">Шаблон новости:</label>
- <select name="template_id" id="news-portal_id" class="cs-select cs-skin-border field underline-field w-input" required>
- <option value="" disabled selected>Шаблон новости</option> {% for template in templates %}
- <option value="{{ template.id }}">{{ template.name }}</option> {% endfor %} </select>
- </section>
- </div>
- <div class="col-xs-12">
- <button type="submit" class="button full-submit-button w-button">Далее</button>
- </div>
- </div>
- </form>
- function appendCSSToElement(element, CssProperties){ //
- var existingCSS = $(element).attr("style");
- if(existingCSS == undefined) existingCSS = "";
- $.each(CssProperties, function(key,value){existingCSS += " " + key + ": " + value + ";";});
- $(element).attr("style", existingCSS);
- return $(element);
- }
- appendCSSToElement("#progress_1.icon", { "background":"-webkit-linear-gradient(top, #b9b6b6 100%,#22d469 0%)", "-webkit-background-clip":"text", "-webkit-text-fill-color":"transparent", "display":"initial" });
- formOne.on('change', function (e) {
- var input = $(e.target).attr('name');
- var element = $('[name="' + input + '"]');
- var formInvalid = false;
- formOne.each(function() {
- if ($(this).val() === '') {
- formInvalid = true;
- }
- });
- switch (input) {
- case 'name':
- if (regexp_string.exec(element.val()) === null) {
- messageValid([{msg: 'Поле "Имя" содержит недопустимые символы!'}]);
- } else {
- element.css({"border-width": "0px"});
- validation.html('');
- progress_1.css({"color": "#b9b6b6"}); // СЕРЫЙ ЦВЕТ ГАЛОЧКИ
- }
- break;
- case 'last_name':
- if (regexp_string.exec(element.val()) === null) {
- messageValid([{msg: 'Поле "Фамилия" содержит недопустимые символы!'}]);
- } else {
- element.css({"border-width": "0px"});
- validation.html('');
- }
- break;
- case 'age':
- if (regexp_int.exec(element.val()) === null) {
- // messageValid([{name: 'age', msg: 'Не допустимый возраст (от 12 до 50)!'}]);
- messageValid([{msg: 'Не допустимый возраст (от 12 до 50)!'}]);
- } else {
- var age = parseInt(element.val());
- if (age >= 12 && age <= 50) {
- element.css({"border-width": "0px"});
- validation.html('');
- } else {
- messageValid([{msg: 'Не допустимый возраст (от 12 до 50)!'}]);
- }
- }
- break;
- case 'city':
- if (regexp_string.exec(element.val()) === null) {
- messageValid([{msg: 'Город указан не корректно!'}]);
- } else {
- element.css({"border-width": "0px"});
- validation.html('');
- }
- break;
- }
- });
Add Comment
Please, Sign In to add comment