1 |
www |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
use LeadersLinked\Model\UserExperience;
|
|
|
4 |
|
|
|
5 |
$acl = $this->viewModel()
|
|
|
6 |
->getRoot()
|
|
|
7 |
->getVariable('acl');
|
|
|
8 |
$currentUserHelper = $this->currentUserHelper();
|
|
|
9 |
$currentUser = $currentUserHelper->getUser();
|
|
|
10 |
$currentCompany = $currentUserHelper->getCompany();
|
5761 |
stevensc |
11 |
$companyId = $currentCompany->uuid;
|
1 |
www |
12 |
|
|
|
13 |
$roleName = $currentUserHelper->getUserTypeId();
|
|
|
14 |
|
5743 |
stevensc |
15 |
$routeWebsite = $this->url('profile/website', ['id' => $currentCompany->uuid]);
|
|
|
16 |
$routeCompanySize = $this->url('profile/company-size', ['id' => $currentCompany->uuid]);
|
|
|
17 |
$routeIndustry = $this->url('profile/industry', ['id' => $currentCompany->uuid]);
|
|
|
18 |
$routeExtended = $this->url('profile/extended', ['id' => $currentCompany->uuid]);
|
|
|
19 |
$routeSocialNetworks = $this->url('profile/social-network', ['id' => $currentCompany->uuid]);
|
|
|
20 |
$routeLocationAdd = $this->url('profile/location', ['id' => $currentCompany->uuid, 'operation' => 'add']);
|
|
|
21 |
$routeFoundationYear = $this->url('profile/foundation_year', ['id' => $currentCompany->uuid, 'operation' => 'add']);
|
|
|
22 |
$routeImageUpload = $this->url('profile/image', ['id' => $currentCompany->uuid, 'operation' => 'upload']);
|
|
|
23 |
$routeCoverUpload = $this->url('profile/cover', ['id' => $currentCompany->uuid, 'operation' => 'upload']);
|
|
|
24 |
$routeFooterUpload = $this->url('profile/footer', ['id' => $currentCompany->uuid, 'operation' => 'upload']);
|
|
|
25 |
$routeHeaderUpload = $this->url('profile/header', ['id' => $currentCompany->uuid, 'operation' => 'upload']);
|
1 |
www |
26 |
|
|
|
27 |
$this->inlineScript()->appendFile('https://maps.googleapis.com/maps/api/js?key=' . $google_map_key . '&libraries=places');
|
|
|
28 |
|
|
|
29 |
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
|
|
|
30 |
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
|
|
|
31 |
|
|
|
32 |
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
|
|
|
33 |
|
|
|
34 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
|
|
|
35 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.css'));
|
|
|
36 |
|
|
|
37 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
|
|
|
38 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
|
|
|
39 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
|
|
|
40 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
|
|
|
41 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fas/theme.js'));
|
|
|
42 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.js'));
|
|
|
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 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
|
|
|
49 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
|
|
|
50 |
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.min.js'));
|
|
|
51 |
|
|
|
52 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.min.js'));
|
|
|
53 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
|
|
|
54 |
|
|
|
55 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
|
|
|
56 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
|
|
|
57 |
|
|
|
58 |
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
|
|
|
59 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
|
|
|
60 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
|
|
|
61 |
|
|
|
62 |
$this->inlineScript()->captureStart();
|
|
|
63 |
echo <<<JS
|
|
|
64 |
jQuery( document ).ready(function( $ ) {
|
|
|
65 |
|
|
|
66 |
$.validator.addMethod('greaterThan', function (value, element, param) {
|
|
|
67 |
var otherElement = $(param);
|
|
|
68 |
return parseInt(value, 10) > parseInt(otherElement.val(), 10);
|
|
|
69 |
}, 'ERROR_INVALID_MINIMUM');
|
|
|
70 |
|
|
|
71 |
$.validator.addMethod('checkLocation', function (value, element, param) {
|
|
|
72 |
var otherElement = $(param);
|
|
|
73 |
return $.trim(otherElement.val()).length > 0;
|
|
|
74 |
}, 'ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY');
|
|
|
75 |
|
|
|
76 |
var autocompleteLocation = new google.maps.places.Autocomplete(
|
|
|
77 |
(document.getElementById('location_search')),
|
|
|
78 |
{types: ['(cities)']}
|
|
|
79 |
);
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
$.fn.fillInAddressLocation = function() {
|
|
|
83 |
console.log('fillInAddressLocation');
|
|
|
84 |
|
|
|
85 |
var place = autocompleteLocation.getPlace();
|
|
|
86 |
if (!place.geometry) {
|
|
|
87 |
$.fn.showError('ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY')
|
|
|
88 |
return;
|
|
|
89 |
} else {
|
|
|
90 |
address1 = '';
|
|
|
91 |
address2 = '';
|
|
|
92 |
city1 = '';
|
|
|
93 |
city2 = '';
|
|
|
94 |
state = '';
|
|
|
95 |
country = '';
|
|
|
96 |
postal_code = '';
|
|
|
97 |
|
|
|
98 |
formatted_address = place.formatted_address;
|
|
|
99 |
latitude = place.geometry.location.lat();
|
|
|
100 |
longitude = place.geometry.location.lng();
|
|
|
101 |
var arrAddress = place.address_components;
|
|
|
102 |
|
|
|
103 |
$.each(arrAddress, function(i, address_component) {
|
|
|
104 |
if (address_component.types[0] == "route") {
|
|
|
105 |
address1 = address_component.long_name;
|
|
|
106 |
}
|
|
|
107 |
if (address_component.types[0] == "sublocality") {
|
|
|
108 |
address2 = address_component.long_name;
|
|
|
109 |
}
|
|
|
110 |
if (address_component.types[0] == "locality") {
|
|
|
111 |
city1 = address_component.long_name;
|
|
|
112 |
}
|
|
|
113 |
if (address_component.types[0] == "administrative_area_level_2") {
|
|
|
114 |
city2 = address_component.long_name;
|
|
|
115 |
}
|
|
|
116 |
if (address_component.types[0] == "administrative_area_level_1") {
|
|
|
117 |
state = address_component.long_name;
|
|
|
118 |
}
|
|
|
119 |
if (address_component.types[0] == "country") {
|
|
|
120 |
country = address_component.long_name;
|
|
|
121 |
}
|
|
|
122 |
if (address_component.types[0] == "postal_code") {
|
|
|
123 |
postal_code = address_component.long_name;
|
|
|
124 |
}
|
|
|
125 |
});
|
|
|
126 |
|
|
|
127 |
$('#form-location #formatted_address').val(formatted_address);
|
|
|
128 |
$('#form-location #address1').val(address1);
|
|
|
129 |
$('#form-location #address2').val(address2);
|
|
|
130 |
$('#form-location #city1').val(city1);
|
|
|
131 |
$('#form-location #city2').val(city2);
|
|
|
132 |
$('#form-location #state').val(state);
|
|
|
133 |
$('#form-location #country').val(country);
|
|
|
134 |
$('#form-location #postal_code').val(postal_code);
|
|
|
135 |
$('#form-location #latitude').val(latitude);
|
|
|
136 |
$('#form-location #longitude').val(longitude);
|
|
|
137 |
|
|
|
138 |
}
|
|
|
139 |
}
|
6539 |
stevensc |
140 |
|
1 |
www |
141 |
$.fn.renderLocation = function(data) {
|
|
|
142 |
$('#locations-records').empty();
|
|
|
143 |
if(Array.isArray(data)) {
|
|
|
144 |
max = data.length;
|
|
|
145 |
for(i = 0; i < max; i++)
|
|
|
146 |
{
|
|
|
147 |
var location = data[i];
|
|
|
148 |
s = '<p>' + location['formatted_address'];
|
|
|
149 |
if(location['is_main'] == 'y') {
|
|
|
150 |
s = s + ' (LABEL_MAIN_LOCATION) ';
|
|
|
151 |
}
|
|
|
152 |
s = s + ' <a href="#" title="" data-link="' + location['link_edit'] + '" class="btn-location-edit"><i class="fa fa-pencil"></i></a> ';
|
|
|
153 |
s = s + ' <a href="#" title="" data-link="' + location['link_delete'] + '" class="btn-location-delete"><i class="fa fa-trash"></i></a>';
|
|
|
154 |
s = s + ' </p>';
|
|
|
155 |
|
|
|
156 |
if(i < (max - 1)) {
|
|
|
157 |
s = s + '<hr/>';
|
|
|
158 |
}
|
|
|
159 |
$('#locations-records').append(s);
|
|
|
160 |
}
|
|
|
161 |
}
|
|
|
162 |
}
|
|
|
163 |
|
|
|
164 |
$.validator.setDefaults({
|
|
|
165 |
debug: true,
|
|
|
166 |
highlight: function(element) {
|
|
|
167 |
$(element).addClass('is-invalid');
|
|
|
168 |
},
|
|
|
169 |
unhighlight: function(element) {
|
|
|
170 |
$(element).removeClass('is-invalid');
|
|
|
171 |
},
|
|
|
172 |
errorElement: 'span',
|
|
|
173 |
errorClass: 'error invalid-feedback',
|
|
|
174 |
errorPlacement: function(error, element) {
|
|
|
175 |
if(element.parent('.form-group').length) {
|
|
|
176 |
error.insertAfter(element);
|
|
|
177 |
} else if(element.parent('.toggle').length) {
|
|
|
178 |
error.insertAfter(element.parent().parent());
|
|
|
179 |
} else {
|
|
|
180 |
error.insertAfter(element.parent());
|
|
|
181 |
}
|
|
|
182 |
}
|
|
|
183 |
});
|
|
|
184 |
|
|
|
185 |
$.fn.showFormErrorValidator = function(fieldname, errors) {
|
|
|
186 |
var field = $(fieldname);
|
|
|
187 |
if(field) {
|
|
|
188 |
$(field).addClass('is-invalid');
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
|
|
|
192 |
if(field.parent('.form-group').length) {
|
|
|
193 |
error.insertAfter(field);
|
|
|
194 |
} else if(field.parent('.toggle').length) {
|
|
|
195 |
error.insertAfter(field.parent().parent());
|
|
|
196 |
} else {
|
|
|
197 |
error.insertAfter(field.parent());
|
|
|
198 |
}
|
|
|
199 |
}
|
|
|
200 |
};
|
|
|
201 |
|
|
|
202 |
var validatorLocation = $('#form-location').validate({
|
|
|
203 |
debug: true,
|
|
|
204 |
onclick: false,
|
|
|
205 |
onkeyup: false,
|
|
|
206 |
onfocusout: false,
|
|
|
207 |
ignore: [],
|
|
|
208 |
rules: {
|
|
|
209 |
'location_search': {
|
|
|
210 |
required: true,
|
|
|
211 |
checkLocation: '#form-location #latitude'
|
|
|
212 |
}
|
|
|
213 |
},
|
|
|
214 |
submitHandler: function(form)
|
|
|
215 |
{
|
|
|
216 |
NProgress.start();
|
|
|
217 |
$.ajax({
|
|
|
218 |
'dataType' : 'json',
|
|
|
219 |
'accept' : 'application/json',
|
|
|
220 |
'method' : 'post',
|
|
|
221 |
'url' : $('#form-location').attr('action'),
|
|
|
222 |
'data' : $('#form-location').serialize(),
|
|
|
223 |
}).done(function(response) {
|
|
|
224 |
if(response['success']) {
|
|
|
225 |
$.fn.renderLocation(response['data']);
|
|
|
226 |
|
|
|
227 |
$("#location-box").modal('hide');
|
|
|
228 |
} else {
|
|
|
229 |
validatorLocation.resetForm();
|
|
|
230 |
$.fn.showError(response['data']);
|
|
|
231 |
}
|
|
|
232 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
233 |
$.fn.showError(textStatus);
|
|
|
234 |
}).always(function() {
|
|
|
235 |
NProgress.done();
|
|
|
236 |
});
|
|
|
237 |
return false;
|
|
|
238 |
},
|
|
|
239 |
invalidHandler: function(form, validator) {
|
|
|
240 |
|
|
|
241 |
}
|
|
|
242 |
});
|
|
|
243 |
|
|
|
244 |
$('.btn-location-add').on("click", function(e){
|
|
|
245 |
e.preventDefault();
|
|
|
246 |
|
|
|
247 |
$('#form-location').attr('action', '$routeLocationAdd');
|
|
|
248 |
$('#form-location #location_search').val('');
|
|
|
249 |
$('#form-location #formatted_address').val('');
|
|
|
250 |
$('#form-location #address1').val('');
|
|
|
251 |
$('#form-location #address2').val('');
|
|
|
252 |
$('#form-location #country').val('');
|
|
|
253 |
$('#form-location #state').val('');
|
|
|
254 |
$('#form-location #city1').val('');
|
|
|
255 |
$('#form-location #city2').val('');
|
|
|
256 |
$('#form-location #postal_code').val('');
|
|
|
257 |
$('#form-location #latitude').val('');
|
|
|
258 |
$('#form-location #longitude').val('');
|
|
|
259 |
validatorLocation.resetForm();
|
|
|
260 |
|
|
|
261 |
$("#location-box").modal('show');
|
|
|
262 |
});
|
|
|
263 |
|
|
|
264 |
$('body').on('click', 'a.btn-location-edit', function(e) {
|
|
|
265 |
e.preventDefault();
|
|
|
266 |
|
|
|
267 |
var url = $(this).data('link');
|
|
|
268 |
|
|
|
269 |
NProgress.start();
|
|
|
270 |
$.ajax({
|
|
|
271 |
'dataType' : 'json',
|
|
|
272 |
'accept' : 'application/json',
|
|
|
273 |
'method' : 'get',
|
|
|
274 |
'url' : url,
|
|
|
275 |
}).done(function(response) {
|
|
|
276 |
if(response['success']) {
|
|
|
277 |
$('#form-location').attr('action', url);
|
|
|
278 |
$('#form-location #location_search').val(response['data']['formatted_address']);
|
|
|
279 |
$('#form-location #formatted_address').val(response['data']['formatted_address']);
|
|
|
280 |
$('#form-location #address1').val(response['data']['address1']);
|
|
|
281 |
$('#form-location #address2').val(response['data']['address2']);
|
|
|
282 |
$('#form-location #country').val(response['data']['country']);
|
|
|
283 |
$('#form-location #state').val(response['data']['state']);
|
|
|
284 |
$('#form-location #city1').val(response['data']['city1']);
|
|
|
285 |
$('#form-location #city2').val(response['data']['city2']);
|
|
|
286 |
$('#form-location #postal_code').val(response['data']['postal_code']);
|
|
|
287 |
$('#form-location #latitude').val(response['data']['latitude']);
|
|
|
288 |
$('#form-location #longitude').val(response['data']['longitude']);
|
|
|
289 |
|
|
|
290 |
if(response['data']['is_main'] == 'y') {
|
|
|
291 |
$('#form-location #is_main').bootstrapToggle('on')
|
|
|
292 |
} else {
|
|
|
293 |
$('#form-location #is_main').bootstrapToggle('off')
|
|
|
294 |
}
|
|
|
295 |
|
|
|
296 |
validatorLocation.resetForm();
|
|
|
297 |
|
|
|
298 |
$("#location-box").modal('show');
|
|
|
299 |
} else {
|
|
|
300 |
$.fn.showError(response['data']);
|
|
|
301 |
}
|
|
|
302 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
303 |
$.fn.showError(textStatus);
|
|
|
304 |
}).always(function() {
|
|
|
305 |
NProgress.done();
|
|
|
306 |
});
|
|
|
307 |
return false;
|
|
|
308 |
|
|
|
309 |
|
|
|
310 |
});
|
|
|
311 |
|
|
|
312 |
$('body').on('click', 'a.btn-location-delete', function(e) {
|
|
|
313 |
e.preventDefault();
|
|
|
314 |
|
|
|
315 |
var url = $(this).data('link');
|
|
|
316 |
|
|
|
317 |
NProgress.start();
|
|
|
318 |
$.ajax({
|
|
|
319 |
'dataType' : 'json',
|
|
|
320 |
'accept' : 'application/json',
|
|
|
321 |
'method' : 'post',
|
|
|
322 |
'url' : url,
|
|
|
323 |
}).done(function(response) {
|
|
|
324 |
if(response['success']) {
|
|
|
325 |
$.fn.renderLocation(response['data']);
|
|
|
326 |
} else {
|
|
|
327 |
$.fn.showError(response['data']);
|
|
|
328 |
}
|
|
|
329 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
330 |
$.fn.showError(textStatus);
|
|
|
331 |
}).always(function() {
|
|
|
332 |
NProgress.done();
|
|
|
333 |
});
|
|
|
334 |
return false;
|
|
|
335 |
|
|
|
336 |
|
|
|
337 |
});
|
|
|
338 |
|
|
|
339 |
|
|
|
340 |
$('.btn-location-close').on("click", function(e){
|
|
|
341 |
e.preventDefault();
|
|
|
342 |
|
|
|
343 |
$("#location-box").modal('hide');
|
|
|
344 |
return false;
|
|
|
345 |
});
|
|
|
346 |
|
|
|
347 |
var validatorExtended = $('#form-extended').validate({
|
|
|
348 |
debug: true,
|
|
|
349 |
onclick: false,
|
|
|
350 |
onkeyup: false,
|
|
|
351 |
onfocusout: false,
|
|
|
352 |
ignore: [],
|
|
|
353 |
rules: {
|
|
|
354 |
'description': {
|
|
|
355 |
updateCkeditor:function() {
|
|
|
356 |
CKEDITOR.instances.description.updateElement();
|
|
|
357 |
},
|
|
|
358 |
required: false,
|
|
|
359 |
},
|
|
|
360 |
},
|
|
|
361 |
|
|
|
362 |
submitHandler: function(form)
|
|
|
363 |
{
|
|
|
364 |
NProgress.start();
|
|
|
365 |
$.ajax({
|
|
|
366 |
'dataType' : 'json',
|
|
|
367 |
'accept' : 'application/json',
|
|
|
368 |
'method' : 'post',
|
|
|
369 |
'url' : $('#form-extended').attr('action'),
|
|
|
370 |
'data' : $('#form-extended').serialize()
|
|
|
371 |
}).done(function(response) {
|
|
|
372 |
if(response['success']) {
|
|
|
373 |
|
|
|
374 |
$('#overview-description').html(response['data']['description']);
|
|
|
375 |
$("#extended-box").modal('hide');
|
|
|
376 |
} else {
|
|
|
377 |
validatorExtended.resetForm();
|
|
|
378 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
379 |
$.fn.showError(response['data']);
|
|
|
380 |
} else {
|
|
|
381 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
382 |
$.fn.showFormErrorValidator('#form-extended #' + fieldname, errors);
|
|
|
383 |
});
|
|
|
384 |
}
|
|
|
385 |
}
|
|
|
386 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
387 |
$.fn.showError(textStatus);
|
|
|
388 |
}).always(function() {
|
|
|
389 |
NProgress.done();
|
|
|
390 |
});
|
|
|
391 |
return false;
|
|
|
392 |
},
|
|
|
393 |
invalidHandler: function(form, validator) {
|
|
|
394 |
|
|
|
395 |
}
|
|
|
396 |
});
|
|
|
397 |
|
|
|
398 |
|
|
|
399 |
$('.btn-extended-edit').on("click", function(e){
|
|
|
400 |
e.preventDefault();
|
|
|
401 |
|
|
|
402 |
NProgress.start();
|
|
|
403 |
$.ajax({
|
|
|
404 |
'dataType' : 'json',
|
|
|
405 |
'accept' : 'application/json',
|
|
|
406 |
'method' : 'get',
|
|
|
407 |
'url' : '$routeExtended',
|
|
|
408 |
}).done(function(response) {
|
|
|
409 |
if(response['success']) {
|
|
|
410 |
CKEDITOR.instances.description.setData(response['data']['description']);
|
|
|
411 |
validatorExtended.resetForm();
|
|
|
412 |
|
|
|
413 |
$("#extended-box").modal('show');
|
|
|
414 |
} else {
|
|
|
415 |
$.fn.showError(response['data']);
|
|
|
416 |
}
|
|
|
417 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
418 |
$.fn.showError(textStatus);
|
|
|
419 |
}).always(function() {
|
|
|
420 |
NProgress.done();
|
|
|
421 |
});
|
|
|
422 |
return false;
|
|
|
423 |
|
|
|
424 |
});
|
|
|
425 |
|
|
|
426 |
$('.btn-extended-close').on("click", function(e){
|
|
|
427 |
e.preventDefault();
|
|
|
428 |
|
|
|
429 |
$("#extended-box").modal('hide');
|
|
|
430 |
return false;
|
|
|
431 |
});
|
|
|
432 |
|
6486 |
stevensc |
433 |
var validatorCompanySize = $('#form-company-size').validate({
|
|
|
434 |
debug: true,
|
|
|
435 |
onclick: false,
|
|
|
436 |
onkeyup: false,
|
|
|
437 |
onfocusout: false,
|
|
|
438 |
ignore: [],
|
|
|
439 |
rules: {
|
|
|
440 |
'company_size_id': {
|
|
|
441 |
required: true,
|
|
|
442 |
},
|
|
|
443 |
},
|
|
|
444 |
|
|
|
445 |
submitHandler: function(form)
|
|
|
446 |
{
|
|
|
447 |
NProgress.start();
|
|
|
448 |
$.ajax({
|
|
|
449 |
'dataType' : 'json',
|
|
|
450 |
'accept' : 'application/json',
|
|
|
451 |
'method' : 'post',
|
|
|
452 |
'url' : $('#form-company-size').attr('action'),
|
|
|
453 |
'data' : $('#form-company-size').serialize()
|
|
|
454 |
}).done(function(response) {
|
|
|
455 |
if(response['success']) {
|
|
|
456 |
|
|
|
457 |
$('#overview-company-size').html(response['data']);
|
|
|
458 |
$("#company-size-box").modal('hide');
|
|
|
459 |
} else {
|
|
|
460 |
validatorCompanySize.resetForm();
|
|
|
461 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
462 |
$.fn.showError(response['data']);
|
|
|
463 |
} else {
|
|
|
464 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
465 |
$.fn.showFormErrorValidator('#form-company-size #' + fieldname, errors);
|
|
|
466 |
});
|
|
|
467 |
}
|
|
|
468 |
}
|
|
|
469 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
470 |
$.fn.showError(textStatus);
|
|
|
471 |
}).always(function() {
|
|
|
472 |
NProgress.done();
|
|
|
473 |
});
|
|
|
474 |
return false;
|
|
|
475 |
},
|
|
|
476 |
invalidHandler: function(form, validator) {
|
|
|
477 |
|
|
|
478 |
}
|
|
|
479 |
});
|
|
|
480 |
|
|
|
481 |
|
|
|
482 |
$('.btn-company-size-edit').on("click", function(e){
|
|
|
483 |
e.preventDefault();
|
|
|
484 |
|
|
|
485 |
NProgress.start();
|
|
|
486 |
$.ajax({
|
|
|
487 |
'dataType' : 'json',
|
|
|
488 |
'accept' : 'application/json',
|
|
|
489 |
'method' : 'get',
|
|
|
490 |
'url' : '$routeCompanySize',
|
|
|
491 |
}).done(function(response) {
|
|
|
492 |
if(response['success']) {
|
|
|
493 |
$('#form-company-size #company_size_id').val(response['data']['company_size_id']).trigger('change');
|
|
|
494 |
|
|
|
495 |
validatorCompanySize.resetForm();
|
|
|
496 |
|
|
|
497 |
$("#company-size-box").modal('show');
|
|
|
498 |
} else {
|
|
|
499 |
$.fn.showError(response['data']);
|
|
|
500 |
}
|
|
|
501 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
502 |
$.fn.showError(textStatus);
|
|
|
503 |
}).always(function() {
|
|
|
504 |
NProgress.done();
|
|
|
505 |
});
|
|
|
506 |
return false;
|
|
|
507 |
|
|
|
508 |
});
|
|
|
509 |
|
|
|
510 |
$('.btn-company-size-close').on("click", function(e){
|
|
|
511 |
e.preventDefault();
|
|
|
512 |
|
|
|
513 |
$("#company-size-box").modal('hide');
|
|
|
514 |
return false;
|
|
|
515 |
});
|
|
|
516 |
|
1 |
www |
517 |
var validatorIndustry = $('#form-industry').validate({
|
|
|
518 |
debug: true,
|
|
|
519 |
onclick: false,
|
|
|
520 |
onkeyup: false,
|
|
|
521 |
onfocusout: false,
|
|
|
522 |
ignore: [],
|
|
|
523 |
rules: {
|
|
|
524 |
'industry_id': {
|
|
|
525 |
required: true,
|
|
|
526 |
},
|
|
|
527 |
},
|
|
|
528 |
|
|
|
529 |
submitHandler: function(form)
|
|
|
530 |
{
|
|
|
531 |
NProgress.start();
|
|
|
532 |
$.ajax({
|
|
|
533 |
'dataType' : 'json',
|
|
|
534 |
'accept' : 'application/json',
|
|
|
535 |
'method' : 'post',
|
|
|
536 |
'url' : $('#form-industry').attr('action'),
|
|
|
537 |
'data' : $('#form-industry').serialize()
|
|
|
538 |
}).done(function(response) {
|
|
|
539 |
if(response['success']) {
|
|
|
540 |
|
|
|
541 |
$('#overview-industry').html(response['data']);
|
|
|
542 |
$("#industry-box").modal('hide');
|
|
|
543 |
} else {
|
|
|
544 |
validatorIndustry.resetForm();
|
|
|
545 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
546 |
$.fn.showError(response['data']);
|
|
|
547 |
} else {
|
|
|
548 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
549 |
$.fn.showFormErrorValidator('#form-industry #' + fieldname, errors);
|
|
|
550 |
});
|
|
|
551 |
}
|
|
|
552 |
}
|
|
|
553 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
554 |
$.fn.showError(textStatus);
|
|
|
555 |
}).always(function() {
|
|
|
556 |
NProgress.done();
|
|
|
557 |
});
|
|
|
558 |
return false;
|
|
|
559 |
},
|
|
|
560 |
invalidHandler: function(form, validator) {
|
|
|
561 |
|
|
|
562 |
}
|
|
|
563 |
});
|
|
|
564 |
|
|
|
565 |
|
|
|
566 |
$('.btn-industry-edit').on("click", function(e){
|
|
|
567 |
e.preventDefault();
|
|
|
568 |
|
|
|
569 |
NProgress.start();
|
|
|
570 |
$.ajax({
|
|
|
571 |
'dataType' : 'json',
|
|
|
572 |
'accept' : 'application/json',
|
|
|
573 |
'method' : 'get',
|
|
|
574 |
'url' : '$routeIndustry',
|
|
|
575 |
}).done(function(response) {
|
|
|
576 |
if(response['success']) {
|
|
|
577 |
$('#form-industry #industry_id').val(response['data']['industry_id']).trigger('change');
|
|
|
578 |
|
|
|
579 |
validatorIndustry.resetForm();
|
|
|
580 |
|
|
|
581 |
$("#industry-box").modal('show');
|
|
|
582 |
} else {
|
|
|
583 |
$.fn.showError(response['data']);
|
|
|
584 |
}
|
|
|
585 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
586 |
$.fn.showError(textStatus);
|
|
|
587 |
}).always(function() {
|
|
|
588 |
NProgress.done();
|
|
|
589 |
});
|
|
|
590 |
return false;
|
|
|
591 |
|
|
|
592 |
});
|
|
|
593 |
|
|
|
594 |
$('.btn-industry-close').on("click", function(e){
|
|
|
595 |
e.preventDefault();
|
|
|
596 |
|
|
|
597 |
$("#industry-box").modal('hide');
|
|
|
598 |
return false;
|
|
|
599 |
});
|
|
|
600 |
|
|
|
601 |
var validatorImage = $('#form-image').validate({
|
|
|
602 |
debug: true,
|
|
|
603 |
onclick: false,
|
|
|
604 |
onkeyup: false,
|
|
|
605 |
onfocusout: false,
|
|
|
606 |
ignore: [],
|
|
|
607 |
rules: {
|
|
|
608 |
'image': {
|
|
|
609 |
required: true,
|
|
|
610 |
extension: 'jpg|jpeg|png',
|
|
|
611 |
accept: 'image/jpeg,image/png'
|
|
|
612 |
},
|
|
|
613 |
},
|
|
|
614 |
|
|
|
615 |
submitHandler: function(form)
|
|
|
616 |
{
|
|
|
617 |
var formdata = false;
|
|
|
618 |
if (window.FormData){
|
|
|
619 |
formdata = new FormData(form); //form[0]);
|
|
|
620 |
}
|
|
|
621 |
|
|
|
622 |
NProgress.start();
|
|
|
623 |
$.ajax({
|
|
|
624 |
'dataType' : 'json',
|
|
|
625 |
'accept' : 'application/json',
|
|
|
626 |
'method' : 'post',
|
|
|
627 |
'url' : $('#form-image').attr('action'),
|
|
|
628 |
'data' : formdata ? formdata : $('#form-image').serialize(),
|
|
|
629 |
'processData': false,
|
|
|
630 |
'contentType': false,
|
|
|
631 |
}).done(function(response) {
|
|
|
632 |
if(response['success']) {
|
|
|
633 |
$('#company-img').attr('src',response['data']);
|
|
|
634 |
$("#image-box").modal('hide');
|
|
|
635 |
} else {
|
|
|
636 |
validatorImage.resetForm();
|
|
|
637 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
638 |
$.fn.showError(response['data']);
|
|
|
639 |
} else {
|
|
|
640 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
641 |
console.log('#form-image #' + fieldname);
|
|
|
642 |
|
|
|
643 |
$.fn.showFormErrorValidator('#form-image #' + fieldname, errors);
|
|
|
644 |
});
|
|
|
645 |
}
|
|
|
646 |
}
|
|
|
647 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
648 |
$.fn.showError(textStatus);
|
|
|
649 |
}).always(function() {
|
|
|
650 |
NProgress.done();
|
|
|
651 |
});
|
|
|
652 |
return false;
|
|
|
653 |
},
|
|
|
654 |
invalidHandler: function(form, validator) {
|
|
|
655 |
|
|
|
656 |
}
|
|
|
657 |
});
|
|
|
658 |
|
|
|
659 |
$('.btn-image-open').on("click", function(e){
|
|
|
660 |
e.preventDefault();
|
|
|
661 |
$('#form-image #image').fileinput('reset');
|
|
|
662 |
$('#form-image #image').val('');
|
|
|
663 |
validatorImage.resetForm();
|
|
|
664 |
$("#image-box").modal('show');
|
|
|
665 |
return false;
|
|
|
666 |
});
|
|
|
667 |
|
|
|
668 |
$('.btn-image-close').on("click", function(e){
|
|
|
669 |
e.preventDefault();
|
|
|
670 |
|
|
|
671 |
$("#image-box").modal('hide');
|
|
|
672 |
return false;
|
|
|
673 |
});
|
|
|
674 |
|
|
|
675 |
$('.btn-image-explorer').on("click", function(e){
|
|
|
676 |
e.preventDefault();
|
|
|
677 |
$('#form-image #image').click();
|
|
|
678 |
return false;
|
|
|
679 |
});
|
|
|
680 |
|
|
|
681 |
$("#form-cover #cover").fileinput({
|
|
|
682 |
theme: 'fas',
|
|
|
683 |
language: 'es',
|
|
|
684 |
showUpload: false,
|
|
|
685 |
dropZoneEnabled: false,
|
|
|
686 |
maxFileCount: 1,
|
|
|
687 |
allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
|
|
|
688 |
mainClass: "input-group",
|
|
|
689 |
msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size_cover',
|
|
|
690 |
});
|
|
|
691 |
|
|
|
692 |
$("#form-image #image").fileinput({
|
|
|
693 |
theme: 'fas',
|
|
|
694 |
language: 'es',
|
|
|
695 |
showUpload: false,
|
|
|
696 |
dropZoneEnabled: false,
|
|
|
697 |
maxFileCount: 1,
|
|
|
698 |
allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
|
|
|
699 |
mainClass: "input-group",
|
|
|
700 |
msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size_profile',
|
|
|
701 |
});
|
|
|
702 |
|
|
|
703 |
CKEDITOR.replace('description');
|
|
|
704 |
|
|
|
705 |
autocompleteLocation.addListener('place_changed', $.fn.fillInAddressLocation);
|
|
|
706 |
|
|
|
707 |
$('#form-location #is_main').bootstrapToggle({'on' : 'LABEL_MAIN_LOCATION', 'off' : 'LABEL_SECONDARY_LOCATION', 'width' : '160px', 'height' : '40px'});
|
|
|
708 |
|
|
|
709 |
});
|
|
|
710 |
|
|
|
711 |
JS;
|
|
|
712 |
$this->inlineScript()->captureEnd();
|
|
|
713 |
|
6005 |
stevensc |
714 |
$jsonLocations = json_encode($locations);
|
5743 |
stevensc |
715 |
$js = <<<JS
|
|
|
716 |
const urlVars = {
|
|
|
717 |
routeWebsite: "$routeWebsite",
|
|
|
718 |
routeCompanySize: "$routeCompanySize",
|
|
|
719 |
routeIndustry: "$routeIndustry",
|
|
|
720 |
routeExtended: "$routeExtended",
|
|
|
721 |
routeSocialNetworks: "$routeSocialNetworks",
|
|
|
722 |
routeLocationAdd: "$routeLocationAdd",
|
|
|
723 |
routeFoundationYear: "$routeFoundationYear",
|
|
|
724 |
routeImageUpload: "$routeImageUpload",
|
|
|
725 |
routeCoverUpload: "$routeCoverUpload",
|
|
|
726 |
routeFooterUpload: "$routeFooterUpload",
|
5757 |
stevensc |
727 |
routeHeaderUpload: "$routeHeaderUpload",
|
|
|
728 |
cover: "$cover",
|
5795 |
stevensc |
729 |
companyId: "$companyId",
|
5925 |
stevensc |
730 |
followers: "$follower",
|
5988 |
stevensc |
731 |
image: "$image",
|
6002 |
stevensc |
732 |
overview: "$overview",
|
6025 |
stevensc |
733 |
locations: JSON.parse('$jsonLocations'),
|
6026 |
stevensc |
734 |
industry: "$industry",
|
6027 |
stevensc |
735 |
companySize: "$company_size",
|
6050 |
stevensc |
736 |
companyName: "$company_name",
|
|
|
737 |
foundationYear: "$foundation_year",
|
6055 |
stevensc |
738 |
website: "$website",
|
6059 |
stevensc |
739 |
header: "$header",
|
|
|
740 |
footer: "$footer"
|
5743 |
stevensc |
741 |
}
|
|
|
742 |
JS;
|
|
|
743 |
|
|
|
744 |
$this->inlineScript()->appendScript($js);
|
6448 |
stevensc |
745 |
$this->headLink()->appendStylesheet('/react-bundles/profile/main.css');
|
5743 |
stevensc |
746 |
$this->inlineScript()->appendFile('/react-bundles/profile/profileBundle.js');
|
1 |
www |
747 |
?>
|
|
|
748 |
|
777 |
geraldo |
749 |
<style>
|
5743 |
stevensc |
750 |
.user-profile-ov {
|
|
|
751 |
position: relative;
|
|
|
752 |
}
|
777 |
geraldo |
753 |
|
5743 |
stevensc |
754 |
.user-profile-ov .add-dp {
|
|
|
755 |
position: absolute;
|
|
|
756 |
top: 30%;
|
|
|
757 |
right: 10%;
|
|
|
758 |
}
|
779 |
geraldo |
759 |
|
5743 |
stevensc |
760 |
.user-profile-ov .add-dp i {
|
|
|
761 |
font-size: 14px;
|
|
|
762 |
border: 2px solid #fff;
|
|
|
763 |
background: #e44d3a;
|
|
|
764 |
padding: 11px;
|
|
|
765 |
color: #ffff
|
|
|
766 |
}
|
777 |
geraldo |
767 |
</style>
|
|
|
768 |
|
1 |
www |
769 |
<!-- Content Header (Page header) -->
|
5743 |
stevensc |
770 |
<div id="profile">
|
5800 |
stevensc |
771 |
</div>
|
1 |
www |
772 |
<div class="modal" tabindex="-1" role="dialog" id="extended-box">
|
5743 |
stevensc |
773 |
<div class="modal-dialog" role="document">
|
|
|
774 |
<?php
|
|
|
775 |
$form = $this->formExtended;
|
|
|
776 |
$form->setAttributes([
|
|
|
777 |
'method' => 'post',
|
|
|
778 |
'action' => $routeExtended,
|
|
|
779 |
'name' => 'form-extended',
|
|
|
780 |
'id' => 'form-extended'
|
|
|
781 |
]);
|
|
|
782 |
$form->prepare();
|
|
|
783 |
echo $this->form()->openTag($form);
|
|
|
784 |
?>
|
|
|
785 |
<div class="modal-content">
|
|
|
786 |
<div class="modal-header">
|
|
|
787 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
770 |
geraldo |
788 |
</div>
|
5743 |
stevensc |
789 |
<div class="modal-body">
|
|
|
790 |
<div class="form-group">
|
|
|
791 |
<?php
|
|
|
792 |
$element = $form->get('description');
|
|
|
793 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
794 |
$element->setOptions(['label' => 'LABEL_OVERVIEW']);
|
|
|
795 |
echo $this->formLabel($element);
|
|
|
796 |
echo $this->formTextArea($element);
|
|
|
797 |
?>
|
|
|
798 |
</div>
|
|
|
799 |
</div>
|
|
|
800 |
<div class="modal-footer">
|
|
|
801 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
802 |
<button type="button" class="btn btn-default btn-extended-close">LABEL_CANCEL</button>
|
|
|
803 |
</div>
|
|
|
804 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
805 |
</div>
|
|
|
806 |
</div>
|
1 |
www |
807 |
</div>
|
|
|
808 |
<div class="modal" tabindex="-1" role="dialog" id="industry-box">
|
5743 |
stevensc |
809 |
<div class="modal-dialog" role="document">
|
|
|
810 |
<?php
|
|
|
811 |
$form = $this->formIndustry;
|
|
|
812 |
$form->setAttributes([
|
|
|
813 |
'method' => 'post',
|
|
|
814 |
'action' => $routeIndustry,
|
|
|
815 |
'name' => 'form-industry',
|
|
|
816 |
'id' => 'form-industry'
|
|
|
817 |
]);
|
|
|
818 |
$form->prepare();
|
|
|
819 |
echo $this->form()->openTag($form);
|
|
|
820 |
?>
|
|
|
821 |
<div class="modal-content">
|
|
|
822 |
<div class="modal-header">
|
|
|
823 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
770 |
geraldo |
824 |
</div>
|
5743 |
stevensc |
825 |
<div class="modal-body">
|
|
|
826 |
<div class="form-group">
|
|
|
827 |
<?php
|
|
|
828 |
$element = $form->get('industry_id');
|
|
|
829 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
830 |
$element->setOptions(['label' => 'LABEL_INDUSTRY']);
|
|
|
831 |
echo $this->formLabel($element);
|
|
|
832 |
echo $this->formSelect($element);
|
|
|
833 |
?>
|
|
|
834 |
</div>
|
|
|
835 |
</div>
|
|
|
836 |
<div class="modal-footer">
|
|
|
837 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
838 |
<button type="button" class="btn btn-default btn-industry-close">LABEL_CANCEL</button>
|
|
|
839 |
</div>
|
|
|
840 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
841 |
</div>
|
|
|
842 |
</div>
|
1 |
www |
843 |
</div>
|
|
|
844 |
<div class="modal" tabindex="-1" role="dialog" id="company-size-box">
|
5743 |
stevensc |
845 |
<div class="modal-dialog" role="document">
|
|
|
846 |
<?php
|
|
|
847 |
$form = $this->formCompanySize;
|
|
|
848 |
$form->setAttributes([
|
|
|
849 |
'method' => 'post',
|
|
|
850 |
'action' => $routeCompanySize,
|
|
|
851 |
'name' => 'form-company-size',
|
|
|
852 |
'id' => 'form-company-size'
|
|
|
853 |
]);
|
|
|
854 |
$form->prepare();
|
|
|
855 |
echo $this->form()->openTag($form);
|
|
|
856 |
?>
|
|
|
857 |
<div class="modal-content">
|
|
|
858 |
<div class="modal-header">
|
|
|
859 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
770 |
geraldo |
860 |
</div>
|
5743 |
stevensc |
861 |
<div class="modal-body">
|
|
|
862 |
<div class="form-group">
|
|
|
863 |
<?php
|
|
|
864 |
$element = $form->get('company_size_id');
|
|
|
865 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
866 |
$element->setOptions(['label' => 'LABEL_COMPANY_SIZE']);
|
|
|
867 |
echo $this->formLabel($element);
|
|
|
868 |
echo $this->formSelect($element);
|
|
|
869 |
?>
|
|
|
870 |
</div>
|
|
|
871 |
</div>
|
|
|
872 |
<div class="modal-footer">
|
|
|
873 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
874 |
<button type="button" class="btn btn-default btn-company-size-close">LABEL_CANCEL</button>
|
|
|
875 |
</div>
|
|
|
876 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
877 |
</div>
|
|
|
878 |
</div>
|
1 |
www |
879 |
</div>
|
|
|
880 |
<div class="modal" tabindex="-1" role="dialog" id="location-box">
|
5743 |
stevensc |
881 |
<div class="modal-dialog" role="document">
|
|
|
882 |
<?php
|
|
|
883 |
$form = $this->formLocation;
|
|
|
884 |
$form->setAttributes([
|
|
|
885 |
'method' => 'post',
|
|
|
886 |
'action' => '',
|
|
|
887 |
'name' => 'form-location',
|
|
|
888 |
'id' => 'form-location'
|
|
|
889 |
]);
|
|
|
890 |
$form->prepare();
|
|
|
891 |
echo $this->form()->openTag($form);
|
|
|
892 |
|
|
|
893 |
$fieldnames = [
|
|
|
894 |
'formatted_address',
|
|
|
895 |
'address1',
|
|
|
896 |
'address2',
|
|
|
897 |
'country',
|
|
|
898 |
'state',
|
|
|
899 |
'city1',
|
|
|
900 |
'city2',
|
|
|
901 |
'postal_code',
|
|
|
902 |
'latitude',
|
|
|
903 |
'longitude',
|
|
|
904 |
];
|
|
|
905 |
|
|
|
906 |
foreach ($fieldnames as $fieldname) {
|
|
|
907 |
|
|
|
908 |
$element = $form->get($fieldname);
|
|
|
909 |
echo $this->formHidden($element);
|
|
|
910 |
}
|
|
|
911 |
?>
|
|
|
912 |
<div class="modal-content">
|
|
|
913 |
<div class="modal-header">
|
|
|
914 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
770 |
geraldo |
915 |
</div>
|
5743 |
stevensc |
916 |
<div class="modal-body">
|
|
|
917 |
<div class="form-group datefm">
|
|
|
918 |
<?php
|
|
|
919 |
$element = $form->get('location_search');
|
|
|
920 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
921 |
$element->setOptions(['label' => 'LABEL_LOCATION']);
|
|
|
922 |
echo $this->formLabel($element);
|
|
|
923 |
echo $this->formText($element);
|
|
|
924 |
?>
|
|
|
925 |
<i class="fa fa-map-marker"></i>
|
|
|
926 |
</div>
|
|
|
927 |
<div class="form-group">
|
|
|
928 |
<?php
|
|
|
929 |
$element = $form->get('is_main');
|
|
|
930 |
echo $this->formCheckbox($element);
|
|
|
931 |
?>
|
|
|
932 |
</div>
|
770 |
geraldo |
933 |
</div>
|
5743 |
stevensc |
934 |
<div class="modal-footer">
|
|
|
935 |
<button type="submit" class="btn btn-primary ">LABEL_SAVE</button>
|
|
|
936 |
<button type="button" class="btn btn-default btn-location-close">LABEL_CANCEL</button>
|
|
|
937 |
</div>
|
|
|
938 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
939 |
</div>
|
|
|
940 |
</div>
|
1 |
www |
941 |
</div>
|
5743 |
stevensc |
942 |
<div class="modal" tabindex="-1" role="dialog" id="image-box">
|
|
|
943 |
<div class="modal-dialog" role="document">
|
|
|
944 |
<?php
|
|
|
945 |
$form = $this->formImage;
|
|
|
946 |
$form->setAttributes([
|
|
|
947 |
'method' => 'post',
|
|
|
948 |
'action' => $routeImageUpload,
|
|
|
949 |
'name' => 'form-image',
|
|
|
950 |
'id' => 'form-image',
|
|
|
951 |
'enctype' => 'multipart/form-data'
|
|
|
952 |
]);
|
|
|
953 |
$form->prepare();
|
|
|
954 |
echo $this->form()->openTag($form);
|
|
|
955 |
?>
|
|
|
956 |
<div class="modal-content">
|
|
|
957 |
<div class="modal-header">
|
|
|
958 |
<h3 class="modal-title">LABEL_CHANGE</h3>
|
770 |
geraldo |
959 |
</div>
|
5743 |
stevensc |
960 |
<div class="modal-body">
|
|
|
961 |
<div class="form-group">
|
|
|
962 |
<div class="file-loading">
|
|
|
963 |
<?php
|
|
|
964 |
$element = $form->get('image');
|
|
|
965 |
$element->setAttributes(['class' => 'form-control', 'accept' => 'image/jpeg,image/png']);
|
|
|
966 |
$element->setOptions(['label' => 'LABEL_IMAGE']);
|
|
|
967 |
echo $this->formLabel($element);
|
|
|
968 |
echo $this->formFile($element);
|
|
|
969 |
?>
|
|
|
970 |
</div>
|
|
|
971 |
</div>
|
770 |
geraldo |
972 |
</div>
|
|
|
973 |
<div class="modal-footer">
|
5743 |
stevensc |
974 |
<button type="submit" class="btn btn-primary">LABEL_UPLOAD</button>
|
|
|
975 |
<button type="button" class="btn btn-default btn-image-close">LABEL_CANCEL</button>
|
770 |
geraldo |
976 |
</div>
|
5743 |
stevensc |
977 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
978 |
</div>
|
|
|
979 |
</div>
|
6060 |
stevensc |
980 |
</div>
|