parent
1c7ebb0905
commit
65e9190773
20 changed files with 2679 additions and 99 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,273 @@ |
|||||||
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
|
/******/ // The module cache
|
||||||
|
/******/ var installedModules = {}; |
||||||
|
|
||||||
|
/******/ // The require function
|
||||||
|
/******/ function __webpack_require__(moduleId) { |
||||||
|
|
||||||
|
/******/ // Check if module is in cache
|
||||||
|
/******/ if(installedModules[moduleId]) |
||||||
|
/******/ return installedModules[moduleId].exports; |
||||||
|
|
||||||
|
/******/ // Create a new module (and put it into the cache)
|
||||||
|
/******/ var module = installedModules[moduleId] = { |
||||||
|
/******/ exports: {}, |
||||||
|
/******/ id: moduleId, |
||||||
|
/******/ loaded: false |
||||||
|
/******/ }; |
||||||
|
|
||||||
|
/******/ // Execute the module function
|
||||||
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
||||||
|
|
||||||
|
/******/ // Flag the module as loaded
|
||||||
|
/******/ module.loaded = true; |
||||||
|
|
||||||
|
/******/ // Return the exports of the module
|
||||||
|
/******/ return module.exports; |
||||||
|
/******/ } |
||||||
|
|
||||||
|
|
||||||
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
|
/******/ __webpack_require__.m = modules; |
||||||
|
|
||||||
|
/******/ // expose the module cache
|
||||||
|
/******/ __webpack_require__.c = installedModules; |
||||||
|
|
||||||
|
/******/ // __webpack_public_path__
|
||||||
|
/******/ __webpack_require__.p = ""; |
||||||
|
|
||||||
|
/******/ // Load entry module and return exports
|
||||||
|
/******/ return __webpack_require__(0); |
||||||
|
/******/ }) |
||||||
|
/************************************************************************/ |
||||||
|
/******/ ([ |
||||||
|
/* 0 */ |
||||||
|
/***/ function(module, exports, __webpack_require__) { |
||||||
|
|
||||||
|
'use strict'; |
||||||
|
|
||||||
|
var _image_upload = __webpack_require__(11); |
||||||
|
|
||||||
|
var _scroll_on_required = __webpack_require__(8); |
||||||
|
|
||||||
|
var _ajax_send_form_data = __webpack_require__(12); |
||||||
|
|
||||||
|
$(function () { |
||||||
|
(0, _image_upload.imageUploadInit)(); |
||||||
|
(0, _scroll_on_required.scrollOnRequiredInit)(); |
||||||
|
window.sendFormData = _ajax_send_form_data.sendFormData; |
||||||
|
window.scrollOnRequiredInit = _scroll_on_required.scrollOnRequiredInit; |
||||||
|
}); |
||||||
|
|
||||||
|
/***/ }, |
||||||
|
/* 1 */, |
||||||
|
/* 2 */ |
||||||
|
/***/ function(module, exports) { |
||||||
|
|
||||||
|
'use strict'; |
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", { |
||||||
|
value: true |
||||||
|
}); |
||||||
|
function getCookie(name) { |
||||||
|
var cookieValue = null; |
||||||
|
if (document.cookie && document.cookie != '') { |
||||||
|
var cookies = document.cookie.split(';'); |
||||||
|
for (var i = 0; i < cookies.length; i++) { |
||||||
|
var cookie = jQuery.trim(cookies[i]); |
||||||
|
if (cookie.substring(0, name.length + 1) == name + '=') { |
||||||
|
cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return cookieValue; |
||||||
|
} |
||||||
|
|
||||||
|
function humanFileSize(bytes, si) { |
||||||
|
var thresh = si ? 1000 : 1024; |
||||||
|
|
||||||
|
if (Math.abs(bytes) < thresh) return bytes + ' B'; |
||||||
|
|
||||||
|
var units = si ? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] : ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']; |
||||||
|
|
||||||
|
var u = -1; |
||||||
|
|
||||||
|
do { |
||||||
|
bytes /= thresh; |
||||||
|
++u; |
||||||
|
} while (Math.abs(bytes) >= thresh && u < units.length - 1); |
||||||
|
|
||||||
|
return bytes.toFixed(1) + ' ' + units[u]; |
||||||
|
} |
||||||
|
|
||||||
|
exports.humanFileSize = humanFileSize; |
||||||
|
exports.getCookie = getCookie; |
||||||
|
|
||||||
|
/***/ }, |
||||||
|
/* 3 */, |
||||||
|
/* 4 */, |
||||||
|
/* 5 */, |
||||||
|
/* 6 */, |
||||||
|
/* 7 */, |
||||||
|
/* 8 */ |
||||||
|
/***/ function(module, exports) { |
||||||
|
|
||||||
|
'use strict'; |
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", { |
||||||
|
value: true |
||||||
|
}); |
||||||
|
function scrollOnRequiredInit() { |
||||||
|
var $required = $('.required.error'); |
||||||
|
// console.log($required);
|
||||||
|
if (!$required.length) return; |
||||||
|
$('html, body').animate({ |
||||||
|
scrollTop: $required.offset().top - 25 |
||||||
|
}, 1000); |
||||||
|
} |
||||||
|
|
||||||
|
exports.scrollOnRequiredInit = scrollOnRequiredInit; |
||||||
|
|
||||||
|
/***/ }, |
||||||
|
/* 9 */, |
||||||
|
/* 10 */, |
||||||
|
/* 11 */ |
||||||
|
/***/ function(module, exports, __webpack_require__) { |
||||||
|
|
||||||
|
'use strict'; |
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", { |
||||||
|
value: true |
||||||
|
}); |
||||||
|
exports.imageUploadInit = undefined; |
||||||
|
|
||||||
|
var _utils = __webpack_require__(2); |
||||||
|
|
||||||
|
// function previewImg() {
|
||||||
|
// let $fileUploadWidgets = $('.file-upload-widget');
|
||||||
|
// $.each($fileUploadWidgets, function (ind, el) {
|
||||||
|
// let $fileImg = $(el).find('img');
|
||||||
|
// let $fileInput = $(el).find('.file-upload-input');
|
||||||
|
// // console.log("$fileInput[0].files.length = ", $fileInput[0].files.length);
|
||||||
|
// // console.log("$fileInput.val() = ", $fileInput.val());
|
||||||
|
// console.log("$fileInput = ", $fileInput);
|
||||||
|
// if ($fileInput[0].files.length) {
|
||||||
|
// console.log("Попытка загрузить файл");
|
||||||
|
// let reader = new FileReader();
|
||||||
|
// reader.onload = function (e) {
|
||||||
|
// $fileImg.attr('src', e.target.result);
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// reader.readAsDataURL($fileInput[0].files[0]);
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
function imageUploadInit() { |
||||||
|
var $fileUploadContainer = $('#fileUploadContainer'); |
||||||
|
|
||||||
|
$('#fileUploadAddBtn').on('click', function ($evt) { |
||||||
|
$fileUploadContainer.find('.file-upload-widget').last().find('.file-upload-input').click(); |
||||||
|
}); |
||||||
|
|
||||||
|
$fileUploadContainer.on('change', '.file-upload-input', function ($evt) { |
||||||
|
var $fileInput = $(this); |
||||||
|
var $fileUploadWidget = $fileInput.closest('.file-upload-widget'); |
||||||
|
var $fileImg = $fileUploadWidget.find('.preview'); |
||||||
|
var filePath = $fileInput.val().replace(/\\/g, '/'); |
||||||
|
var fileName = path.basename(filePath); |
||||||
|
var fileSize = $fileInput.get(0).files && (0, _utils.humanFileSize)($fileInput.get(0).files[0].size); |
||||||
|
console.log("file path", filePath); |
||||||
|
console.log("file path2 ", $fileInput[0].files[0]); |
||||||
|
if (fileName) { |
||||||
|
$fileUploadWidget.find('.file-upload-label').text(fileName + ' ' + fileSize); |
||||||
|
|
||||||
|
var $newFileUploadWidget = $fileUploadWidget.clone(); |
||||||
|
$newFileUploadWidget.find('.file-upload-label').text(''); |
||||||
|
|
||||||
|
$fileUploadContainer.find('.list-new-new').append($newFileUploadWidget); |
||||||
|
|
||||||
|
$fileUploadWidget.css('display', 'block'); |
||||||
|
|
||||||
|
if ($fileImg.length) { |
||||||
|
var reader = new FileReader(); |
||||||
|
reader.onload = function (e) { |
||||||
|
$fileImg.css('background-image', 'url(' + e.target.result + ')'); |
||||||
|
}; |
||||||
|
|
||||||
|
reader.readAsDataURL($fileInput[0].files[0]); |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
$fileUploadContainer.on('click', '.file-upload-remove-img-btn', function ($evt) { |
||||||
|
var $btn = $(this); |
||||||
|
$btn.closest('.file-upload-widget').remove(); |
||||||
|
}); |
||||||
|
} //TODO: оформить Upload'еры в виде классов
|
||||||
|
//require: <script src='{% static "my-libs.js" %}'></script>
|
||||||
|
exports.imageUploadInit = imageUploadInit; |
||||||
|
// export {imageUploadInit, previewImg}
|
||||||
|
|
||||||
|
/***/ }, |
||||||
|
/* 12 */ |
||||||
|
/***/ function(module, exports, __webpack_require__) { |
||||||
|
|
||||||
|
"use strict"; |
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", { |
||||||
|
value: true |
||||||
|
}); |
||||||
|
exports.sendFormData = undefined; |
||||||
|
|
||||||
|
var _utils = __webpack_require__(2); |
||||||
|
|
||||||
|
function sendFormData(e) { |
||||||
|
e.preventDefault(); |
||||||
|
var $target = $(e.target); |
||||||
|
var $form = $target.closest("form"); |
||||||
|
// let formData = $form.serializeArray();
|
||||||
|
var formData = new FormData($form[0]); |
||||||
|
$.ajax({ |
||||||
|
url: $form.attr("action"), |
||||||
|
data: formData, |
||||||
|
async: false, |
||||||
|
method: $form.attr("method"), |
||||||
|
beforeSend: function beforeSend(xhr) { |
||||||
|
xhr.setRequestHeader("X-CSRFToken", (0, _utils.getCookie)('csrftoken')); |
||||||
|
}, |
||||||
|
success: function success(data) { |
||||||
|
// let data = xhr.responseJSON;
|
||||||
|
// console.log('success data -->', data);
|
||||||
|
window.location.href = data.redirect_to; |
||||||
|
}, |
||||||
|
cache: false, |
||||||
|
contentType: false, |
||||||
|
processData: false, |
||||||
|
error: function error(xhr, ajaxOptions, thrownError) { |
||||||
|
var status = xhr.status; |
||||||
|
$('.error').removeClass('error'); |
||||||
|
if (status == 400) { |
||||||
|
var data = xhr.responseJSON; |
||||||
|
$.each(data, function (key, value) { |
||||||
|
var $header = $form.find("[name=" + key + "]").siblings('.required'); |
||||||
|
if ($header.length > 0) { |
||||||
|
$header.addClass("error"); |
||||||
|
} |
||||||
|
}); |
||||||
|
window.scrollOnRequiredInit(); |
||||||
|
} else { |
||||||
|
console.log('xhr = ', xhr); |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
// $.post(url, formData).done(function (data) {
|
||||||
|
// alert(data);
|
||||||
|
// });
|
||||||
|
} |
||||||
|
|
||||||
|
exports.sendFormData = sendFormData; |
||||||
|
|
||||||
|
/***/ } |
||||||
|
/******/ ]); |
||||||
@ -0,0 +1,148 @@ |
|||||||
|
import SelectedContainer from 'components/SelectedContainer'; |
||||||
|
import SelectedContainerCreate from 'components/SelectedContainerCreate'; |
||||||
|
import NoTreeSelect from 'components/NoTreeSelect'; |
||||||
|
import TreeSelect from 'components/TreeSelect'; |
||||||
|
// import SingleTreeSelect from 'components/SingleTreeSelect'
|
||||||
|
import SelectOrCreate from 'components/SelectOrCreate' |
||||||
|
|
||||||
|
$(function () { |
||||||
|
function createSpecs(url) { |
||||||
|
// SPECIALIZATIONS
|
||||||
|
let sb_main = new TreeSelect($('#select-box-1'), {url, visible: true, required: true}); |
||||||
|
// sb_main.setHeader("Специальность");
|
||||||
|
let select_container = new SelectedContainer($('#selected-spec'), |
||||||
|
{ |
||||||
|
obj: sb_main, |
||||||
|
// onlyOne: true
|
||||||
|
}); |
||||||
|
sb_main.connectSelectedContainer(select_container); |
||||||
|
let sb_1 = new TreeSelect($('#select-box-2'), {obj: sb_main}); |
||||||
|
let sb_2 = new TreeSelect($('#select-box-3'), {obj: sb_main}); |
||||||
|
let sb_3 = new TreeSelect($('#select-box-4'), {obj: sb_main}); |
||||||
|
let sb_4 = new TreeSelect($('#select-box-5'), {obj: sb_main}); |
||||||
|
|
||||||
|
// select_container.on("add", () => {
|
||||||
|
// let $container = $('#spec-value');
|
||||||
|
// $container.html($('#selected-spec').find(".selected-element").find(".name").html());
|
||||||
|
// });
|
||||||
|
|
||||||
|
sb_main.setNearbySelectBox(sb_1); |
||||||
|
sb_1.setNearbySelectBox(sb_2, sb_main); |
||||||
|
sb_2.setNearbySelectBox(sb_3, sb_1); |
||||||
|
sb_3.setNearbySelectBox(sb_4, sb_2); |
||||||
|
sb_4.setNearbySelectBox("", sb_3); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
function createBuildingClass(url) { |
||||||
|
// BUILDING-CLASSIFICATION
|
||||||
|
sb_build_main = new TreeSelect($('#sb-building-classification'), {url, visible: true}); |
||||||
|
sb_build_main.setHeader("Классификация здания"); |
||||||
|
|
||||||
|
let sb_build_1 = new TreeSelect($('#sb-building-sub-classification'), {obj: sb_build_main}); |
||||||
|
|
||||||
|
let select_build_container = new SelectedContainer($('#selected-building-classification'), |
||||||
|
{ |
||||||
|
obj: sb_build_main, |
||||||
|
onlyOne: true |
||||||
|
}); |
||||||
|
sb_build_main.connectSelectedContainer(select_build_container); |
||||||
|
|
||||||
|
sb_build_main.setNearbySelectBox(sb_build_1); |
||||||
|
sb_build_1.setNearbySelectBox("", sb_build_main); |
||||||
|
} |
||||||
|
|
||||||
|
function createConstructionType(url) { |
||||||
|
sb_constr_main = new NoTreeSelect($('#sb-construction-type'), {url, visible: true}); |
||||||
|
sb_constr_main.setHeader("Вид строительства"); |
||||||
|
let select_constr_type = new SelectedContainer($('#selected-construction-type'), { |
||||||
|
obj: sb_constr_main, |
||||||
|
noTree: true, |
||||||
|
onlyOne: true |
||||||
|
}); |
||||||
|
sb_constr_main.connectSelectedContainer(select_constr_type); |
||||||
|
} |
||||||
|
|
||||||
|
function createLocations(url) { |
||||||
|
sb_loc_main = new TreeSelect($('#sb-location-1'), {url, visible: true}); |
||||||
|
sb_loc_main.setHeader("Местоположение"); |
||||||
|
let select_loc = new SelectedContainer($('#selected-location'), |
||||||
|
{ |
||||||
|
obj: sb_loc_main, |
||||||
|
onlyOne: true |
||||||
|
}); |
||||||
|
sb_loc_main.connectSelectedContainer(select_loc); |
||||||
|
let sb_loc_1 = new TreeSelect($('#sb-location-2'), {obj: sb_loc_main}); |
||||||
|
let sb_loc_2 = new TreeSelect($('#sb-location-3'), {obj: sb_loc_main}); |
||||||
|
|
||||||
|
sb_loc_main.setNearbySelectBox(sb_loc_1); |
||||||
|
sb_loc_1.setNearbySelectBox(sb_loc_2, sb_loc_main); |
||||||
|
sb_loc_2.setNearbySelectBox("", sb_loc_1); |
||||||
|
} |
||||||
|
|
||||||
|
function createRealty(url) { |
||||||
|
let sb_realty = new SelectOrCreate($('#sb-realty'), {url, visible: true}); |
||||||
|
sb_realty.setHeader(" "); |
||||||
|
let select_realty = new SelectedContainerCreate($('#selected-realty'), |
||||||
|
{ |
||||||
|
obj: sb_realty, |
||||||
|
noTree: true, |
||||||
|
onlyOne: true, |
||||||
|
noHeader: true |
||||||
|
}); |
||||||
|
sb_realty.connectSelectedContainer(select_realty); |
||||||
|
sb_realty.setLinkBoxes([sb_loc_main, sb_constr_main, sb_build_main]); |
||||||
|
select_realty.on("add", () => { |
||||||
|
$('#checkbox-sb-realty').attr("disabled", true) |
||||||
|
}); |
||||||
|
select_realty.on("remove", () => { |
||||||
|
$('#checkbox-sb-realty').attr("disabled", false) |
||||||
|
}); |
||||||
|
sb_realty.dataPromise.then(function () { |
||||||
|
let $realty = $('#sb-realty'); |
||||||
|
let check = $('#checkbox-sb-realty'); |
||||||
|
if (!check.prop("checked")) { |
||||||
|
$realty.hide(); |
||||||
|
} |
||||||
|
} |
||||||
|
); |
||||||
|
let sb_realty_top = new NoTreeSelect($('#sb-realty-top'), {url, visible: true}); |
||||||
|
sb_realty_top.setHeader("Объект"); |
||||||
|
sb_realty_top.connectSelectedContainer(select_realty); |
||||||
|
sb_realty_top.dataPromise.then(function () { |
||||||
|
if (!sb_realty_top.dataTree.data.length) { |
||||||
|
sb_realty_top.hide() |
||||||
|
}else{ |
||||||
|
let id = window.location.hash.replace("#", ""); |
||||||
|
if (id) sb_realty_top.setElementById(id); |
||||||
|
} |
||||||
|
}); |
||||||
|
select_realty.on("add", (args)=> { |
||||||
|
//TODO: Костыли!!!
|
||||||
|
$('#checkbox-sb-realty').prop("checked", true); |
||||||
|
sb_realty.show(); |
||||||
|
let id = args[0]; |
||||||
|
if (id.text) return; |
||||||
|
let el = sb_realty.dataTree.getElementById(id); |
||||||
|
sb_realty_top.dataPromise.then(function () { |
||||||
|
sb_realty_top.$searchInput.val(el.name); |
||||||
|
sb_realty_top.selectedEl.id = id; |
||||||
|
sb_realty_top.selectedEl.value = el.name; |
||||||
|
}); |
||||||
|
|
||||||
|
sb_realty.selectedEl.id = id; |
||||||
|
sb_realty._fillBoxes(); |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
let sb_loc_main, sb_constr_main, sb_build_main; |
||||||
|
// Тип работы
|
||||||
|
createSpecs('/api/specializations_flat'); |
||||||
|
// Классификация здания
|
||||||
|
createBuildingClass('/api/building_classifications'); |
||||||
|
// createConstructionType('/api/construction_type');
|
||||||
|
// createLocations('/api/locations_flat');
|
||||||
|
|
||||||
|
// createRealty('/api/realties/current_user')
|
||||||
|
|
||||||
|
}); |
||||||
@ -0,0 +1,11 @@ |
|||||||
|
import {imageUploadInit} from './seeds/image_upload' |
||||||
|
import {scrollOnRequiredInit} from './seeds/scroll_on_required' |
||||||
|
import {sendFormData} from './seeds/ajax_send_form_data' |
||||||
|
|
||||||
|
|
||||||
|
$(function () { |
||||||
|
imageUploadInit(); |
||||||
|
scrollOnRequiredInit(); |
||||||
|
window.sendFormData = sendFormData; |
||||||
|
window.scrollOnRequiredInit = scrollOnRequiredInit; |
||||||
|
}); |
||||||
@ -0,0 +1,22 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
# Generated by Django 1.9.7 on 2016-12-27 16:47 |
||||||
|
from __future__ import unicode_literals |
||||||
|
|
||||||
|
from django.db import migrations |
||||||
|
import mptt.fields |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('specializations', '0004_auto_20161014_2344'), |
||||||
|
('projects', '0052_realty_created'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AddField( |
||||||
|
model_name='portfolio', |
||||||
|
name='specializations', |
||||||
|
field=mptt.fields.TreeManyToManyField(blank=True, to='specializations.Specialization'), |
||||||
|
), |
||||||
|
] |
||||||
@ -0,0 +1,181 @@ |
|||||||
|
{% extends 'partials/_base.html' %} |
||||||
|
{% load i18n %} |
||||||
|
{% load staticfiles %} |
||||||
|
{% load sass_tags %} |
||||||
|
{% block personal_css %} |
||||||
|
<link rel='stylesheet' href='{% sass_src "sass/components/custom-components.sass" %}'> |
||||||
|
<link rel='stylesheet' href='{% sass_src "lib/proekton-components/sass/components.sass" %}'> |
||||||
|
{% endblock %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
{% include 'partials/modals/project_work_type_suggestion.html' %} |
||||||
|
<div class="container main-scope"> |
||||||
|
<div class="row title-scope"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<h1>{% if pk %}Редактировать{% else %}Добавить{% endif %} работу в портфолио</h1> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="row main-content"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<form action=" |
||||||
|
{% if pk %} |
||||||
|
{% url 'projects:contractor-portfolio-edit' pk=pk %} |
||||||
|
{% else %} |
||||||
|
{% url 'projects:contractor-portfolio-create' %} |
||||||
|
{% endif %} |
||||||
|
" |
||||||
|
method="POST" |
||||||
|
enctype="multipart/form-data" novalidate> |
||||||
|
{% csrf_token %} |
||||||
|
<div class="row"> |
||||||
|
<div class="col-lg-9"> |
||||||
|
<div class="simple-field"> |
||||||
|
<div class="header">Название проекта</div> |
||||||
|
<i class="fa fa-question-circle-o" aria-hidden="true"></i> |
||||||
|
<span class="required {% if form.name.errors %}error{% endif %}">Обязательно</span> |
||||||
|
<input value="{{ form.name.value }}" name="name" |
||||||
|
class="simple-input italic" |
||||||
|
placeholder="Пример: Дизайн квартиры, Армирование фундамента, Конструкции перекрытия и т.д." |
||||||
|
autocomplete="off" |
||||||
|
required> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-lg-3"> |
||||||
|
<div id="sb-building-classification"> |
||||||
|
</div> |
||||||
|
<div class="vertical-child" id="sb-building-sub-classification"> |
||||||
|
</div> |
||||||
|
<div class="selected-container" id="selected-building-classification"> |
||||||
|
<input type="hidden" |
||||||
|
name="building_classification" |
||||||
|
value="{{ form.building_classification.value }}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="row vertical-child mod-align-bottom"> |
||||||
|
<div class="col-lg-9"> |
||||||
|
<div class="header">Тип работы</div> |
||||||
|
<i class="fa fa-question-circle-o" aria-hidden="true"></i> |
||||||
|
<span class="required {% if form.specializations.errors %}error{% endif %}">Обязательно</span> |
||||||
|
{# Для поиска заголовка обязательного поля по name= FIXME: fixit#} |
||||||
|
<div hidden name="specializations"></div> |
||||||
|
<div class="" id="select-box-1"></div> |
||||||
|
</div> |
||||||
|
<div class="col-lg-3"> |
||||||
|
<div class="header"> </div> |
||||||
|
<div href="#" onclick="return false" data-toggle="modal" |
||||||
|
data-target="#projectWorkTypeSuggestionModal" |
||||||
|
{# style="text-transform: none; line-height: 115%"#} |
||||||
|
class="btn btn-simple btn-plus">Нет нужной специальности хочу добавить |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-lg-3"> |
||||||
|
<div class="vertical-child" id="select-box-2"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-lg-3"> |
||||||
|
<div class="vertical-child" id="select-box-3"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-lg-3"> |
||||||
|
<div class="vertical-child" id="select-box-4"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-lg-3"> |
||||||
|
<div class="vertical-child" id="select-box-5"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<div class="selected-container horizontal" id="selected-spec"> |
||||||
|
<input type="hidden" name="specializations" |
||||||
|
value="{{ form.specializations.value }}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div style="margin-top: 45px" class="row"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<div class="simple-field"> |
||||||
|
<div class="header">Подробно опишите проект</div> |
||||||
|
<i class="fa fa-question-circle-o" aria-hidden="true" title=""></i> |
||||||
|
<textarea name="description" class="description" |
||||||
|
rows="6">{{ form.description.value }}</textarea> |
||||||
|
|
||||||
|
</div> |
||||||
|
<div class="documentsChat mod" id="fileUploadContainer"> |
||||||
|
<div style="display: inline-block;vertical-align: middle;"> |
||||||
|
<div style="display: inline-block;vertical-align: inherit;" |
||||||
|
class="upload-new paper-clip"> |
||||||
|
<p id="fileUploadAddBtn" style="margin: 0">прикрепить файл</p> |
||||||
|
</div> |
||||||
|
<span style="display: inline-block;vertical-align: inherit;">ДО 100 ФАЙЛОВ</span> |
||||||
|
</div> |
||||||
|
{% for image in form.photos.field.queryset.all %} |
||||||
|
<input type="hidden" name="files" class="file-upload-input" |
||||||
|
<div class="col-lg-3 file-upload-widget" style="display: none"> |
||||||
|
<div class="preview-container"> |
||||||
|
<div class="btn close file-upload-remove-img-btn">×</div> |
||||||
|
<div class="preview"> |
||||||
|
<img src="{{ image.img.url }}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<span style="display:none" class="file-upload-label"></span> |
||||||
|
|
||||||
|
</div> |
||||||
|
{% endfor %} |
||||||
|
<div class="row list-new-new" style="margin-top: 10px"> |
||||||
|
<div class="col-lg-3 file-upload-widget" style="display: none"> |
||||||
|
<input type="file" name="new_files" class="file-upload-input" |
||||||
|
style="position: absolute; top: -1000px; left: -1000px"> |
||||||
|
<div class="preview-container"> |
||||||
|
<div class="btn close file-upload-remove-img-btn">×</div> |
||||||
|
<div class="preview"></div> |
||||||
|
</div> |
||||||
|
<span style="display:none" class="file-upload-label"></span> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<div class="separator"> |
||||||
|
<div class="border"></div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="row top-line"> |
||||||
|
<div class="col-lg-3" style="text-align: center"> |
||||||
|
<input style="width: 100%" type="submit" class="btn btn-simple" |
||||||
|
onclick="sendFormData(event)" |
||||||
|
value="{% if pk %}СОХРАНИТЬ{% else %}РАЗМЕСТИТЬ{% endif %} ПОРТФОЛИО"> |
||||||
|
</div> |
||||||
|
<div class="col-lg-3 col-lg-offset-6" style="text-align: center"> |
||||||
|
<input style="width: 100%" type="button" class="btn btn-simple" |
||||||
|
value="ПРЕДВАРИТЕЛЬНЫЙ ПРОСМОТР"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
</div> <!-- content --> |
||||||
|
</div> |
||||||
|
{# <ul id="popups-storage" hidden>#} |
||||||
|
{# {% if form.errors %}#} |
||||||
|
{# <li class="error">Форма заполнена неполностью</li>#} |
||||||
|
{# {% endif %}#} |
||||||
|
{# <li class="info">Message-1</li>#} |
||||||
|
{# <li class="warning">Message-1</li>#} |
||||||
|
{# </ul>#} |
||||||
|
{# {% include 'partials/inc-message-popup.html' %}#} |
||||||
|
</div> |
||||||
|
|
||||||
|
{% endblock %} |
||||||
|
{% block personal_js %} |
||||||
|
<script src='{% static "my-libs.js" %}'></script> |
||||||
|
<script src='{% static "js/build/init_portfolio_create_edit.js" %}'></script> |
||||||
|
<script src='{% static "js/build/portfolio_create_edit.js" %}'></script> |
||||||
|
{% endblock %} |
||||||
Loading…
Reference in new issue