Guest User

Untitled

a guest
May 20th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.77 KB | None | 0 0
  1. <form method="post" id="s-1" enctype="multipart/form-data" autocomplete="off">
  2. <input type="hidden" name="token" value="{{ csrf_token('home-form') }}" />
  3. <input type="hidden" name="image" id="img-preview" value="">
  4. <div class="row">
  5. <div class="col-xs-12">
  6. <div class="faq-wrapper" id="friends_block">
  7. <div class="faq-item">
  8. <a href="#" data-ix="show-faq-answer" class="faq-link-block w-inline-block">
  9. <div class="faq-title" id="vk_block" style="text-align: center; font-size: 17px;">Мои друзья</div>
  10. <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>
  11. <div data-ix="hide-faq-answer" class="faq-answer-block">
  12. <div class="list-group" id="users"></div>
  13. </div>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="col-xs-12">
  18. <center>
  19. <div class="col-xs-6">
  20.  
  21. <div class="loader_2" style="z-index: 99999;"></div>
  22.  
  23. <div id="image">
  24. <img class="img-thumbnail" style="max-width: 350px; max-height: 200px; margin-bottom: 5px;">
  25. </div>
  26.  
  27. </div>
  28. <div class="col-xs-6">
  29. <label class="button w-button fileContainer" style="text-align: center; height: 35px; max-width: 200px;">
  30. Фото <i class="icon-file-picture"></i>
  31. <input type="file" name="photo" id="upload"> </label>
  32. </div>
  33. </center> </div>
  34. <div class="col-xxs-12 col-xs-6 mt">
  35. <div class="input-field field-news-firstname">
  36. <label for="from" style="display: none;">Имя:</label>
  37. <input type="text" name="name" class="form-control field underline-field w-input" id="news-name" placeholder="Введите имя" required> </div>
  38. </div>
  39. <div class="col-xxs-12 col-xs-6 mt">
  40. <div class="input-field field-news-lastname">
  41. <label for="from" style="display: none;">Фамилия:</label>
  42. <input type="text" name="last_name" class="form-control field underline-field w-input" id="news-lastname" placeholder="Введите фамилию" required> </div>
  43. </div>
  44. <div class="col-xxs-12 col-xs-6 mt alternate">
  45. <div class="input-field field-news-age">
  46. <label for="from" style="display: none;">Возраст:</label>
  47. <input type="text" name="age" class="form-control field underline-field w-input" id="news-age" placeholder="Укажите возраст" required> </div>
  48. </div>
  49. <div class="col-xxs-12 col-xs-6 mt alternate">
  50. <div class="input-field field-news-city_id">
  51. <label for="from" style="display: none;">Город:</label>
  52. <input type="text" name="city" class="form-control field underline-field w-input" id="news-city_id" placeholder="Укажите город" required> </div>
  53. </div>
  54. <div class="col-sm-12 mt">
  55. <section>
  56. <label for="class" style="display: none;">Пол:</label>
  57. <select name="gender" id="news-gender" class="cs-select cs-skin-border field underline-field w-input" required>
  58. <option value="" disabled selected>Укажите пол</option>
  59. <option value="1">Мужской</option>
  60. <option value="2">Женский</option>
  61. </select>
  62. </section>
  63. </div>
  64. <div class="col-sm-12 mt">
  65. <section>
  66. <label for="class" style="display: none;">Шаблон новости:</label>
  67. <select name="template_id" id="news-portal_id" class="cs-select cs-skin-border field underline-field w-input" required>
  68. <option value="" disabled selected>Шаблон новости</option> {% for template in templates %}
  69. <option value="{{ template.id }}">{{ template.name }}</option> {% endfor %} </select>
  70. </section>
  71. </div>
  72. <div class="col-xs-12">
  73. <button type="submit" class="button full-submit-button w-button">Далее</button>
  74. </div>
  75. </div>
  76. </form>
  77.  
  78. function appendCSSToElement(element, CssProperties){ //
  79. var existingCSS = $(element).attr("style");
  80. if(existingCSS == undefined) existingCSS = "";
  81. $.each(CssProperties, function(key,value){existingCSS += " " + key + ": " + value + ";";});
  82. $(element).attr("style", existingCSS);
  83. return $(element);
  84. }
  85.  
  86. appendCSSToElement("#progress_1.icon", { "background":"-webkit-linear-gradient(top, #b9b6b6 100%,#22d469 0%)", "-webkit-background-clip":"text", "-webkit-text-fill-color":"transparent", "display":"initial" });
  87.  
  88. formOne.on('change', function (e) {
  89. var input = $(e.target).attr('name');
  90. var element = $('[name="' + input + '"]');
  91.  
  92. var formInvalid = false;
  93. formOne.each(function() {
  94. if ($(this).val() === '') {
  95. formInvalid = true;
  96. }
  97. });
  98.  
  99. switch (input) {
  100. case 'name':
  101. if (regexp_string.exec(element.val()) === null) {
  102. messageValid([{msg: 'Поле "Имя" содержит недопустимые символы!'}]);
  103. } else {
  104. element.css({"border-width": "0px"});
  105. validation.html('');
  106. progress_1.css({"color": "#b9b6b6"}); // СЕРЫЙ ЦВЕТ ГАЛОЧКИ
  107. }
  108. break;
  109. case 'last_name':
  110. if (regexp_string.exec(element.val()) === null) {
  111. messageValid([{msg: 'Поле "Фамилия" содержит недопустимые символы!'}]);
  112. } else {
  113. element.css({"border-width": "0px"});
  114. validation.html('');
  115. }
  116. break;
  117. case 'age':
  118. if (regexp_int.exec(element.val()) === null) {
  119. // messageValid([{name: 'age', msg: 'Не допустимый возраст (от 12 до 50)!'}]);
  120. messageValid([{msg: 'Не допустимый возраст (от 12 до 50)!'}]);
  121. } else {
  122. var age = parseInt(element.val());
  123. if (age >= 12 && age <= 50) {
  124. element.css({"border-width": "0px"});
  125. validation.html('');
  126. } else {
  127. messageValid([{msg: 'Не допустимый возраст (от 12 до 50)!'}]);
  128. }
  129. }
  130. break;
  131. case 'city':
  132. if (regexp_string.exec(element.val()) === null) {
  133. messageValid([{msg: 'Город указан не корректно!'}]);
  134. } else {
  135. element.css({"border-width": "0px"});
  136. validation.html('');
  137. }
  138. break;
  139. }
  140.  
  141.  
  142.  
  143. });
Add Comment
Please, Sign In to add comment