1 |
www |
1 |
<?php
|
14592 |
stevensc |
2 |
|
1 |
www |
3 |
use LeadersLinked\Model\UserExperience;
|
14592 |
stevensc |
4 |
|
1 |
www |
5 |
$acl = $this->viewModel()
|
|
|
6 |
->getRoot()
|
|
|
7 |
->getVariable('acl');
|
|
|
8 |
$currentUserHelper = $this->currentUserHelper();
|
|
|
9 |
$currentUser = $currentUserHelper->getUser();
|
|
|
10 |
$currentCompany = $currentUserHelper->getCompany();
|
|
|
11 |
|
|
|
12 |
$roleName = $currentUserHelper->getUserTypeId();
|
|
|
13 |
|
16822 |
efrain |
14 |
$routeWebsite = $this->url('profile/website', [ 'id' => $currentCompany->uuid]);
|
|
|
15 |
$routeCompanySize = $this->url('profile/company-size', [ 'id' => $currentCompany->uuid]);
|
|
|
16 |
$routeIndustry = $this->url('profile/industry', [ 'id' => $currentCompany->uuid]);
|
|
|
17 |
$routeExtended = $this->url('profile/extended', [ 'id' => $currentCompany->uuid]);
|
|
|
18 |
$routeSocialNetworks = $this->url('profile/social-network', [ 'id' => $currentCompany->uuid]);
|
|
|
19 |
$routeLocationAdd = $this->url('profile/location', [ 'id' => $currentCompany->uuid, 'operation' => 'add']);
|
|
|
20 |
$routeFoundationYear = $this->url('profile/foundation_year', [ 'id' => $currentCompany->uuid, 'operation' => 'add']);
|
|
|
21 |
$routeImageUpload = $this->url('profile/image', [ 'id' => $currentCompany->uuid, 'operation' => 'upload']);
|
|
|
22 |
$routeCoverUpload = $this->url('profile/cover', [ 'id' => $currentCompany->uuid, 'operation' => 'upload']);
|
1 |
www |
23 |
|
16822 |
efrain |
24 |
|
|
|
25 |
$this->inlineScript()->appendFile('https://maps.googleapis.com/maps/api/js?key=' . $google_map_key . '&libraries=places');
|
|
|
26 |
|
|
|
27 |
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
|
|
|
28 |
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
|
|
|
29 |
|
|
|
30 |
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
|
|
|
34 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.css'));
|
|
|
35 |
|
|
|
36 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
|
|
|
37 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
|
|
|
38 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
|
|
|
39 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
|
|
|
40 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fas/theme.js'));
|
|
|
41 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.js'));
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
|
|
|
45 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
|
|
|
46 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
|
|
|
51 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
|
|
|
52 |
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.min.js'));
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.min.js'));
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
14527 |
stevensc |
59 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
|
|
|
60 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
|
|
|
61 |
|
|
|
62 |
|
8525 |
stevensc |
63 |
|
5743 |
stevensc |
64 |
|
1 |
www |
65 |
|
16822 |
efrain |
66 |
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
|
|
|
67 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
|
|
|
68 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
|
|
|
69 |
|
|
|
70 |
$this->inlineScript()->captureStart();
|
|
|
71 |
echo <<<JS
|
|
|
72 |
jQuery( document ).ready(function( $ ) {
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
$.validator.addMethod('greaterThan', function (value, element, param) {
|
|
|
77 |
var otherElement = $(param);
|
|
|
78 |
return parseInt(value, 10) > parseInt(otherElement.val(), 10);
|
|
|
79 |
}, 'ERROR_INVALID_MINIMUM');
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
$.validator.addMethod('checkLocation', function (value, element, param) {
|
|
|
83 |
var otherElement = $(param);
|
|
|
84 |
return $.trim(otherElement.val()).length > 0;
|
|
|
85 |
}, 'ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY');
|
|
|
86 |
|
|
|
87 |
var autocompleteLocation = new google.maps.places.Autocomplete(
|
|
|
88 |
(document.getElementById('location_search')),
|
|
|
89 |
{types: ['(cities)']}
|
|
|
90 |
);
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
$.fn.fillInAddressLocation = function() {
|
|
|
97 |
console.log('fillInAddressLocation');
|
|
|
98 |
|
|
|
99 |
var place = autocompleteLocation.getPlace();
|
|
|
100 |
if (!place.geometry) {
|
|
|
101 |
$.fn.showError('ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY')
|
|
|
102 |
return;
|
|
|
103 |
} else {
|
|
|
104 |
address1 = '';
|
|
|
105 |
address2 = '';
|
|
|
106 |
city1 = '';
|
|
|
107 |
city2 = '';
|
|
|
108 |
state = '';
|
|
|
109 |
country = '';
|
|
|
110 |
postal_code = '';
|
|
|
111 |
|
|
|
112 |
formatted_address = place.formatted_address;
|
|
|
113 |
latitude = place.geometry.location.lat();
|
|
|
114 |
longitude = place.geometry.location.lng();
|
|
|
115 |
var arrAddress = place.address_components;
|
|
|
116 |
|
|
|
117 |
$.each(arrAddress, function(i, address_component) {
|
|
|
118 |
if (address_component.types[0] == "route") {
|
|
|
119 |
address1 = address_component.long_name;
|
|
|
120 |
}
|
|
|
121 |
if (address_component.types[0] == "sublocality") {
|
|
|
122 |
address2 = address_component.long_name;
|
|
|
123 |
}
|
|
|
124 |
if (address_component.types[0] == "locality") {
|
|
|
125 |
city1 = address_component.long_name;
|
|
|
126 |
}
|
|
|
127 |
if (address_component.types[0] == "administrative_area_level_2") {
|
|
|
128 |
city2 = address_component.long_name;
|
|
|
129 |
}
|
|
|
130 |
if (address_component.types[0] == "administrative_area_level_1") {
|
|
|
131 |
state = address_component.long_name;
|
|
|
132 |
}
|
|
|
133 |
if (address_component.types[0] == "country") {
|
|
|
134 |
country = address_component.long_name;
|
|
|
135 |
}
|
|
|
136 |
if (address_component.types[0] == "postal_code") {
|
|
|
137 |
postal_code = address_component.long_name;
|
|
|
138 |
}
|
|
|
139 |
});
|
|
|
140 |
|
|
|
141 |
$('#form-location #formatted_address').val(formatted_address);
|
|
|
142 |
$('#form-location #address1').val(address1);
|
|
|
143 |
$('#form-location #address2').val(address2);
|
|
|
144 |
$('#form-location #city1').val(city1);
|
|
|
145 |
$('#form-location #city2').val(city2);
|
|
|
146 |
$('#form-location #state').val(state);
|
|
|
147 |
$('#form-location #country').val(country);
|
|
|
148 |
$('#form-location #postal_code').val(postal_code);
|
|
|
149 |
$('#form-location #latitude').val(latitude);
|
|
|
150 |
$('#form-location #longitude').val(longitude);
|
|
|
151 |
|
|
|
152 |
}
|
5743 |
stevensc |
153 |
}
|
16822 |
efrain |
154 |
$.fn.renderLocation = function(data) {
|
|
|
155 |
$('#locations-records').empty();
|
|
|
156 |
if(Array.isArray(data)) {
|
|
|
157 |
max = data.length;
|
|
|
158 |
for(i = 0; i < max; i++)
|
|
|
159 |
{
|
|
|
160 |
var location = data[i];
|
|
|
161 |
s = '<p>' + location['formatted_address'];
|
|
|
162 |
if(location['is_main'] == 'y') {
|
|
|
163 |
s = s + ' (LABEL_MAIN_LOCATION) ';
|
|
|
164 |
}
|
|
|
165 |
s = s + ' <a href="#" title="" data-link="' + location['link_edit'] + '" class="btn-location-edit"><i class="fa fa-pencil"></i></a> ';
|
|
|
166 |
s = s + ' <a href="#" title="" data-link="' + location['link_delete'] + '" class="btn-location-delete"><i class="fa fa-trash"></i></a>';
|
|
|
167 |
s = s + ' </p>';
|
777 |
geraldo |
168 |
|
16822 |
efrain |
169 |
if(i < (max - 1)) {
|
|
|
170 |
s = s + '<hr/>';
|
|
|
171 |
}
|
|
|
172 |
$('#locations-records').append(s);
|
|
|
173 |
}
|
|
|
174 |
}
|
5743 |
stevensc |
175 |
}
|
777 |
geraldo |
176 |
|
16822 |
efrain |
177 |
|
|
|
178 |
|
|
|
179 |
$.validator.setDefaults({
|
|
|
180 |
debug: true,
|
|
|
181 |
highlight: function(element) {
|
|
|
182 |
$(element).addClass('is-invalid');
|
|
|
183 |
},
|
|
|
184 |
unhighlight: function(element) {
|
|
|
185 |
$(element).removeClass('is-invalid');
|
|
|
186 |
},
|
|
|
187 |
errorElement: 'span',
|
|
|
188 |
errorClass: 'error invalid-feedback',
|
|
|
189 |
errorPlacement: function(error, element) {
|
|
|
190 |
if(element.parent('.form-group').length) {
|
|
|
191 |
error.insertAfter(element);
|
|
|
192 |
} else if(element.parent('.toggle').length) {
|
|
|
193 |
error.insertAfter(element.parent().parent());
|
|
|
194 |
} else {
|
|
|
195 |
error.insertAfter(element.parent());
|
|
|
196 |
}
|
|
|
197 |
}
|
|
|
198 |
});
|
|
|
199 |
|
|
|
200 |
|
|
|
201 |
$.fn.showFormErrorValidator = function(fieldname, errors) {
|
|
|
202 |
var field = $(fieldname);
|
|
|
203 |
if(field) {
|
|
|
204 |
$(field).addClass('is-invalid');
|
|
|
205 |
|
|
|
206 |
|
|
|
207 |
var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
|
|
|
208 |
if(field.parent('.form-group').length) {
|
|
|
209 |
error.insertAfter(field);
|
|
|
210 |
} else if(field.parent('.toggle').length) {
|
|
|
211 |
error.insertAfter(field.parent().parent());
|
|
|
212 |
} else {
|
|
|
213 |
error.insertAfter(field.parent());
|
|
|
214 |
}
|
|
|
215 |
}
|
|
|
216 |
};
|
|
|
217 |
|
|
|
218 |
|
|
|
219 |
|
|
|
220 |
|
|
|
221 |
var validatorLocation = $('#form-location').validate({
|
|
|
222 |
debug: true,
|
|
|
223 |
onclick: false,
|
|
|
224 |
onkeyup: false,
|
|
|
225 |
onfocusout: false,
|
|
|
226 |
ignore: [],
|
|
|
227 |
rules: {
|
|
|
228 |
'location_search': {
|
|
|
229 |
required: true,
|
|
|
230 |
checkLocation: '#form-location #latitude'
|
|
|
231 |
}
|
|
|
232 |
},
|
|
|
233 |
submitHandler: function(form)
|
|
|
234 |
{
|
|
|
235 |
NProgress.start();
|
|
|
236 |
$.ajax({
|
|
|
237 |
'dataType' : 'json',
|
|
|
238 |
'accept' : 'application/json',
|
|
|
239 |
'method' : 'post',
|
|
|
240 |
'url' : $('#form-location').attr('action'),
|
|
|
241 |
'data' : $('#form-location').serialize(),
|
|
|
242 |
}).done(function(response) {
|
|
|
243 |
if(response['success']) {
|
|
|
244 |
$.fn.renderLocation(response['data']);
|
|
|
245 |
|
|
|
246 |
$("#location-box").modal('hide');
|
|
|
247 |
} else {
|
|
|
248 |
validatorLocation.resetForm();
|
|
|
249 |
$.fn.showError(response['data']);
|
|
|
250 |
}
|
|
|
251 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
252 |
$.fn.showError(textStatus);
|
|
|
253 |
}).always(function() {
|
|
|
254 |
NProgress.done();
|
|
|
255 |
});
|
|
|
256 |
return false;
|
|
|
257 |
},
|
|
|
258 |
invalidHandler: function(form, validator) {
|
|
|
259 |
|
|
|
260 |
}
|
|
|
261 |
});
|
|
|
262 |
|
|
|
263 |
$('.btn-location-add').on("click", function(e){
|
|
|
264 |
e.preventDefault();
|
|
|
265 |
|
|
|
266 |
$('#form-location').attr('action', '$routeLocationAdd');
|
|
|
267 |
$('#form-location #location_search').val('');
|
|
|
268 |
$('#form-location #formatted_address').val('');
|
|
|
269 |
$('#form-location #address1').val('');
|
|
|
270 |
$('#form-location #address2').val('');
|
|
|
271 |
$('#form-location #country').val('');
|
|
|
272 |
$('#form-location #state').val('');
|
|
|
273 |
$('#form-location #city1').val('');
|
|
|
274 |
$('#form-location #city2').val('');
|
|
|
275 |
$('#form-location #postal_code').val('');
|
|
|
276 |
$('#form-location #latitude').val('');
|
|
|
277 |
$('#form-location #longitude').val('');
|
|
|
278 |
validatorLocation.resetForm();
|
|
|
279 |
|
|
|
280 |
$("#location-box").modal('show');
|
|
|
281 |
});
|
|
|
282 |
|
|
|
283 |
$('body').on('click', 'a.btn-location-edit', function(e) {
|
|
|
284 |
e.preventDefault();
|
|
|
285 |
|
|
|
286 |
var url = $(this).data('link');
|
|
|
287 |
|
|
|
288 |
NProgress.start();
|
|
|
289 |
$.ajax({
|
|
|
290 |
'dataType' : 'json',
|
|
|
291 |
'accept' : 'application/json',
|
|
|
292 |
'method' : 'get',
|
|
|
293 |
'url' : url,
|
|
|
294 |
}).done(function(response) {
|
|
|
295 |
if(response['success']) {
|
|
|
296 |
$('#form-location').attr('action', url);
|
|
|
297 |
$('#form-location #location_search').val(response['data']['formatted_address']);
|
|
|
298 |
$('#form-location #formatted_address').val(response['data']['formatted_address']);
|
|
|
299 |
$('#form-location #address1').val(response['data']['address1']);
|
|
|
300 |
$('#form-location #address2').val(response['data']['address2']);
|
|
|
301 |
$('#form-location #country').val(response['data']['country']);
|
|
|
302 |
$('#form-location #state').val(response['data']['state']);
|
|
|
303 |
$('#form-location #city1').val(response['data']['city1']);
|
|
|
304 |
$('#form-location #city2').val(response['data']['city2']);
|
|
|
305 |
$('#form-location #postal_code').val(response['data']['postal_code']);
|
|
|
306 |
$('#form-location #latitude').val(response['data']['latitude']);
|
|
|
307 |
$('#form-location #longitude').val(response['data']['longitude']);
|
|
|
308 |
|
|
|
309 |
if(response['data']['is_main'] == 'y') {
|
|
|
310 |
$('#form-location #is_main').bootstrapToggle('on')
|
|
|
311 |
} else {
|
|
|
312 |
$('#form-location #is_main').bootstrapToggle('off')
|
|
|
313 |
}
|
|
|
314 |
|
|
|
315 |
validatorLocation.resetForm();
|
|
|
316 |
|
|
|
317 |
$("#location-box").modal('show');
|
|
|
318 |
} else {
|
|
|
319 |
$.fn.showError(response['data']);
|
|
|
320 |
}
|
|
|
321 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
322 |
$.fn.showError(textStatus);
|
|
|
323 |
}).always(function() {
|
|
|
324 |
NProgress.done();
|
|
|
325 |
});
|
|
|
326 |
return false;
|
|
|
327 |
|
|
|
328 |
|
|
|
329 |
});
|
|
|
330 |
|
|
|
331 |
$('body').on('click', 'a.btn-location-delete', function(e) {
|
|
|
332 |
e.preventDefault();
|
|
|
333 |
|
|
|
334 |
var url = $(this).data('link');
|
|
|
335 |
|
|
|
336 |
NProgress.start();
|
|
|
337 |
$.ajax({
|
|
|
338 |
'dataType' : 'json',
|
|
|
339 |
'accept' : 'application/json',
|
|
|
340 |
'method' : 'post',
|
|
|
341 |
'url' : url,
|
|
|
342 |
}).done(function(response) {
|
|
|
343 |
if(response['success']) {
|
|
|
344 |
$.fn.renderLocation(response['data']);
|
|
|
345 |
} else {
|
|
|
346 |
$.fn.showError(response['data']);
|
|
|
347 |
}
|
|
|
348 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
349 |
$.fn.showError(textStatus);
|
|
|
350 |
}).always(function() {
|
|
|
351 |
NProgress.done();
|
|
|
352 |
});
|
|
|
353 |
return false;
|
|
|
354 |
|
|
|
355 |
|
|
|
356 |
});
|
|
|
357 |
|
|
|
358 |
|
|
|
359 |
$('.btn-location-close').on("click", function(e){
|
|
|
360 |
e.preventDefault();
|
|
|
361 |
|
|
|
362 |
$("#location-box").modal('hide');
|
|
|
363 |
return false;
|
|
|
364 |
});
|
|
|
365 |
|
|
|
366 |
var validatorSocialNetwork = $('#form-social-network').validate({
|
|
|
367 |
debug: true,
|
|
|
368 |
onclick: false,
|
|
|
369 |
onkeyup: false,
|
|
|
370 |
ignore: [],
|
|
|
371 |
rules: {
|
|
|
372 |
'facebook': {
|
|
|
373 |
required: false,
|
|
|
374 |
maxlength: 250,
|
|
|
375 |
url: true,
|
|
|
376 |
},
|
|
|
377 |
'twitter': {
|
|
|
378 |
required: false,
|
|
|
379 |
maxlength: 250,
|
|
|
380 |
url: true,
|
|
|
381 |
},
|
|
|
382 |
'instagram': {
|
|
|
383 |
required: false,
|
|
|
384 |
maxlength: 250,
|
|
|
385 |
url: true,
|
|
|
386 |
},
|
|
|
387 |
},
|
|
|
388 |
|
|
|
389 |
submitHandler: function(form)
|
|
|
390 |
{
|
|
|
391 |
NProgress.start();
|
|
|
392 |
$.ajax({
|
|
|
393 |
'dataType' : 'json',
|
|
|
394 |
'accept' : 'application/json',
|
|
|
395 |
'method' : 'post',
|
|
|
396 |
'url' : $('#form-social-network').attr('action'),
|
|
|
397 |
'data' : $('#form-social-network').serialize()
|
|
|
398 |
}).done(function(response) {
|
|
|
399 |
if(response['success']) {
|
|
|
400 |
|
|
|
401 |
$('#social-networks').empty();
|
|
|
402 |
var s = $.trim(response['data']['facebook']);
|
|
|
403 |
if(s.length > 32) {
|
|
|
404 |
s = s.substring(0, 31) + '...'
|
|
|
405 |
}
|
|
|
406 |
$('#social-networks').append('<li><a href="' + response['data']['facebook'] + '" target="_blank" title="">' +
|
|
|
407 |
'<i class="fa fa-facebook-square"></i> ' + s + '</a></li>');
|
|
|
408 |
|
|
|
409 |
var s = $.trim(response['data']['twitter']);
|
|
|
410 |
if(s.length > 32) {
|
|
|
411 |
s = s.substring(0, 31) + '...'
|
|
|
412 |
}
|
|
|
413 |
$('#social-networks').append('<li><a href="' + response['data']['twitter'] + '" target="_blank" title="">' +
|
|
|
414 |
'<i class="fa fa-twitter"></i> ' + s + '</a></li>');
|
|
|
415 |
|
|
|
416 |
var s = $.trim(response['data']['instagram']);
|
|
|
417 |
if(s.length > 32) {
|
|
|
418 |
s = s.substring(0, 31) + '...'
|
|
|
419 |
}
|
|
|
420 |
$('#social-networks').append('<li><a href="' + response['data']['instagram'] + '" target="_blank" title="">' +
|
|
|
421 |
'<i class="fa fa-instagram"></i> ' + s + '</a></li>');
|
|
|
422 |
|
|
|
423 |
$("#social-networks-box").modal('hide');
|
|
|
424 |
} else {
|
|
|
425 |
validatorSocialNetwork.resetForm();
|
|
|
426 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
427 |
$.fn.showError(response['data']);
|
|
|
428 |
} else {
|
|
|
429 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
430 |
$.fn.showFormErrorValidator('#form-social-network #' + fieldname, errors);
|
|
|
431 |
});
|
|
|
432 |
}
|
|
|
433 |
}
|
|
|
434 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
435 |
$.fn.showError(textStatus);
|
|
|
436 |
}).always(function() {
|
|
|
437 |
NProgress.done();
|
|
|
438 |
});
|
|
|
439 |
return false;
|
|
|
440 |
},
|
|
|
441 |
invalidHandler: function(form, validator) {
|
|
|
442 |
|
|
|
443 |
}
|
|
|
444 |
});
|
|
|
445 |
|
|
|
446 |
|
|
|
447 |
|
|
|
448 |
$('.btn-social-network-edit').on("click", function(e){
|
|
|
449 |
e.preventDefault();
|
|
|
450 |
|
|
|
451 |
NProgress.start();
|
|
|
452 |
$.ajax({
|
|
|
453 |
'dataType' : 'json',
|
|
|
454 |
'accept' : 'application/json',
|
|
|
455 |
'method' : 'get',
|
|
|
456 |
'url' : '$routeSocialNetworks',
|
|
|
457 |
}).done(function(response) {
|
|
|
458 |
if(response['success']) {
|
|
|
459 |
$('#form-social-network #facebook').val(response['data']['facebook']);
|
|
|
460 |
$('#form-social-network #twitter').val(response['data']['twitter']);
|
|
|
461 |
$('#form-social-network #instagram').val(response['data']['instagram']);
|
|
|
462 |
validatorSocialNetwork.resetForm();
|
|
|
463 |
|
|
|
464 |
$("#social-networks-box").modal('show');
|
|
|
465 |
} else {
|
|
|
466 |
$.fn.showError(response['data']);
|
|
|
467 |
}
|
|
|
468 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
469 |
$.fn.showError(textStatus);
|
|
|
470 |
}).always(function() {
|
|
|
471 |
NProgress.done();
|
|
|
472 |
});
|
|
|
473 |
return false;
|
|
|
474 |
|
|
|
475 |
});
|
|
|
476 |
|
|
|
477 |
$('.btn-social-network-close').on("click", function(e){
|
|
|
478 |
e.preventDefault();
|
|
|
479 |
|
|
|
480 |
$("#social-networks-box").modal('hide');
|
|
|
481 |
return false;
|
|
|
482 |
});
|
|
|
483 |
|
|
|
484 |
|
|
|
485 |
var validatorExtended = $('#form-extended').validate({
|
|
|
486 |
debug: true,
|
|
|
487 |
onclick: false,
|
|
|
488 |
onkeyup: false,
|
|
|
489 |
onfocusout: false,
|
|
|
490 |
ignore: [],
|
|
|
491 |
rules: {
|
|
|
492 |
'description': {
|
|
|
493 |
updateCkeditor:function() {
|
|
|
494 |
CKEDITOR.instances.description.updateElement();
|
|
|
495 |
},
|
|
|
496 |
required: false,
|
|
|
497 |
},
|
|
|
498 |
},
|
|
|
499 |
|
|
|
500 |
submitHandler: function(form)
|
|
|
501 |
{
|
|
|
502 |
NProgress.start();
|
|
|
503 |
$.ajax({
|
|
|
504 |
'dataType' : 'json',
|
|
|
505 |
'accept' : 'application/json',
|
|
|
506 |
'method' : 'post',
|
|
|
507 |
'url' : $('#form-extended').attr('action'),
|
|
|
508 |
'data' : $('#form-extended').serialize()
|
|
|
509 |
}).done(function(response) {
|
|
|
510 |
if(response['success']) {
|
|
|
511 |
|
|
|
512 |
$('#overview-description').html(response['data']['description']);
|
|
|
513 |
$("#extended-box").modal('hide');
|
|
|
514 |
} else {
|
|
|
515 |
validatorExtended.resetForm();
|
|
|
516 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
517 |
$.fn.showError(response['data']);
|
|
|
518 |
} else {
|
|
|
519 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
520 |
$.fn.showFormErrorValidator('#form-extended #' + fieldname, errors);
|
|
|
521 |
});
|
|
|
522 |
}
|
|
|
523 |
}
|
|
|
524 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
525 |
$.fn.showError(textStatus);
|
|
|
526 |
}).always(function() {
|
|
|
527 |
NProgress.done();
|
|
|
528 |
});
|
|
|
529 |
return false;
|
|
|
530 |
},
|
|
|
531 |
invalidHandler: function(form, validator) {
|
|
|
532 |
|
|
|
533 |
}
|
|
|
534 |
});
|
|
|
535 |
|
|
|
536 |
|
|
|
537 |
$('.btn-extended-edit').on("click", function(e){
|
|
|
538 |
e.preventDefault();
|
|
|
539 |
|
|
|
540 |
NProgress.start();
|
|
|
541 |
$.ajax({
|
|
|
542 |
'dataType' : 'json',
|
|
|
543 |
'accept' : 'application/json',
|
|
|
544 |
'method' : 'get',
|
|
|
545 |
'url' : '$routeExtended',
|
|
|
546 |
}).done(function(response) {
|
|
|
547 |
if(response['success']) {
|
|
|
548 |
CKEDITOR.instances.description.setData(response['data']['description']);
|
|
|
549 |
validatorExtended.resetForm();
|
|
|
550 |
|
|
|
551 |
$("#extended-box").modal('show');
|
|
|
552 |
} else {
|
|
|
553 |
$.fn.showError(response['data']);
|
|
|
554 |
}
|
|
|
555 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
556 |
$.fn.showError(textStatus);
|
|
|
557 |
}).always(function() {
|
|
|
558 |
NProgress.done();
|
|
|
559 |
});
|
|
|
560 |
return false;
|
|
|
561 |
|
|
|
562 |
});
|
|
|
563 |
|
|
|
564 |
$('.btn-extended-close').on("click", function(e){
|
|
|
565 |
e.preventDefault();
|
|
|
566 |
|
|
|
567 |
$("#extended-box").modal('hide');
|
|
|
568 |
return false;
|
|
|
569 |
});
|
|
|
570 |
|
|
|
571 |
|
|
|
572 |
var validatorWebsite = $('#form-website').validate({
|
|
|
573 |
debug: true,
|
|
|
574 |
onclick: false,
|
|
|
575 |
onkeyup: false,
|
|
|
576 |
onfocusout: false,
|
|
|
577 |
ignore: [],
|
|
|
578 |
rules: {
|
|
|
579 |
'website': {
|
|
|
580 |
required: false,
|
|
|
581 |
maxlength: 250,
|
|
|
582 |
url: true,
|
|
|
583 |
},
|
|
|
584 |
},
|
|
|
585 |
|
|
|
586 |
submitHandler: function(form)
|
|
|
587 |
{
|
|
|
588 |
NProgress.start();
|
|
|
589 |
$.ajax({
|
|
|
590 |
'dataType' : 'json',
|
|
|
591 |
'accept' : 'application/json',
|
|
|
592 |
'method' : 'post',
|
|
|
593 |
'url' : $('#form-website').attr('action'),
|
|
|
594 |
'data' : $('#form-website').serialize()
|
|
|
595 |
}).done(function(response) {
|
|
|
596 |
if(response['success']) {
|
|
|
597 |
|
|
|
598 |
$('#overview-website').html(response['data']['website']);
|
|
|
599 |
$("#website-box").modal('hide');
|
|
|
600 |
} else {
|
|
|
601 |
validatorWebsite.resetForm();
|
|
|
602 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
603 |
$.fn.showError(response['data']);
|
|
|
604 |
} else {
|
|
|
605 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
606 |
$.fn.showFormErrorValidator('#form-website #' + fieldname, errors);
|
|
|
607 |
});
|
|
|
608 |
}
|
|
|
609 |
}
|
|
|
610 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
611 |
$.fn.showError(textStatus);
|
|
|
612 |
}).always(function() {
|
|
|
613 |
NProgress.done();
|
|
|
614 |
});
|
|
|
615 |
return false;
|
|
|
616 |
},
|
|
|
617 |
invalidHandler: function(form, validator) {
|
|
|
618 |
|
|
|
619 |
}
|
|
|
620 |
});
|
|
|
621 |
|
|
|
622 |
|
|
|
623 |
$('.btn-website-edit').on("click", function(e){
|
|
|
624 |
e.preventDefault();
|
|
|
625 |
|
|
|
626 |
NProgress.start();
|
|
|
627 |
$.ajax({
|
|
|
628 |
'dataType' : 'json',
|
|
|
629 |
'accept' : 'application/json',
|
|
|
630 |
'method' : 'get',
|
|
|
631 |
'url' : '$routeWebsite',
|
|
|
632 |
}).done(function(response) {
|
|
|
633 |
if(response['success']) {
|
|
|
634 |
$('#form-website #website').val(response['data']['website']);
|
|
|
635 |
validatorWebsite.resetForm();
|
|
|
636 |
|
|
|
637 |
$("#website-box").modal('show');
|
|
|
638 |
} else {
|
|
|
639 |
$.fn.showError(response['data']);
|
|
|
640 |
}
|
|
|
641 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
642 |
$.fn.showError(textStatus);
|
|
|
643 |
}).always(function() {
|
|
|
644 |
NProgress.done();
|
|
|
645 |
});
|
|
|
646 |
return false;
|
|
|
647 |
|
|
|
648 |
});
|
|
|
649 |
|
|
|
650 |
$('.btn-website-close').on("click", function(e){
|
|
|
651 |
e.preventDefault();
|
|
|
652 |
|
|
|
653 |
$("#website-box").modal('hide');
|
|
|
654 |
return false;
|
|
|
655 |
});
|
|
|
656 |
|
|
|
657 |
var validatorFoundationYear = $('#form-foundation-year').validate({
|
|
|
658 |
debug: true,
|
|
|
659 |
onclick: false,
|
|
|
660 |
onkeyup: false,
|
|
|
661 |
onfocusout: false,
|
|
|
662 |
ignore: [],
|
|
|
663 |
rules: {
|
|
|
664 |
'foundation_year': {
|
|
|
665 |
required: true,
|
|
|
666 |
maxlength: 4,
|
|
|
667 |
digits: true,
|
|
|
668 |
},
|
|
|
669 |
},
|
|
|
670 |
|
|
|
671 |
submitHandler: function(form)
|
|
|
672 |
{
|
|
|
673 |
NProgress.start();
|
|
|
674 |
$.ajax({
|
|
|
675 |
'dataType' : 'json',
|
|
|
676 |
'accept' : 'application/json',
|
|
|
677 |
'method' : 'post',
|
|
|
678 |
'url' : $('#form-foundation-year').attr('action'),
|
|
|
679 |
'data' : $('#form-foundation-year').serialize()
|
|
|
680 |
}).done(function(response) {
|
|
|
681 |
if(response['success']) {
|
|
|
682 |
|
|
|
683 |
$('#overview-foundation-year').html(response['data']['foundation_year']);
|
|
|
684 |
$("#foundation-year-box").modal('hide');
|
|
|
685 |
} else {
|
|
|
686 |
validatorFoundationYear.resetForm();
|
|
|
687 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
688 |
$.fn.showError(response['data']);
|
|
|
689 |
} else {
|
|
|
690 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
691 |
$.fn.showFormErrorValidator('#form-foundation-year #' + fieldname, errors);
|
|
|
692 |
});
|
|
|
693 |
}
|
|
|
694 |
}
|
|
|
695 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
696 |
$.fn.showError(textStatus);
|
|
|
697 |
}).always(function() {
|
|
|
698 |
NProgress.done();
|
|
|
699 |
});
|
|
|
700 |
return false;
|
|
|
701 |
},
|
|
|
702 |
invalidHandler: function(form, validator) {
|
|
|
703 |
|
|
|
704 |
}
|
|
|
705 |
});
|
|
|
706 |
|
|
|
707 |
|
|
|
708 |
$('.btn-foundation-year-edit').on("click", function(e){
|
|
|
709 |
e.preventDefault();
|
|
|
710 |
|
|
|
711 |
NProgress.start();
|
|
|
712 |
$.ajax({
|
|
|
713 |
'dataType' : 'json',
|
|
|
714 |
'accept' : 'application/json',
|
|
|
715 |
'method' : 'get',
|
|
|
716 |
'url' : '$routeFoundationYear',
|
|
|
717 |
}).done(function(response) {
|
|
|
718 |
if(response['success']) {
|
|
|
719 |
$('#form-foundation-year #foundation_year').val(response['data']['foundation_year'])
|
|
|
720 |
|
|
|
721 |
validatorFoundationYear.resetForm();
|
|
|
722 |
|
|
|
723 |
$("#foundation-year-box").modal('show');
|
|
|
724 |
} else {
|
|
|
725 |
$.fn.showError(response['data']);
|
|
|
726 |
}
|
|
|
727 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
728 |
$.fn.showError(textStatus);
|
|
|
729 |
}).always(function() {
|
|
|
730 |
NProgress.done();
|
|
|
731 |
});
|
|
|
732 |
return false;
|
|
|
733 |
|
|
|
734 |
});
|
|
|
735 |
|
|
|
736 |
$('.btn-fondation-year-close').on("click", function(e){
|
|
|
737 |
e.preventDefault();
|
|
|
738 |
|
|
|
739 |
$("#foundation-year-box").modal('hide');
|
|
|
740 |
return false;
|
|
|
741 |
});
|
|
|
742 |
|
|
|
743 |
var validatorCompanySize = $('#form-company-size').validate({
|
|
|
744 |
debug: true,
|
|
|
745 |
onclick: false,
|
|
|
746 |
onkeyup: false,
|
|
|
747 |
onfocusout: false,
|
|
|
748 |
ignore: [],
|
|
|
749 |
rules: {
|
|
|
750 |
'company_size_id': {
|
|
|
751 |
required: true,
|
|
|
752 |
},
|
|
|
753 |
},
|
|
|
754 |
|
|
|
755 |
submitHandler: function(form)
|
|
|
756 |
{
|
|
|
757 |
NProgress.start();
|
|
|
758 |
$.ajax({
|
|
|
759 |
'dataType' : 'json',
|
|
|
760 |
'accept' : 'application/json',
|
|
|
761 |
'method' : 'post',
|
|
|
762 |
'url' : $('#form-company-size').attr('action'),
|
|
|
763 |
'data' : $('#form-company-size').serialize()
|
|
|
764 |
}).done(function(response) {
|
|
|
765 |
if(response['success']) {
|
|
|
766 |
|
|
|
767 |
$('#overview-company-size').html(response['data']);
|
|
|
768 |
$("#company-size-box").modal('hide');
|
|
|
769 |
} else {
|
|
|
770 |
validatorCompanySize.resetForm();
|
|
|
771 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
772 |
$.fn.showError(response['data']);
|
|
|
773 |
} else {
|
|
|
774 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
775 |
$.fn.showFormErrorValidator('#form-company-size #' + fieldname, errors);
|
|
|
776 |
});
|
|
|
777 |
}
|
|
|
778 |
}
|
|
|
779 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
780 |
$.fn.showError(textStatus);
|
|
|
781 |
}).always(function() {
|
|
|
782 |
NProgress.done();
|
|
|
783 |
});
|
|
|
784 |
return false;
|
|
|
785 |
},
|
|
|
786 |
invalidHandler: function(form, validator) {
|
|
|
787 |
|
|
|
788 |
}
|
|
|
789 |
});
|
|
|
790 |
|
|
|
791 |
|
|
|
792 |
$('.btn-company-size-edit').on("click", function(e){
|
|
|
793 |
e.preventDefault();
|
|
|
794 |
|
|
|
795 |
NProgress.start();
|
|
|
796 |
$.ajax({
|
|
|
797 |
'dataType' : 'json',
|
|
|
798 |
'accept' : 'application/json',
|
|
|
799 |
'method' : 'get',
|
|
|
800 |
'url' : '$routeCompanySize',
|
|
|
801 |
}).done(function(response) {
|
|
|
802 |
if(response['success']) {
|
|
|
803 |
$('#form-company-size #company_size_id').val(response['data']['company_size_id']).trigger('change');
|
|
|
804 |
|
|
|
805 |
validatorCompanySize.resetForm();
|
|
|
806 |
|
|
|
807 |
$("#company-size-box").modal('show');
|
|
|
808 |
} else {
|
|
|
809 |
$.fn.showError(response['data']);
|
|
|
810 |
}
|
|
|
811 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
812 |
$.fn.showError(textStatus);
|
|
|
813 |
}).always(function() {
|
|
|
814 |
NProgress.done();
|
|
|
815 |
});
|
|
|
816 |
return false;
|
|
|
817 |
|
|
|
818 |
});
|
|
|
819 |
|
|
|
820 |
$('.btn-company-size-close').on("click", function(e){
|
|
|
821 |
e.preventDefault();
|
|
|
822 |
|
|
|
823 |
$("#company-size-box").modal('hide');
|
|
|
824 |
return false;
|
|
|
825 |
});
|
|
|
826 |
|
|
|
827 |
var validatorIndustry = $('#form-industry').validate({
|
|
|
828 |
debug: true,
|
|
|
829 |
onclick: false,
|
|
|
830 |
onkeyup: false,
|
|
|
831 |
onfocusout: false,
|
|
|
832 |
ignore: [],
|
|
|
833 |
rules: {
|
|
|
834 |
'industry_id': {
|
|
|
835 |
required: true,
|
|
|
836 |
},
|
|
|
837 |
},
|
|
|
838 |
|
|
|
839 |
submitHandler: function(form)
|
|
|
840 |
{
|
|
|
841 |
NProgress.start();
|
|
|
842 |
$.ajax({
|
|
|
843 |
'dataType' : 'json',
|
|
|
844 |
'accept' : 'application/json',
|
|
|
845 |
'method' : 'post',
|
|
|
846 |
'url' : $('#form-industry').attr('action'),
|
|
|
847 |
'data' : $('#form-industry').serialize()
|
|
|
848 |
}).done(function(response) {
|
|
|
849 |
if(response['success']) {
|
|
|
850 |
|
|
|
851 |
$('#overview-industry').html(response['data']);
|
|
|
852 |
$("#industry-box").modal('hide');
|
|
|
853 |
} else {
|
|
|
854 |
validatorIndustry.resetForm();
|
|
|
855 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
856 |
$.fn.showError(response['data']);
|
|
|
857 |
} else {
|
|
|
858 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
859 |
$.fn.showFormErrorValidator('#form-industry #' + fieldname, errors);
|
|
|
860 |
});
|
|
|
861 |
}
|
|
|
862 |
}
|
|
|
863 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
864 |
$.fn.showError(textStatus);
|
|
|
865 |
}).always(function() {
|
|
|
866 |
NProgress.done();
|
|
|
867 |
});
|
|
|
868 |
return false;
|
|
|
869 |
},
|
|
|
870 |
invalidHandler: function(form, validator) {
|
|
|
871 |
|
|
|
872 |
}
|
|
|
873 |
});
|
|
|
874 |
|
|
|
875 |
|
|
|
876 |
$('.btn-industry-edit').on("click", function(e){
|
|
|
877 |
e.preventDefault();
|
|
|
878 |
|
|
|
879 |
NProgress.start();
|
|
|
880 |
$.ajax({
|
|
|
881 |
'dataType' : 'json',
|
|
|
882 |
'accept' : 'application/json',
|
|
|
883 |
'method' : 'get',
|
|
|
884 |
'url' : '$routeIndustry',
|
|
|
885 |
}).done(function(response) {
|
|
|
886 |
if(response['success']) {
|
|
|
887 |
$('#form-industry #industry_id').val(response['data']['industry_id']).trigger('change');
|
|
|
888 |
|
|
|
889 |
validatorIndustry.resetForm();
|
|
|
890 |
|
|
|
891 |
$("#industry-box").modal('show');
|
|
|
892 |
} else {
|
|
|
893 |
$.fn.showError(response['data']);
|
|
|
894 |
}
|
|
|
895 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
896 |
$.fn.showError(textStatus);
|
|
|
897 |
}).always(function() {
|
|
|
898 |
NProgress.done();
|
|
|
899 |
});
|
|
|
900 |
return false;
|
|
|
901 |
|
|
|
902 |
});
|
|
|
903 |
|
|
|
904 |
$('.btn-industry-close').on("click", function(e){
|
|
|
905 |
e.preventDefault();
|
|
|
906 |
|
|
|
907 |
$("#industry-box").modal('hide');
|
|
|
908 |
return false;
|
|
|
909 |
});
|
|
|
910 |
|
|
|
911 |
|
|
|
912 |
|
|
|
913 |
|
|
|
914 |
var validatorImage = $('#form-image').validate({
|
|
|
915 |
debug: true,
|
|
|
916 |
onclick: false,
|
|
|
917 |
onkeyup: false,
|
|
|
918 |
onfocusout: false,
|
|
|
919 |
ignore: [],
|
|
|
920 |
rules: {
|
|
|
921 |
'image': {
|
|
|
922 |
required: true,
|
|
|
923 |
extension: 'jpg|jpeg|png',
|
|
|
924 |
accept: 'image/jpeg,image/png'
|
|
|
925 |
},
|
|
|
926 |
},
|
|
|
927 |
|
|
|
928 |
submitHandler: function(form)
|
|
|
929 |
{
|
|
|
930 |
var formdata = false;
|
|
|
931 |
if (window.FormData){
|
|
|
932 |
formdata = new FormData(form); //form[0]);
|
|
|
933 |
}
|
|
|
934 |
|
|
|
935 |
NProgress.start();
|
|
|
936 |
$.ajax({
|
|
|
937 |
'dataType' : 'json',
|
|
|
938 |
'accept' : 'application/json',
|
|
|
939 |
'method' : 'post',
|
|
|
940 |
'url' : $('#form-image').attr('action'),
|
|
|
941 |
'data' : formdata ? formdata : $('#form-image').serialize(),
|
|
|
942 |
'processData': false,
|
|
|
943 |
'contentType': false,
|
|
|
944 |
}).done(function(response) {
|
|
|
945 |
if(response['success']) {
|
|
|
946 |
$('#company-img').attr('src',response['data']);
|
|
|
947 |
$("#image-box").modal('hide');
|
|
|
948 |
} else {
|
|
|
949 |
validatorImage.resetForm();
|
|
|
950 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
951 |
$.fn.showError(response['data']);
|
|
|
952 |
} else {
|
|
|
953 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
954 |
console.log('#form-image #' + fieldname);
|
|
|
955 |
|
|
|
956 |
$.fn.showFormErrorValidator('#form-image #' + fieldname, errors);
|
|
|
957 |
});
|
|
|
958 |
}
|
|
|
959 |
}
|
|
|
960 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
961 |
$.fn.showError(textStatus);
|
|
|
962 |
}).always(function() {
|
|
|
963 |
NProgress.done();
|
|
|
964 |
});
|
|
|
965 |
return false;
|
|
|
966 |
},
|
|
|
967 |
invalidHandler: function(form, validator) {
|
|
|
968 |
|
|
|
969 |
}
|
|
|
970 |
});
|
|
|
971 |
|
|
|
972 |
$('.btn-image-open').on("click", function(e){
|
|
|
973 |
e.preventDefault();
|
|
|
974 |
$('#form-image #image').fileinput('reset');
|
|
|
975 |
$('#form-image #image').val('');
|
|
|
976 |
validatorImage.resetForm();
|
|
|
977 |
$("#image-box").modal('show');
|
|
|
978 |
return false;
|
|
|
979 |
});
|
|
|
980 |
|
|
|
981 |
$('.btn-image-close').on("click", function(e){
|
|
|
982 |
e.preventDefault();
|
|
|
983 |
|
|
|
984 |
$("#image-box").modal('hide');
|
|
|
985 |
return false;
|
|
|
986 |
});
|
|
|
987 |
|
|
|
988 |
$('.btn-image-explorer').on("click", function(e){
|
|
|
989 |
e.preventDefault();
|
|
|
990 |
|
|
|
991 |
$('#form-image #image').click();
|
|
|
992 |
return false;
|
|
|
993 |
});
|
|
|
994 |
|
|
|
995 |
|
|
|
996 |
var validatorCover = $('#form-cover').validate({
|
|
|
997 |
debug: true,
|
|
|
998 |
onclick: false,
|
|
|
999 |
onkeyup: false,
|
|
|
1000 |
onfocusout: false,
|
|
|
1001 |
ignore: [],
|
|
|
1002 |
rules: {
|
|
|
1003 |
'cover': {
|
|
|
1004 |
required: true,
|
|
|
1005 |
extension: 'jpg|jpeg|png',
|
|
|
1006 |
accept: 'image/jpeg,image/png'
|
|
|
1007 |
},
|
|
|
1008 |
},
|
|
|
1009 |
|
|
|
1010 |
submitHandler: function(form)
|
|
|
1011 |
{
|
|
|
1012 |
var formdata = false;
|
|
|
1013 |
if (window.FormData){
|
|
|
1014 |
formdata = new FormData(form); //form[0]);
|
|
|
1015 |
}
|
|
|
1016 |
|
|
|
1017 |
NProgress.start();
|
|
|
1018 |
$.ajax({
|
|
|
1019 |
'dataType' : 'json',
|
|
|
1020 |
'accept' : 'application/json',
|
|
|
1021 |
'method' : 'post',
|
|
|
1022 |
'url' : $('#form-cover').attr('action'),
|
|
|
1023 |
'data' : formdata ? formdata : $('#form-cover').serialize(),
|
|
|
1024 |
'processData': false,
|
|
|
1025 |
'contentType': false,
|
|
|
1026 |
}).done(function(response) {
|
|
|
1027 |
if(response['success']) {
|
|
|
1028 |
$('#user-cover-img').attr('src',response['data']);
|
|
|
1029 |
$("#cover-box").modal('hide');
|
|
|
1030 |
} else {
|
|
|
1031 |
validatorCover.resetForm();
|
|
|
1032 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
1033 |
$.fn.showError(response['data']);
|
|
|
1034 |
} else {
|
|
|
1035 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
1036 |
$.fn.showFormErrorValidator('#form-cover #' + fieldname, errors);
|
|
|
1037 |
});
|
|
|
1038 |
}
|
|
|
1039 |
}
|
|
|
1040 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
1041 |
$.fn.showError(textStatus);
|
|
|
1042 |
}).always(function() {
|
|
|
1043 |
NProgress.done();
|
|
|
1044 |
});
|
|
|
1045 |
return false;
|
|
|
1046 |
},
|
|
|
1047 |
invalidHandler: function(form, validator) {
|
|
|
1048 |
|
|
|
1049 |
}
|
|
|
1050 |
});
|
|
|
1051 |
|
|
|
1052 |
|
|
|
1053 |
$('.btn-cover-open').on("click", function(e){
|
|
|
1054 |
e.preventDefault();
|
|
|
1055 |
$('#form-cover #cover').fileinput('reset');
|
|
|
1056 |
$('#form-cover #cover').val('');
|
|
|
1057 |
validatorCover.resetForm();
|
|
|
1058 |
$("#cover-box").modal('show');
|
|
|
1059 |
return false;
|
|
|
1060 |
});
|
|
|
1061 |
|
|
|
1062 |
$('.btn-cover-close').on("click", function(e){
|
|
|
1063 |
e.preventDefault();
|
|
|
1064 |
|
|
|
1065 |
$("#cover-box").modal('hide');
|
|
|
1066 |
return false;
|
|
|
1067 |
});
|
|
|
1068 |
|
|
|
1069 |
$('.btn-cover-explorer').on("click", function(e){
|
|
|
1070 |
e.preventDefault();
|
|
|
1071 |
|
|
|
1072 |
$('#form-cover #cover').click();
|
|
|
1073 |
return false;
|
|
|
1074 |
});
|
|
|
1075 |
|
|
|
1076 |
$("#form-cover #cover").fileinput({
|
|
|
1077 |
theme: 'fas',
|
|
|
1078 |
language: 'es',
|
|
|
1079 |
showUpload: false,
|
|
|
1080 |
dropZoneEnabled: false,
|
|
|
1081 |
maxFileCount: 1,
|
|
|
1082 |
allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
|
|
|
1083 |
mainClass: "input-group",
|
|
|
1084 |
msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size_cover',
|
|
|
1085 |
});
|
|
|
1086 |
|
|
|
1087 |
$("#form-image #image").fileinput({
|
|
|
1088 |
theme: 'fas',
|
|
|
1089 |
language: 'es',
|
|
|
1090 |
showUpload: false,
|
|
|
1091 |
dropZoneEnabled: false,
|
|
|
1092 |
maxFileCount: 1,
|
|
|
1093 |
allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
|
|
|
1094 |
mainClass: "input-group",
|
|
|
1095 |
msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size_profile',
|
|
|
1096 |
});
|
|
|
1097 |
|
|
|
1098 |
$('#form-skill #skills').select2({
|
|
|
1099 |
theme: 'bootstrap4',
|
|
|
1100 |
width: '100%',
|
|
|
1101 |
placeholder: 'LABEL_SELECT_ONE_SKILLS'
|
|
|
1102 |
});
|
|
|
1103 |
$('#form-language #languages').select2({
|
|
|
1104 |
theme: 'bootstrap4',
|
|
|
1105 |
width: '100%',
|
|
|
1106 |
placeholder: 'LABEL_SELECT_ONE_LANGUAGE'
|
|
|
1107 |
});
|
|
|
1108 |
|
|
|
1109 |
|
|
|
1110 |
CKEDITOR.replace('description');
|
|
|
1111 |
|
|
|
1112 |
autocompleteLocation.addListener('place_changed', $.fn.fillInAddressLocation);
|
|
|
1113 |
|
|
|
1114 |
$('#form-location #is_main').bootstrapToggle({'on' : 'LABEL_MAIN_LOCATION', 'off' : 'LABEL_SECONDARY_LOCATION', 'width' : '160px', 'height' : '40px'});
|
|
|
1115 |
|
|
|
1116 |
$('#form-foundation-year #foundation_year').datetimepicker({
|
|
|
1117 |
viewMode: 'years',
|
|
|
1118 |
format: 'YYYY'
|
|
|
1119 |
});
|
|
|
1120 |
|
|
|
1121 |
|
|
|
1122 |
|
|
|
1123 |
|
|
|
1124 |
});
|
|
|
1125 |
|
|
|
1126 |
|
|
|
1127 |
JS;
|
|
|
1128 |
$this->inlineScript()->captureEnd();
|
|
|
1129 |
|
|
|
1130 |
?>
|
|
|
1131 |
|
1 |
www |
1132 |
<!-- Content Header (Page header) -->
|
16822 |
efrain |
1133 |
<section class="content-header">
|
|
|
1134 |
<div class="container-fluid">
|
|
|
1135 |
<div class="row mb-2">
|
|
|
1136 |
<div class="col-sm-12">
|
|
|
1137 |
<h1>LABEL_PROFILE</h1>
|
|
|
1138 |
</div>
|
|
|
1139 |
</div>
|
|
|
1140 |
</div><!-- /.container-fluid -->
|
|
|
1141 |
</section>
|
|
|
1142 |
|
|
|
1143 |
<input type="text" name="test" id="test" style="display: none">
|
|
|
1144 |
|
|
|
1145 |
<div class="row">
|
|
|
1146 |
<div class="col-12">
|
|
|
1147 |
|
|
|
1148 |
<section class="cover-sec">
|
|
|
1149 |
<img
|
|
|
1150 |
id="user-cover-img"
|
|
|
1151 |
src="<?php echo $this->url('storage', ['type' => 'company-cover', 'code' => $currentCompany->uuid, 'filename' => $cover]) ?>"
|
|
|
1152 |
alt="">
|
|
|
1153 |
<div class="add-pic-box change-cover-image">
|
|
|
1154 |
<div class="container">
|
|
|
1155 |
<div class="row no-gutters">
|
|
|
1156 |
<div class="col-lg-12 col-sm-12">
|
|
|
1157 |
<a href="#" class="btn-cover-open">
|
|
|
1158 |
<i class="fa fa-camera"></i>
|
|
|
1159 |
</a>
|
|
|
1160 |
</div>
|
|
|
1161 |
</div>
|
|
|
1162 |
</div>
|
|
|
1163 |
</div>
|
|
|
1164 |
</section>
|
|
|
1165 |
</div>
|
|
|
1166 |
</div>
|
|
|
1167 |
|
|
|
1168 |
|
|
|
1169 |
<div class="row">
|
|
|
1170 |
<div class="col-lg-3">
|
|
|
1171 |
<div class="main-left-sidebar">
|
|
|
1172 |
<div class="user_profile">
|
|
|
1173 |
<div class="user-pro-img">
|
|
|
1174 |
<img id="company-img"
|
|
|
1175 |
src="<?php echo $this->url('storage', ['type' => 'company', 'code' => $currentCompany->uuid, 'filename' => $image]) ?>"
|
|
|
1176 |
alt="">
|
|
|
1177 |
<div class="add-dp" id="OpenImgUpload">
|
|
|
1178 |
<a href="#" class="btn-image-open">
|
|
|
1179 |
<i class="fa fa-camera"></i></a>
|
|
|
1180 |
</div>
|
|
|
1181 |
</div>
|
|
|
1182 |
<!--user-pro-img end-->
|
|
|
1183 |
<div class="user_pro_status">
|
|
|
1184 |
<ul class="flw-status list-unstyled">
|
|
|
1185 |
<li><span>LABEL_FOLLOWERS</span> <b><?php echo $follower?></b>
|
|
|
1186 |
</li>
|
|
|
1187 |
</ul>
|
|
|
1188 |
</div>
|
|
|
1189 |
<!--user_pro_status end-->
|
|
|
1190 |
<div class="user-social-network-ov">
|
|
|
1191 |
<h3>
|
|
|
1192 |
LABEL_SOCIAL_NETWORKS <a href="#" title="" class="btn-social-network-edit"><i class="fa fa-pencil"></i></a>
|
|
|
1193 |
</h3>
|
|
|
1194 |
</div>
|
|
|
1195 |
|
|
|
1196 |
<ul id="social-networks" class="social_links list-unstyled">
|
|
|
1197 |
<?php
|
|
|
1198 |
$l = strlen($facebook);
|
|
|
1199 |
if ($l > 32) {
|
|
|
1200 |
$s = substr($facebook, 0, 32) . '...';
|
|
|
1201 |
} else {
|
|
|
1202 |
$s = $facebook;
|
|
|
1203 |
}
|
|
|
1204 |
?>
|
|
|
1205 |
<li><a href="<?php echo $facebook ?>" target="_blank" title=""><i
|
|
|
1206 |
class="fa fa-facebook-square btn-social-network-edit"></i> <?php echo $s?></a></li>
|
|
|
1207 |
|
|
|
1208 |
<?php
|
|
|
1209 |
$l = strlen($twitter);
|
|
|
1210 |
if ($l > 32) {
|
|
|
1211 |
$s = substr($twitter, 0, 32) . '...';
|
|
|
1212 |
} else {
|
|
|
1213 |
$s = $twitter;
|
|
|
1214 |
}
|
|
|
1215 |
?>
|
|
|
1216 |
<li><a href="<?php echo $twitter ?>" title="" target="_blank">
|
|
|
1217 |
<i class="fa fa-twitter btn-social-network-edit"></i>
|
|
|
1218 |
<?php echo $s?></a></li>
|
|
|
1219 |
<?php
|
|
|
1220 |
|
|
|
1221 |
$l = strlen($instagram);
|
|
|
1222 |
if ($l > 32) {
|
|
|
1223 |
$s = substr($instagram, 0, 32) . '...';
|
|
|
1224 |
} else {
|
|
|
1225 |
$s = $instagram;
|
|
|
1226 |
}
|
|
|
1227 |
?>
|
|
|
1228 |
<li><a href="<?php echo $instagram ?>" target="_blank" title=""><i
|
|
|
1229 |
class="fa fa-instagram btn-social-network-edit"></i> <?php echo $s?></a></li>
|
|
|
1230 |
|
|
|
1231 |
</ul>
|
|
|
1232 |
</div>
|
|
|
1233 |
<!--user_profile end-->
|
|
|
1234 |
</div>
|
|
|
1235 |
<!--main-left-sidebar end-->
|
|
|
1236 |
</div>
|
|
|
1237 |
<div class="col-lg-6">
|
|
|
1238 |
<div class="main-ws-sec">
|
|
|
1239 |
<div class="user-tab-sec rewivew">
|
|
|
1240 |
<h3><?php echo $company_name ?></h3>
|
|
|
1241 |
</div>
|
|
|
1242 |
<!--user-tab-sec end-->
|
|
|
1243 |
<div class="user-profile-extended-ov">
|
|
|
1244 |
<h3>
|
|
|
1245 |
LABEL_OVERVIEW <a href="#" title="" class="btn-extended-edit"><i class="fa fa-pencil"></i></a>
|
|
|
1246 |
</h3>
|
|
|
1247 |
<span id="overview-description"><?php echo $overview ?></span>
|
|
|
1248 |
|
|
|
1249 |
</div>
|
|
|
1250 |
<div class="user-profile-extended-ov st2">
|
|
|
1251 |
<h3>
|
|
|
1252 |
LABEL_LOCATIONS
|
|
|
1253 |
<a href="#" title="" class="btn-location-add"> <i class="fa fa-plus-square"></i></a>
|
|
|
1254 |
</h3>
|
|
|
1255 |
<span id="locations-records">
|
|
|
1256 |
<?php
|
|
|
1257 |
$max = count($locations);
|
|
|
1258 |
for($i = 0; $i < $max; $i++) :
|
|
|
1259 |
$location = $locations[$i];
|
|
|
1260 |
|
|
|
1261 |
?>
|
|
|
1262 |
<p>
|
|
|
1263 |
<?php echo $location['formatted_address'] ?><?php echo $location['is_main'] == 'y' ? ' (LABEL_MAIN_LOCATION) ' : ''?>
|
|
|
1264 |
<a href="#" title="" data-link="<?php echo $location['link_edit'] ?>" class="btn-location-edit"><i class="fa fa-pencil"></i></a>
|
|
|
1265 |
<a href="#" title="" data-link="<?php echo $location['link_delete'] ?>" class="btn-location-delete"><i class="fa fa-trash"></i></a>
|
|
|
1266 |
</p>
|
|
|
1267 |
<?php if($i < ($max - 1)) : ?>
|
|
|
1268 |
<hr/>
|
|
|
1269 |
<?php endif; ?>
|
|
|
1270 |
<?php endfor; ?>
|
|
|
1271 |
</span>
|
|
|
1272 |
</div>
|
|
|
1273 |
<!--user-profile-ov end-->
|
|
|
1274 |
<div class="user-profile-ov">
|
|
|
1275 |
<h3>
|
|
|
1276 |
LABEL_INDUSTRY <a href="#" title="" class="btn-industry-edit"><i class="fa fa-pencil"></i></a>
|
|
|
1277 |
</h3>
|
|
|
1278 |
<span id="overview-industry"><?php echo $industry ?><span>
|
|
|
1279 |
</div>
|
|
|
1280 |
<!--user-profile-ov end-->
|
|
|
1281 |
<!--user-profile-ov end-->
|
|
|
1282 |
<div class="user-profile-ov">
|
|
|
1283 |
<h3>
|
|
|
1284 |
LABEL_COMPANY_SIZE <a href="#" title="" class="btn-company-size-edit"><i class="fa fa-pencil"></i></a>
|
|
|
1285 |
</h3>
|
|
|
1286 |
<span id="overview-company-size"><?php echo $company_size?></span>
|
|
|
1287 |
</div>
|
|
|
1288 |
<!--user-profile-ov end-->
|
|
|
1289 |
<!--user-profile-ov end-->
|
|
|
1290 |
<div class="user-profile-ov">
|
|
|
1291 |
<h3>
|
|
|
1292 |
LABEL_FOUNDATION_YEAR <a href="#" title="" class="btn-foundation-year-edit"><i class="fa fa-pencil"></i></a>
|
|
|
1293 |
</h3>
|
|
|
1294 |
<span id="overview-foundation-year"><?php echo $foundation_year ?></span>
|
|
|
1295 |
</div>
|
|
|
1296 |
<!--user-profile-ov end-->
|
|
|
1297 |
<!--user-profile-ov end-->
|
|
|
1298 |
<div class="user-profile-ov">
|
|
|
1299 |
<h3>
|
|
|
1300 |
LABEL_WEBSITE <a href="#" title="" class="btn-website-edit"><i class="fa fa-pencil"></i></a>
|
|
|
1301 |
</h3>
|
|
|
1302 |
<span id="overview-website"><?php echo $website ?></span>
|
|
|
1303 |
</div>
|
|
|
1304 |
<!--user-profile-ov end-->
|
|
|
1305 |
</div>
|
|
|
1306 |
<!--main-ws-sec end-->
|
|
|
1307 |
</div>
|
|
|
1308 |
<div class="col-lg-3">
|
|
|
1309 |
<div class="right-sidebar">
|
|
|
1310 |
<?php //echo $this->companySuggestionHelper($company_id)?>
|
|
|
1311 |
|
|
|
1312 |
|
|
|
1313 |
</div>
|
|
|
1314 |
<!--right-sidebar end-->
|
|
|
1315 |
</div>
|
|
|
1316 |
<!--right-sidebar end-->
|
|
|
1317 |
</div>
|
|
|
1318 |
|
|
|
1319 |
<div class="modal" tabindex="-1" role="dialog" id="extended-box">
|
|
|
1320 |
<div class="modal-dialog" role="document">
|
|
|
1321 |
<?php
|
|
|
1322 |
$form = $this->formExtended;
|
|
|
1323 |
$form->setAttributes([
|
|
|
1324 |
'method' => 'post',
|
|
|
1325 |
'action' => $routeExtended,
|
|
|
1326 |
'name' => 'form-extended',
|
|
|
1327 |
'id' => 'form-extended'
|
|
|
1328 |
]);
|
|
|
1329 |
$form->prepare();
|
|
|
1330 |
echo $this->form()->openTag($form);
|
|
|
1331 |
?>
|
|
|
1332 |
<div class="modal-content">
|
|
|
1333 |
<div class="modal-header">
|
|
|
1334 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
|
|
1335 |
</div>
|
|
|
1336 |
<div class="modal-body">
|
|
|
1337 |
<div class="form-group">
|
|
|
1338 |
<?php
|
|
|
1339 |
$element = $form->get('description');
|
|
|
1340 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1341 |
$element->setOptions(['label' => 'LABEL_OVERVIEW']);
|
|
|
1342 |
echo $this->formLabel($element);
|
|
|
1343 |
echo $this->formTextArea($element);
|
|
|
1344 |
?>
|
|
|
1345 |
</div>
|
|
|
1346 |
</div>
|
|
|
1347 |
<div class="modal-footer">
|
|
|
1348 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1349 |
<button type="button" class="btn btn-default btn-extended-close">LABEL_CANCEL</button>
|
|
|
1350 |
</div>
|
|
|
1351 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1352 |
</div>
|
|
|
1353 |
</div>
|
|
|
1354 |
</div>
|
|
|
1355 |
|
|
|
1356 |
<div class="modal" tabindex="-1" role="dialog" id="foundation-year-box">
|
|
|
1357 |
<div class="modal-dialog" role="document">
|
|
|
1358 |
<?php
|
|
|
1359 |
$form = $this->formFoundationYear;
|
|
|
1360 |
$form->setAttributes([
|
|
|
1361 |
'method' => 'post',
|
|
|
1362 |
'action' => $routeFoundationYear,
|
|
|
1363 |
'name' => 'form-foundation-year',
|
|
|
1364 |
'id' => 'form-foundation-year'
|
|
|
1365 |
]);
|
|
|
1366 |
$form->prepare();
|
|
|
1367 |
echo $this->form()->openTag($form);
|
|
|
1368 |
?>
|
|
|
1369 |
<div class="modal-content">
|
|
|
1370 |
<div class="modal-header">
|
|
|
1371 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
|
|
1372 |
</div>
|
|
|
1373 |
<div class="modal-body">
|
|
|
1374 |
<div class="form-group">
|
|
|
1375 |
<?php
|
|
|
1376 |
$element = $form->get('foundation_year');
|
|
|
1377 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1378 |
$element->setOptions(['label' => 'LABEL_FOUNDATION_YEAR']);
|
|
|
1379 |
echo $this->formLabel($element);
|
|
|
1380 |
echo $this->formText($element);
|
|
|
1381 |
?>
|
|
|
1382 |
</div>
|
|
|
1383 |
</div>
|
|
|
1384 |
<div class="modal-footer">
|
|
|
1385 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1386 |
<button type="button" class="btn btn-default btn-fondation-year-close">LABEL_CANCEL</button>
|
|
|
1387 |
</div>
|
|
|
1388 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1389 |
</div>
|
|
|
1390 |
</div>
|
|
|
1391 |
</div>
|
|
|
1392 |
|
|
|
1393 |
<div class="modal" tabindex="-1" role="dialog" id="website-box">
|
|
|
1394 |
<div class="modal-dialog" role="document">
|
|
|
1395 |
<?php
|
|
|
1396 |
$form = $this->formWebsite;
|
|
|
1397 |
$form->setAttributes([
|
|
|
1398 |
'method' => 'post',
|
|
|
1399 |
'action' => $routeWebsite,
|
|
|
1400 |
'name' => 'form-website',
|
|
|
1401 |
'id' => 'form-website'
|
|
|
1402 |
]);
|
|
|
1403 |
$form->prepare();
|
|
|
1404 |
echo $this->form()->openTag($form);
|
|
|
1405 |
?>
|
|
|
1406 |
<div class="modal-content">
|
|
|
1407 |
<div class="modal-header">
|
|
|
1408 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
|
|
1409 |
</div>
|
|
|
1410 |
<div class="modal-body">
|
|
|
1411 |
<div class="form-group">
|
|
|
1412 |
<?php
|
|
|
1413 |
$element = $form->get('website');
|
|
|
1414 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1415 |
$element->setOptions(['label' => 'LABEL_WEBSITE']);
|
|
|
1416 |
echo $this->formLabel($element);
|
|
|
1417 |
echo $this->formText($element);
|
|
|
1418 |
?>
|
|
|
1419 |
</div>
|
|
|
1420 |
</div>
|
|
|
1421 |
<div class="modal-footer">
|
|
|
1422 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1423 |
<button type="button" class="btn btn-default btn-website-close">LABEL_CANCEL</button>
|
|
|
1424 |
</div>
|
|
|
1425 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1426 |
</div>
|
|
|
1427 |
</div>
|
|
|
1428 |
</div>
|
|
|
1429 |
|
|
|
1430 |
<div class="modal" tabindex="-1" role="dialog" id="industry-box">
|
|
|
1431 |
<div class="modal-dialog" role="document">
|
|
|
1432 |
<?php
|
|
|
1433 |
$form = $this->formIndustry;
|
|
|
1434 |
$form->setAttributes([
|
|
|
1435 |
'method' => 'post',
|
|
|
1436 |
'action' => $routeIndustry,
|
|
|
1437 |
'name' => 'form-industry',
|
|
|
1438 |
'id' => 'form-industry'
|
|
|
1439 |
]);
|
|
|
1440 |
$form->prepare();
|
|
|
1441 |
echo $this->form()->openTag($form);
|
|
|
1442 |
?>
|
|
|
1443 |
<div class="modal-content">
|
|
|
1444 |
<div class="modal-header">
|
|
|
1445 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
|
|
1446 |
</div>
|
|
|
1447 |
<div class="modal-body">
|
|
|
1448 |
<div class="form-group">
|
|
|
1449 |
<?php
|
|
|
1450 |
$element = $form->get('industry_id');
|
|
|
1451 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1452 |
$element->setOptions(['label' => 'LABEL_INDUSTRY']);
|
|
|
1453 |
echo $this->formLabel($element);
|
|
|
1454 |
echo $this->formSelect($element);
|
|
|
1455 |
?>
|
|
|
1456 |
</div>
|
|
|
1457 |
</div>
|
|
|
1458 |
<div class="modal-footer">
|
|
|
1459 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1460 |
<button type="button" class="btn btn-default btn-industry-close">LABEL_CANCEL</button>
|
|
|
1461 |
</div>
|
|
|
1462 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1463 |
</div>
|
|
|
1464 |
</div>
|
|
|
1465 |
</div>
|
|
|
1466 |
|
|
|
1467 |
<div class="modal" tabindex="-1" role="dialog" id="company-size-box">
|
|
|
1468 |
<div class="modal-dialog" role="document">
|
|
|
1469 |
<?php
|
|
|
1470 |
$form = $this->formCompanySize;
|
|
|
1471 |
$form->setAttributes([
|
|
|
1472 |
'method' => 'post',
|
|
|
1473 |
'action' => $routeCompanySize,
|
|
|
1474 |
'name' => 'form-company-size',
|
|
|
1475 |
'id' => 'form-company-size'
|
|
|
1476 |
]);
|
|
|
1477 |
$form->prepare();
|
|
|
1478 |
echo $this->form()->openTag($form);
|
|
|
1479 |
?>
|
|
|
1480 |
<div class="modal-content">
|
|
|
1481 |
<div class="modal-header">
|
|
|
1482 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
|
|
1483 |
</div>
|
|
|
1484 |
<div class="modal-body">
|
|
|
1485 |
<div class="form-group">
|
|
|
1486 |
<?php
|
|
|
1487 |
$element = $form->get('company_size_id');
|
|
|
1488 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1489 |
$element->setOptions(['label' => 'LABEL_COMPANY_SIZE']);
|
|
|
1490 |
echo $this->formLabel($element);
|
|
|
1491 |
echo $this->formSelect($element);
|
|
|
1492 |
?>
|
|
|
1493 |
</div>
|
|
|
1494 |
</div>
|
|
|
1495 |
<div class="modal-footer">
|
|
|
1496 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1497 |
<button type="button" class="btn btn-default btn-company-size-close">LABEL_CANCEL</button>
|
|
|
1498 |
</div>
|
|
|
1499 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1500 |
</div>
|
|
|
1501 |
</div>
|
|
|
1502 |
</div>
|
|
|
1503 |
|
|
|
1504 |
|
|
|
1505 |
|
|
|
1506 |
<div class="modal" tabindex="-1" role="dialog" id="location-box">
|
|
|
1507 |
<div class="modal-dialog" role="document">
|
|
|
1508 |
<?php
|
|
|
1509 |
$form = $this->formLocation;
|
|
|
1510 |
$form->setAttributes([
|
|
|
1511 |
'method' => 'post',
|
|
|
1512 |
'action' => '',
|
|
|
1513 |
'name' => 'form-location',
|
|
|
1514 |
'id' => 'form-location'
|
|
|
1515 |
]);
|
|
|
1516 |
$form->prepare();
|
|
|
1517 |
echo $this->form()->openTag($form);
|
|
|
1518 |
|
|
|
1519 |
$fieldnames = [
|
|
|
1520 |
'formatted_address',
|
|
|
1521 |
'address1',
|
|
|
1522 |
'address2',
|
|
|
1523 |
'country',
|
|
|
1524 |
'state',
|
|
|
1525 |
'city1',
|
|
|
1526 |
'city2',
|
|
|
1527 |
'postal_code',
|
|
|
1528 |
'latitude',
|
|
|
1529 |
'longitude',
|
|
|
1530 |
];
|
|
|
1531 |
|
|
|
1532 |
foreach($fieldnames as $fieldname) {
|
|
|
1533 |
|
|
|
1534 |
$element = $form->get($fieldname);
|
|
|
1535 |
echo $this->formHidden($element);
|
|
|
1536 |
}
|
|
|
1537 |
?>
|
|
|
1538 |
<div class="modal-content">
|
|
|
1539 |
<div class="modal-header">
|
|
|
1540 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
|
|
1541 |
</div>
|
|
|
1542 |
<div class="modal-body">
|
|
|
1543 |
<div class="form-group datefm">
|
|
|
1544 |
<?php
|
|
|
1545 |
$element = $form->get('location_search');
|
|
|
1546 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1547 |
$element->setOptions(['label' => 'LABEL_LOCATION']);
|
|
|
1548 |
echo $this->formLabel($element);
|
|
|
1549 |
echo $this->formText($element);
|
|
|
1550 |
?>
|
|
|
1551 |
<i class="fa fa-map-marker"></i>
|
|
|
1552 |
</div>
|
|
|
1553 |
<div class="form-group">
|
|
|
1554 |
<?php
|
|
|
1555 |
$element = $form->get('is_main');
|
|
|
1556 |
echo $this->formCheckbox($element);
|
|
|
1557 |
?>
|
|
|
1558 |
</div>
|
|
|
1559 |
</div>
|
|
|
1560 |
<div class="modal-footer">
|
|
|
1561 |
<button type="submit" class="btn btn-primary ">LABEL_SAVE</button>
|
|
|
1562 |
<button type="button" class="btn btn-default btn-location-close">LABEL_CANCEL</button>
|
|
|
1563 |
</div>
|
|
|
1564 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1565 |
</div>
|
|
|
1566 |
</div>
|
|
|
1567 |
</div>
|
|
|
1568 |
|
|
|
1569 |
<div class="modal" tabindex="-1" role="dialog" id="social-networks-box">
|
|
|
1570 |
<div class="modal-dialog" role="document">
|
|
|
1571 |
<?php
|
|
|
1572 |
$form = $this->formSocialNetwork;
|
|
|
1573 |
$form->setAttributes([
|
|
|
1574 |
'method' => 'post',
|
|
|
1575 |
'action' => $routeSocialNetworks,
|
|
|
1576 |
'name' => 'form-social-network',
|
|
|
1577 |
'id' => 'form-social-network'
|
|
|
1578 |
]);
|
|
|
1579 |
$form->prepare();
|
|
|
1580 |
echo $this->form()->openTag($form);
|
|
|
1581 |
?>
|
|
|
1582 |
<div class="modal-content">
|
|
|
1583 |
<div class="modal-header">
|
|
|
1584 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
|
|
1585 |
</div>
|
|
|
1586 |
<div class="modal-body">
|
|
|
1587 |
|
|
|
1588 |
<div class="form-group">
|
|
|
1589 |
<?php
|
|
|
1590 |
$element = $form->get('facebook');
|
|
|
1591 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1592 |
$element->setOptions(['label' => 'LABEL_FACEBOOK']);
|
|
|
1593 |
echo $this->formLabel($element);
|
|
|
1594 |
echo $this->formText($element);
|
|
|
1595 |
?>
|
|
|
1596 |
</div>
|
|
|
1597 |
<div class="form-group">
|
|
|
1598 |
<?php
|
|
|
1599 |
$element = $form->get('twitter');
|
|
|
1600 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1601 |
$element->setOptions(['label' => 'LABEL_TWITTER']);
|
|
|
1602 |
echo $this->formLabel($element);
|
|
|
1603 |
echo $this->formText($element);
|
|
|
1604 |
?>
|
|
|
1605 |
</div>
|
|
|
1606 |
<div class="form-group">
|
|
|
1607 |
<?php
|
|
|
1608 |
$element = $form->get('instagram');
|
|
|
1609 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1610 |
$element->setOptions(['label' => 'LABEL_INSTAGRAM']);
|
|
|
1611 |
echo $this->formLabel($element);
|
|
|
1612 |
echo $this->formText($element);
|
|
|
1613 |
?>
|
|
|
1614 |
</div>
|
|
|
1615 |
<div class="form-group">
|
|
|
1616 |
</div>
|
|
|
1617 |
<div class="modal-footer">
|
|
|
1618 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1619 |
<button type="button" class="btn btn-default btn-social-network-close">LABEL_CANCEL</button>
|
|
|
1620 |
</div>
|
|
|
1621 |
</div>
|
|
|
1622 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1623 |
</div>
|
|
|
1624 |
</div>
|
|
|
1625 |
</div>
|
|
|
1626 |
|
|
|
1627 |
|
|
|
1628 |
|
|
|
1629 |
|
|
|
1630 |
<div class="modal" tabindex="-1" role="dialog" id="image-box">
|
|
|
1631 |
<div class="modal-dialog" role="document">
|
|
|
1632 |
<?php
|
|
|
1633 |
$form = $this->formImage;
|
|
|
1634 |
$form->setAttributes([
|
|
|
1635 |
'method' => 'post',
|
|
|
1636 |
'action' => $routeImageUpload,
|
|
|
1637 |
'name' => 'form-image',
|
|
|
1638 |
'id' => 'form-image',
|
|
|
1639 |
'enctype' => 'multipart/form-data'
|
|
|
1640 |
]);
|
|
|
1641 |
$form->prepare();
|
|
|
1642 |
echo $this->form()->openTag($form);
|
|
|
1643 |
?>
|
|
|
1644 |
<div class="modal-content">
|
|
|
1645 |
<div class="modal-header">
|
|
|
1646 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
|
|
1647 |
</div>
|
|
|
1648 |
<div class="modal-body">
|
|
|
1649 |
<div class="form-group">
|
|
|
1650 |
<div class="file-loading">
|
|
|
1651 |
<?php
|
|
|
1652 |
|
|
|
1653 |
$element = $form->get('image');
|
|
|
1654 |
$element->setAttributes(['class' => 'form-control', 'accept' => 'image/jpeg,image/png']);
|
|
|
1655 |
$element->setOptions(['label' => 'LABEL_IMAGE']);
|
|
|
1656 |
echo $this->formLabel($element);
|
|
|
1657 |
echo $this->formFile($element);
|
|
|
1658 |
?>
|
|
|
1659 |
</div>
|
|
|
1660 |
</div>
|
|
|
1661 |
</div>
|
|
|
1662 |
|
|
|
1663 |
<div class="modal-footer">
|
|
|
1664 |
<button type="submit" class="btn btn-primary">LABEL_UPLOAD</button>
|
|
|
1665 |
<button type="button" class="btn btn-default btn-image-close">LABEL_CANCEL</button>
|
|
|
1666 |
</div>
|
|
|
1667 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1668 |
</div>
|
|
|
1669 |
</div>
|
|
|
1670 |
</div>
|
|
|
1671 |
|
|
|
1672 |
|
|
|
1673 |
|
|
|
1674 |
<div class="modal" tabindex="-1" role="dialog" id="cover-box">
|
|
|
1675 |
<div class="modal-dialog" role="document">
|
|
|
1676 |
<?php
|
|
|
1677 |
$form = $this->formCover;
|
|
|
1678 |
$form->setAttributes([
|
|
|
1679 |
'method' => 'post',
|
|
|
1680 |
'action' => $routeCoverUpload,
|
|
|
1681 |
'name' => 'form-cover',
|
|
|
1682 |
'id' => 'form-cover',
|
|
|
1683 |
'enctype' => 'multipart/form-data'
|
|
|
1684 |
]);
|
|
|
1685 |
$form->prepare();
|
|
|
1686 |
echo $this->form()->openTag($form);
|
|
|
1687 |
?>
|
|
|
1688 |
<div class="modal-content">
|
|
|
1689 |
<div class="modal-header">
|
|
|
1690 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
|
|
1691 |
</div>
|
|
|
1692 |
<div class="modal-body">
|
|
|
1693 |
<div class="form-group">
|
|
|
1694 |
<div class="file-loading">
|
|
|
1695 |
<?php
|
|
|
1696 |
$element = $form->get('cover');
|
|
|
1697 |
$element->setAttributes(['class' => 'form-control', 'accept' => 'image/jpeg,image/png']);
|
|
|
1698 |
$element->setOptions(['label' => 'LABEL_COVER']);
|
|
|
1699 |
echo $this->formLabel($element);
|
|
|
1700 |
echo $this->formFile($element);
|
|
|
1701 |
?>
|
|
|
1702 |
</div>
|
|
|
1703 |
</div>
|
|
|
1704 |
|
|
|
1705 |
<div class="modal-footer">
|
|
|
1706 |
<button type="submit" class="btn btn-primary ">LABEL_UPLOAD</button>
|
|
|
1707 |
<button type="button" class="btn btn-default btn-cover-close">LABEL_CANCEL</button>
|
|
|
1708 |
</div>
|
|
|
1709 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1710 |
</div>
|
|
|
1711 |
</div>
|
|
|
1712 |
</div>
|
|
|
1713 |
|
|
|
1714 |
|