Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 8523 | Rev 8525 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 8523 Rev 8524
Línea 22... Línea 22...
22
$routeImageUpload = $this->url('profile/image', ['id' => $currentCompany->uuid, 'operation' => 'upload']);
22
$routeImageUpload = $this->url('profile/image', ['id' => $currentCompany->uuid, 'operation' => 'upload']);
23
$routeCoverUpload = $this->url('profile/cover', ['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']);
24
$routeFooterUpload = $this->url('profile/footer', ['id' => $currentCompany->uuid, 'operation' => 'upload']);
25
$routeHeaderUpload = $this->url('profile/header', ['id' => $currentCompany->uuid, 'operation' => 'upload']);
25
$routeHeaderUpload = $this->url('profile/header', ['id' => $currentCompany->uuid, 'operation' => 'upload']);
Línea 26... Línea -...
26
 
-
 
27
 
-
 
28
$this->inlineScript()->appendFile('https://maps.googleapis.com/maps/api/js?key=' . $google_map_key . '&libraries=places');
-
 
29
 
26
 
30
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
27
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
Línea 31... Línea -...
31
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
-
 
32
 
-
 
33
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
-
 
34
 
-
 
35
 
-
 
36
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
-
 
37
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.css'));
-
 
38
 
-
 
39
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
-
 
40
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
-
 
41
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
-
 
42
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
-
 
43
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fas/theme.js'));
-
 
44
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.js'));
-
 
45
 
28
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
46
 
29
 
47
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
30
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
Línea 48... Línea -...
48
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
-
 
49
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
-
 
50
 
31
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
51
 
32
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
52
 
33
 
Línea 53... Línea -...
53
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
-
 
54
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
34
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
55
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.min.js'));
35
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
Línea 56... Línea -...
56
 
-
 
57
 
36
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.min.js'));
58
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.min.js'));
37
 
Línea 59... Línea -...
59
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
-
 
60
 
-
 
61
 
-
 
62
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
-
 
63
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
-
 
64
 
-
 
65
 
-
 
66
 
-
 
67
 
38
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.min.js'));
68
 
39
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
69
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
40
 
Línea 70... Línea -...
70
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
-
 
71
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
-
 
72
 
-
 
73
$this->inlineScript()->captureStart();
-
 
74
echo <<<JS
-
 
75
jQuery( document ).ready(function( $ ) {
-
 
76
 
-
 
77
 
-
 
78
 
-
 
79
    $.validator.addMethod('greaterThan', function (value, element, param) {
-
 
80
        var otherElement = $(param);
-
 
81
        return parseInt(value, 10) > parseInt(otherElement.val(), 10);
-
 
82
    }, 'ERROR_INVALID_MINIMUM');
-
 
83
 
-
 
84
 
-
 
85
    $.validator.addMethod('checkLocation', function (value, element, param) {
-
 
86
        var otherElement = $(param);
-
 
87
        return $.trim(otherElement.val()).length > 0;
-
 
88
    }, 'ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY');
-
 
89
 
-
 
90
    var autocompleteLocation = new google.maps.places.Autocomplete(
-
 
91
        (document.getElementById('location_search')),
-
 
92
        {types: ['(cities)']}
-
 
93
    );
-
 
94
 
-
 
95
 
-
 
96
 
-
 
97
 
-
 
98
 
-
 
99
    $.fn.fillInAddressLocation = function() {
-
 
100
        console.log('fillInAddressLocation');
-
 
101
 
-
 
102
        var place = autocompleteLocation.getPlace();
-
 
103
        if (!place.geometry) {
-
 
104
            $.fn.showError('ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY')
-
 
105
            return;
-
 
106
        } else {
-
 
107
        address1 = '';
-
 
108
        address2 = '';
-
 
109
        city1 = '';
-
 
110
        city2 = '';
-
 
111
        state = '';
-
 
112
        country = '';
-
 
113
        postal_code = '';
-
 
114
 
-
 
115
        formatted_address = place.formatted_address;
-
 
116
        latitude = place.geometry.location.lat();
-
 
117
        longitude = place.geometry.location.lng();
-
 
118
        var arrAddress = place.address_components;
-
 
119
            
-
 
120
        $.each(arrAddress, function(i, address_component) {
-
 
121
            if (address_component.types[0] == "route") {
-
 
122
                address1 = address_component.long_name;
-
 
123
            }
-
 
124
            if (address_component.types[0] == "sublocality") {
-
 
125
                address2 = address_component.long_name;
-
 
126
            }
-
 
127
            if (address_component.types[0] == "locality") {
-
 
128
                city1 = address_component.long_name;
-
 
129
            }
-
 
130
            if (address_component.types[0] == "administrative_area_level_2") {
-
 
131
                city2 = address_component.long_name;
-
 
132
            }
-
 
133
            if (address_component.types[0] == "administrative_area_level_1") {
-
 
134
                state = address_component.long_name;
-
 
135
            }
-
 
136
            if (address_component.types[0] == "country") {
-
 
137
                country = address_component.long_name;
-
 
138
            }
-
 
139
            if (address_component.types[0] == "postal_code") {
-
 
140
                postal_code = address_component.long_name;
-
 
141
            }
-
 
142
        });
-
 
143
 
-
 
144
        $('#form-location #formatted_address').val(formatted_address);
-
 
145
        $('#form-location #address1').val(address1);
-
 
146
        $('#form-location #address2').val(address2);
-
 
147
        $('#form-location #city1').val(city1);
-
 
148
        $('#form-location #city2').val(city2);
-
 
149
        $('#form-location #state').val(state);
-
 
150
        $('#form-location #country').val(country);
-
 
151
        $('#form-location #postal_code').val(postal_code);
-
 
152
        $('#form-location #latitude').val(latitude);
-
 
153
        $('#form-location #longitude').val(longitude);
-
 
154
 
-
 
155
        }
-
 
156
    }
-
 
157
    $.fn.renderLocation = function(data) {
-
 
158
        $('#locations-records').empty();
-
 
159
        if(Array.isArray(data)) {
-
 
160
            max = data.length;
-
 
161
            for(i = 0; i < max; i++)
-
 
162
            {
-
 
163
                var location = data[i];
-
 
164
                s = '<p>' + location['formatted_address']; 
-
 
165
                if(location['is_main'] == 'y') {
-
 
166
                    s = s + ' (LABEL_MAIN_LOCATION) '; 
-
 
167
                }
-
 
168
                s = s + ' <a href="#" title="" data-link="' + location['link_edit'] + '" class="btn-location-edit"><i class="fa fa-pencil"></i></a>&nbsp; ';
-
 
169
                s = s + ' <a href="#" title="" data-link="' + location['link_delete'] + '" class="btn-location-delete"><i class="fa fa-trash"></i></a>';
-
 
170
                s = s + ' </p>';
-
 
171
 
-
 
172
                if(i < (max - 1)) { 
-
 
173
                    s = s + '<hr/>'; 
-
 
174
                }
-
 
175
                $('#locations-records').append(s);
-
 
176
            }      
-
 
177
        }
-
 
178
    }
-
 
179
 
-
 
180
       
-
 
181
    
-
 
182
            $.validator.setDefaults({
-
 
183
            debug: true,
-
 
184
            highlight: function(element) {
-
 
185
                $(element).addClass('is-invalid');
-
 
186
            },
-
 
187
            unhighlight: function(element) {
-
 
188
                $(element).removeClass('is-invalid');
-
 
189
            },
-
 
190
            errorElement: 'span',
-
 
191
            errorClass: 'error invalid-feedback',
-
 
192
            errorPlacement: function(error, element) {
-
 
193
                if(element.parent('.form-group').length) {
-
 
194
                    error.insertAfter(element);
-
 
195
                } else if(element.parent('.toggle').length) {
-
 
196
                    error.insertAfter(element.parent().parent());
-
 
197
                } else {
-
 
198
                    error.insertAfter(element.parent());
-
 
199
                }
-
 
200
            }
-
 
201
        });
-
 
202
    
-
 
203
    
-
 
204
        $.fn.showFormErrorValidator = function(fieldname, errors) {
-
 
205
            var field = $(fieldname);
-
 
206
            if(field) {
-
 
207
                $(field).addClass('is-invalid');
-
 
208
    
-
 
209
 
-
 
210
                var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
-
 
211
                if(field.parent('.form-group').length) {
-
 
212
                    error.insertAfter(field);
-
 
213
                } else  if(field.parent('.toggle').length) {
-
 
214
                    error.insertAfter(field.parent().parent());
-
 
215
                } else {
-
 
216
                    error.insertAfter(field.parent());
-
 
217
                }
41
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
218
            }
42
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
219
        };
43
 
220
 
44
$this->inlineScript()->captureStart();
221
    
45
echo <<<JS
222
 
46
jQuery( document ).ready(function( $ ) {
223
   
47
 
224
    var validatorLocation = $('#form-location').validate({
48
	var validatorCompanySize = $('#form-company-size').validate({
225
        debug: true,
49
        debug: true,
226
        onclick: false,
-
 
227
        onkeyup: false,
-
 
228
        onfocusout: false,
-
 
229
        ignore: [],
-
 
230
        rules: {
-
 
231
            'location_search': {
-
 
232
                required: true,
-
 
233
                checkLocation: '#form-location #latitude'
-
 
234
            }
-
 
235
        },
-
 
236
        submitHandler: function(form)
-
 
237
        {
-
 
238
            NProgress.start();
-
 
239
            $.ajax({
-
 
240
                'dataType'  : 'json',
-
 
241
                'accept'    : 'application/json',
-
 
242
                'method'    : 'post',
-
 
243
                'url'       :  $('#form-location').attr('action'),
-
 
244
                'data'      :  $('#form-location').serialize(),
-
 
245
            }).done(function(response) {
-
 
246
                if(response['success']) {
-
 
247
                    $.fn.renderLocation(response['data']);
-
 
248
        						
-
 
249
                    $("#location-box").modal('hide');
-
 
250
                } else {
-
 
251
                    validatorLocation.resetForm();
-
 
252
                    $.fn.showError(response['data']);
-
 
253
                }
-
 
254
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
255
                $.fn.showError(textStatus);
-
 
256
            }).always(function() {
-
 
257
                NProgress.done();
-
 
258
            });
-
 
259
            return false;
-
 
260
        },
-
 
261
        invalidHandler: function(form, validator) {
-
 
262
        
-
 
263
        }
-
 
264
    });
-
 
265
 
-
 
266
    $('.btn-location-add').on("click", function(e){
-
 
267
        e.preventDefault();
-
 
268
 
-
 
269
        $('#form-location').attr('action', '$routeLocationAdd');
-
 
270
        $('#form-location #location_search').val('');
-
 
271
        $('#form-location #formatted_address').val('');
-
 
272
        $('#form-location #address1').val('');
-
 
273
        $('#form-location #address2').val('');
-
 
274
        $('#form-location #country').val('');
-
 
275
        $('#form-location #state').val('');
-
 
276
        $('#form-location #city1').val('');
-
 
277
        $('#form-location #city2').val('');
-
 
278
        $('#form-location #postal_code').val('');
-
 
279
        $('#form-location #latitude').val('');
-
 
280
        $('#form-location #longitude').val('');
-
 
281
        validatorLocation.resetForm();
-
 
282
 
-
 
283
        $("#location-box").modal('show');
-
 
284
    });
-
 
285
 
-
 
286
    $('body').on('click', 'a.btn-location-edit', function(e) {
-
 
287
        e.preventDefault();
-
 
288
 
-
 
289
        var url = $(this).data('link');
-
 
290
 
-
 
291
        NProgress.start();
-
 
292
        $.ajax({
-
 
293
            'dataType'  : 'json',
-
 
294
            'accept'    : 'application/json',
-
 
295
            'method'    : 'get',
-
 
296
            'url'       : url,
-
 
297
        }).done(function(response) {
-
 
298
           if(response['success']) {
-
 
299
                $('#form-location').attr('action', url);
-
 
300
                $('#form-location #location_search').val(response['data']['formatted_address']);
-
 
301
                $('#form-location #formatted_address').val(response['data']['formatted_address']);
-
 
302
                $('#form-location #address1').val(response['data']['address1']);
-
 
303
                $('#form-location #address2').val(response['data']['address2']);
-
 
304
                $('#form-location #country').val(response['data']['country']);
-
 
305
                $('#form-location #state').val(response['data']['state']);
-
 
306
                $('#form-location #city1').val(response['data']['city1']);
-
 
307
                $('#form-location #city2').val(response['data']['city2']);
-
 
308
                $('#form-location #postal_code').val(response['data']['postal_code']);
-
 
309
                $('#form-location #latitude').val(response['data']['latitude']);
-
 
310
                $('#form-location #longitude').val(response['data']['longitude']);
-
 
311
 
-
 
312
                if(response['data']['is_main'] == 'y') {
-
 
313
                    $('#form-location #is_main').bootstrapToggle('on')
-
 
314
                } else {
-
 
315
                    $('#form-location #is_main').bootstrapToggle('off')
-
 
316
                }
-
 
317
 
-
 
318
                validatorLocation.resetForm();
-
 
319
        
-
 
320
                $("#location-box").modal('show');
-
 
321
            } else {
-
 
322
                $.fn.showError(response['data']);
-
 
323
            }
-
 
324
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
325
            $.fn.showError(textStatus);
-
 
326
        }).always(function() {
-
 
327
            NProgress.done();
-
 
328
        });
-
 
329
        return false;
-
 
330
 
-
 
331
 
-
 
332
    });
-
 
333
 
-
 
334
    $('body').on('click', 'a.btn-location-delete', function(e) {
-
 
335
        e.preventDefault();
-
 
336
 
-
 
337
        var url = $(this).data('link');
-
 
338
 
-
 
339
        NProgress.start();
-
 
340
        $.ajax({
-
 
341
            'dataType'  : 'json',
-
 
342
            'accept'    : 'application/json',
-
 
343
            'method'    : 'post',
-
 
344
            'url'       : url,
-
 
345
        }).done(function(response) {
-
 
346
           if(response['success']) {
-
 
347
                $.fn.renderLocation(response['data']);
-
 
348
            } else {
-
 
349
                $.fn.showError(response['data']);
-
 
350
            }
-
 
351
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
352
            $.fn.showError(textStatus);
-
 
353
        }).always(function() {
-
 
354
            NProgress.done();
-
 
355
        });
-
 
356
        return false;
-
 
357
 
-
 
358
 
-
 
359
    });
-
 
360
 
-
 
361
    
-
 
362
    $('.btn-location-close').on("click", function(e){
-
 
363
        e.preventDefault();
-
 
364
        
-
 
365
        $("#location-box").modal('hide');
-
 
366
        return false;
-
 
367
    });
-
 
368
 
-
 
369
    var validatorSocialNetwork = $('#form-social-network').validate({
-
 
370
        debug: true,
-
 
371
        onclick: false,
-
 
372
        onkeyup: false,
-
 
373
        ignore: [],
-
 
374
        rules: {
-
 
375
            'facebook': {
-
 
376
                required: false,
-
 
377
                maxlength: 250,
-
 
378
                url: true,
-
 
379
            },
-
 
380
            'twitter': {
-
 
381
                required: false,
-
 
382
                maxlength: 250,
-
 
383
                url: true,
-
 
384
            },
-
 
385
            'instagram': {
-
 
386
                required: false,
-
 
387
                maxlength: 250,
-
 
388
                url: true,
-
 
389
            },
-
 
390
        },
-
 
391
 
-
 
392
        submitHandler: function(form)
-
 
393
        {
-
 
394
            NProgress.start();
-
 
395
            $.ajax({
-
 
396
                'dataType'  : 'json',
-
 
397
                'accept'    : 'application/json',
-
 
398
                'method'    : 'post',
-
 
399
                'url'       :  $('#form-social-network').attr('action'),
-
 
400
                'data'      :  $('#form-social-network').serialize()
-
 
401
            }).done(function(response) {
-
 
402
                if(response['success']) {
-
 
403
 
-
 
404
					$('#social-networks').empty();
-
 
405
                    var s = $.trim(response['data']['facebook']);
-
 
406
                    if(s.length > 32) {
-
 
407
                        s = s.substring(0, 31) + '...'
-
 
408
                    }
-
 
409
                    $('#social-networks').append('<li><a href="' + response['data']['facebook'] + '" target="_blank" title="">' + 
-
 
410
                        '<i class="fa fa-facebook-square"></i> ' + s + '</a></li>');    
-
 
411
    
-
 
412
                    var s = $.trim(response['data']['twitter']);
-
 
413
                    if(s.length > 32) {
-
 
414
                        s = s.substring(0, 31) + '...'
-
 
415
                    }
-
 
416
                    $('#social-networks').append('<li><a href="' + response['data']['twitter'] + '" target="_blank" title="">' + 
-
 
417
                        '<i class="fa fa-twitter"></i> ' + s + '</a></li>'); 
-
 
418
 
-
 
419
                    var s = $.trim(response['data']['instagram']);
-
 
420
                    if(s.length > 32) {
-
 
421
                        s = s.substring(0, 31) + '...'
-
 
422
                    }
-
 
423
                    $('#social-networks').append('<li><a href="' + response['data']['instagram'] + '" target="_blank" title="">' + 
-
 
424
                        '<i class="fa fa-instagram"></i> ' + s + '</a></li>'); 
-
 
425
     
-
 
426
                    $("#social-networks-box").modal('hide');
-
 
427
                } else {
-
 
428
                    validatorSocialNetwork.resetForm();
-
 
429
                    if(jQuery.type(response['data']) == 'string') {
-
 
430
                        $.fn.showError(response['data']);
-
 
431
                    } else  {
-
 
432
                        $.each(response['data'], function( fieldname, errors ) {
-
 
433
                            $.fn.showFormErrorValidator('#form-social-network #' + fieldname, errors);
-
 
434
                        });
-
 
435
                    }
-
 
436
                }
-
 
437
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
438
                $.fn.showError(textStatus);
-
 
439
            }).always(function() {
-
 
440
                NProgress.done();
-
 
441
            });
-
 
442
            return false;
-
 
443
        },
-
 
444
        invalidHandler: function(form, validator) {
-
 
445
        
-
 
446
        }
-
 
447
    });
-
 
448
    
-
 
449
 
-
 
450
 
-
 
451
    $('.btn-social-network-edit').on("click", function(e){
-
 
452
        e.preventDefault();
-
 
453
 
-
 
454
        NProgress.start();
-
 
455
        $.ajax({
-
 
456
            'dataType'  : 'json',
-
 
457
            'accept'    : 'application/json',
-
 
458
            'method'    : 'get',
-
 
459
            'url'       : '$routeSocialNetworks',
-
 
460
        }).done(function(response) {
-
 
461
           if(response['success']) {
-
 
462
                $('#form-social-network #facebook').val(response['data']['facebook']);
-
 
463
                $('#form-social-network #twitter').val(response['data']['twitter']);
-
 
464
                $('#form-social-network #instagram').val(response['data']['instagram']);
-
 
465
                validatorSocialNetwork.resetForm();
-
 
466
 
-
 
467
                $("#social-networks-box").modal('show');
-
 
468
            } else {
-
 
469
                $.fn.showError(response['data']);
-
 
470
            }
-
 
471
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
472
            $.fn.showError(textStatus);
-
 
473
        }).always(function() {
-
 
474
            NProgress.done();
-
 
475
        });
-
 
476
        return false;
-
 
477
 
-
 
478
    });
-
 
479
    
-
 
480
    $('.btn-social-network-close').on("click", function(e){
-
 
481
        e.preventDefault();
-
 
482
        
-
 
483
        $("#social-networks-box").modal('hide');
-
 
484
        return false;
-
 
485
    });
-
 
486
    
-
 
487
    
-
 
488
    var validatorExtended = $('#form-extended').validate({
-
 
489
        debug: true,
-
 
490
        onclick: false,
-
 
491
        onkeyup: false,
-
 
492
        onfocusout: false,
-
 
493
        ignore: [],
50
        onclick: false,
494
        rules: {
51
        onkeyup: false,
Línea 495... Línea 52...
495
            'description': {
52
        onfocusout: false,
496
                updateCkeditor:function() {
53
        ignore: [],
497
                        CKEDITOR.instances.description.updateElement();
54
        rules: {
498
                },
55
            'company_size_id': {
499
                required: false,
56
                required: true,
500
            },
57
            },
501
        },
58
        },
502
 
59
 
503
        submitHandler: function(form)
60
        submitHandler: function(form)
504
        {
61
        {
505
            NProgress.start();
62
            NProgress.start();
Línea 506... Línea 63...
506
            $.ajax({
63
            $.ajax({
507
                'dataType'  : 'json',
64
                'dataType'  : 'json',
508
                'accept'    : 'application/json',
65
                'accept'    : 'application/json',
509
                'method'    : 'post',
66
                'method'    : 'post',
510
                'url'       :  $('#form-extended').attr('action'),
67
                'url'       :  $('#form-company-size').attr('action'),
511
                'data'      :  $('#form-extended').serialize()
68
                'data'      :  $('#form-company-size').serialize()
512
            }).done(function(response) {
69
            }).done(function(response) {
513
                if(response['success']) {
70
                if(response['success']) {
514
 
71
 
515
                    $('#overview-description').html(response['data']['description']);
72
                    $('#overview-company-size').html(response['data']);
516
                    $("#extended-box").modal('hide');
73
                    $("#company-size-box").modal('hide');
517
                } else {
74
                } else {
518
                    validatorExtended.resetForm();
75
                    validatorCompanySize.resetForm();
519
                    if(jQuery.type(response['data']) == 'string') {
76
                    if(jQuery.type(response['data']) == 'string') {
Línea 535... Línea 92...
535
        
92
        
536
        }
93
        }
Línea 537... Línea 94...
537
    });
94
    });
538
 
95
 
Línea 539... Línea 96...
539
 
96
 
540
    $('.btn-extended-edit').on("click", function(e){
97
    $('.btn-company-size-edit').on("click", function(e){
541
        e.preventDefault();
98
        e.preventDefault();
542
 
99
 
543
        NProgress.start();
100
        NProgress.start();
544
        $.ajax({
101
        $.ajax({
545
            'dataType'  : 'json',
102
            'dataType'  : 'json',
546
            'accept'    : 'application/json',
103
            'accept'    : 'application/json',
547
            'method'    : 'get',
104
            'method'    : 'get',
-
 
105
            'url'       : '$routeCompanySize',
548
            'url'       : '$routeExtended',
106
        }).done(function(response) {
Línea 549... Línea 107...
549
        }).done(function(response) {
107
           if(response['success']) {
550
           if(response['success']) {
108
				$('#form-company-size #company_size_id').val(response['data']['company_size_id']).trigger('change');
551
                CKEDITOR.instances.description.setData(response['data']['description']);
109
           
552
                validatorExtended.resetForm();
110
                validatorCompanySize.resetForm();
553
 
111
 
554
                $("#extended-box").modal('show');
112
                $("#company-size-box").modal('show');
Línea 562... Línea 120...
562
        });
120
        });
563
        return false;
121
        return false;
Línea 564... Línea 122...
564
 
122
 
Línea 565... Línea 123...
565
    });
123
    });
566
    
124
    
Línea 567... Línea 125...
567
    $('.btn-extended-close').on("click", function(e){
125
    $('.btn-company-size-close').on("click", function(e){
568
        e.preventDefault();
126
        e.preventDefault();
569
        
127
        
Línea 570... Línea 128...
570
        $("#extended-box").modal('hide');
128
        $("#company-size-box").modal('hide');
571
        return false;
129
        return false;
Línea 652... Línea 210...
652
        e.preventDefault();
210
        e.preventDefault();
Línea 653... Línea 211...
653
        
211
        
654
        $("#industry-box").modal('hide');
212
        $("#industry-box").modal('hide');
655
        return false;
213
        return false;
656
    });
-
 
657
 
-
 
658
 
-
 
659
 
-
 
660
 
-
 
661
    var validatorImage = $('#form-image').validate({
-
 
662
        debug: true,
-
 
663
        onclick: false,
-
 
664
        onkeyup: false,
-
 
665
        onfocusout: false,
-
 
666
        ignore: [],
-
 
667
        rules: {
-
 
668
           'image': {
-
 
669
                required: true,
-
 
670
                extension: 'jpg|jpeg|png',
-
 
671
                accept: 'image/jpeg,image/png'
-
 
672
            },
-
 
673
        },
-
 
674
 
-
 
675
        submitHandler: function(form)
-
 
676
        {
-
 
677
            var formdata = false;
-
 
678
            if (window.FormData){
-
 
679
                formdata = new FormData(form); //form[0]);
-
 
680
            }
-
 
681
 
-
 
682
            NProgress.start();
-
 
683
            $.ajax({
-
 
684
                'dataType'  : 'json',
-
 
685
                'accept'    : 'application/json',
-
 
686
                'method'    : 'post',
-
 
687
                'url'       :  $('#form-image').attr('action'),
-
 
688
                'data'      : formdata ? formdata : $('#form-image').serialize(),
-
 
689
                'processData': false,
-
 
690
                'contentType': false,
-
 
691
            }).done(function(response) {
-
 
692
                if(response['success']) {
-
 
693
				    $('#company-img').attr('src',response['data']);
-
 
694
                    $("#image-box").modal('hide');
-
 
695
                } else {
-
 
696
                    validatorImage.resetForm();
-
 
697
                    if(jQuery.type(response['data']) == 'string') {
-
 
698
                        $.fn.showError(response['data']);
-
 
699
                    } else  {
-
 
700
                        $.each(response['data'], function( fieldname, errors ) {
-
 
701
                            console.log('#form-image #' + fieldname);
-
 
702
 
-
 
703
                            $.fn.showFormErrorValidator('#form-image #' + fieldname, errors);
-
 
704
                        });
-
 
705
                    }
-
 
706
                }
-
 
707
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
708
                $.fn.showError(textStatus);
-
 
709
            }).always(function() {
-
 
710
                NProgress.done();
-
 
711
            });
-
 
712
            return false;
-
 
713
        },
-
 
714
        invalidHandler: function(form, validator) {
-
 
715
        
-
 
716
        }
-
 
717
    });
-
 
718
 
-
 
719
    $('.btn-image-open').on("click", function(e){
-
 
720
        e.preventDefault();
-
 
721
        $('#form-image #image').fileinput('reset');
-
 
722
        $('#form-image #image').val('');
-
 
723
        validatorImage.resetForm();
-
 
724
        $("#image-box").modal('show');
-
 
725
        return false;
-
 
726
    });
-
 
727
 
-
 
728
    $('.btn-image-close').on("click", function(e){
-
 
729
        e.preventDefault();
-
 
730
        
-
 
731
        $("#image-box").modal('hide');
-
 
732
        return false;
-
 
733
    });
-
 
734
 
-
 
735
 
-
 
736
    var validatorCover = $('#form-header').validate({
-
 
737
        debug: true,
-
 
738
        onclick: false,
-
 
739
        onkeyup: false,
-
 
740
        onfocusout: false,
-
 
741
        ignore: [],
-
 
742
        rules: {
-
 
743
           'header': {
-
 
744
                required: true,
-
 
745
                extension: 'jpg|jpeg|png',
-
 
746
                accept: 'image/jpeg,image/png'
-
 
747
            },
-
 
748
        },
-
 
749
 
-
 
750
        submitHandler: function(form)
-
 
751
        {
-
 
752
            var formdata = false;
-
 
753
            if (window.FormData){
-
 
754
                formdata = new FormData(form); //form[0]);
-
 
755
            }
-
 
756
 
-
 
757
            NProgress.start();
-
 
758
            $.ajax({
-
 
759
                'dataType'  : 'json',
-
 
760
                'accept'    : 'application/json',
-
 
761
                'method'    : 'post',
-
 
762
                'url'       :  $('#form-header').attr('action'),
-
 
763
                'data'      : formdata ? formdata : $('#form-header').serialize(),
-
 
764
                'processData': false,
-
 
765
                'contentType': false,
-
 
766
            }).done(function(response) {
-
 
767
                if(response['success']) {
-
 
768
                    $('#user-header-img').attr('src',response['data']);
-
 
769
                    $("#image-header-box").modal('hide');
-
 
770
                    location.reload();
-
 
771
                } else {
-
 
772
                    validatorCover.resetForm();
-
 
773
                    if(jQuery.type(response['data']) == 'string') {
-
 
774
                        $.fn.showError(response['data']);
-
 
775
                    } else  {
-
 
776
                        $.each(response['data'], function( fieldname, errors ) {
-
 
777
                            $.fn.showFormErrorValidator('#form-header #' + fieldname, errors);
-
 
778
                        });
-
 
779
                    }
-
 
780
                }
-
 
781
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
782
                $.fn.showError(textStatus);
-
 
783
            }).always(function() {
-
 
784
                NProgress.done();
-
 
785
            });
-
 
786
            return false;
-
 
787
        },
-
 
788
        invalidHandler: function(form, validator) {
-
 
789
        
-
 
790
        }
-
 
791
    });
-
 
792
 
-
 
793
    $('.btn-image-explorer').on("click", function(e){
-
 
794
        e.preventDefault();
-
 
795
        $('#form-image #image').click();
-
 
796
        return false;
-
 
797
    });
-
 
798
 
-
 
799
    var validatorCover = $('#form-cover').validate({
-
 
800
        debug: true,
-
 
801
        onclick: false,
-
 
802
        onkeyup: false,
-
 
803
        onfocusout: false,
-
 
804
        ignore: [],
-
 
805
        rules: {
-
 
806
           'cover': {
-
 
807
                required: true,
-
 
808
                extension: 'jpg|jpeg|png',
-
 
809
                accept: 'image/jpeg,image/png'
-
 
810
            },
-
 
811
        },
-
 
812
 
-
 
813
        submitHandler: function(form)
-
 
814
        {
-
 
815
            var formdata = false;
-
 
816
            if (window.FormData){
-
 
817
                formdata = new FormData(form); //form[0]);
-
 
818
            }
-
 
819
 
-
 
820
            NProgress.start();
-
 
821
            $.ajax({
-
 
822
                'dataType'  : 'json',
-
 
823
                'accept'    : 'application/json',
-
 
824
                'method'    : 'post',
-
 
825
                'url'       :  $('#form-cover').attr('action'),
-
 
826
                'data'      : formdata ? formdata : $('#form-cover').serialize(),
-
 
827
                'processData': false,
-
 
828
                'contentType': false,
-
 
829
            }).done(function(response) {
-
 
830
                if(response['success']) {
-
 
831
				    $('#user-cover-img').attr('src',response['data']);
-
 
832
                    $("#cover-box").modal('hide');
-
 
833
                } else {
-
 
834
                    validatorCover.resetForm();
-
 
835
                    if(jQuery.type(response['data']) == 'string') {
-
 
836
                        $.fn.showError(response['data']);
-
 
837
                    } else  {
-
 
838
                        $.each(response['data'], function( fieldname, errors ) {
-
 
839
                            $.fn.showFormErrorValidator('#form-cover #' + fieldname, errors);
-
 
840
                        });
-
 
841
                    }
-
 
842
                }
-
 
843
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
844
                $.fn.showError(textStatus);
-
 
845
            }).always(function() {
-
 
846
                NProgress.done();
-
 
847
            });
-
 
848
            return false;
-
 
849
        },
-
 
850
        invalidHandler: function(form, validator) {
-
 
851
        
-
 
852
        }
-
 
853
    });
-
 
854
 
-
 
855
 
-
 
856
    $('.btn-cover-open').on("click", function(e){
-
 
857
        e.preventDefault();
-
 
858
        $('#form-cover #cover').fileinput('reset');
-
 
859
        $('#form-cover #cover').val('');
-
 
860
        validatorCover.resetForm();
-
 
861
        $("#cover-box").modal('show');
-
 
862
        return false;
-
 
863
    });
-
 
864
 
-
 
865
    $('.btn-cover-close').on("click", function(e){
-
 
866
        e.preventDefault();
-
 
867
        
-
 
868
        $("#cover-box").modal('hide');
-
 
869
        return false;
-
 
870
    });
-
 
871
 
-
 
872
    $('.btn-cover-explorer').on("click", function(e){
-
 
873
        e.preventDefault();
-
 
874
        
-
 
875
        $('#form-cover #cover').click();
-
 
876
        return false;
-
 
877
    });
-
 
878
 
-
 
879
    $("#form-cover #cover").fileinput({
-
 
880
        theme: 'fas',
-
 
881
        language: 'es',
-
 
882
        showUpload: false,
-
 
883
        dropZoneEnabled: false,
-
 
884
        maxFileCount: 1,
-
 
885
        allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
-
 
886
        mainClass: "input-group",
-
 
887
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size_cover',
-
 
888
    });
-
 
889
 
-
 
890
    $("#form-image #image").fileinput({
-
 
891
        theme: 'fas',
-
 
892
        language: 'es',
-
 
893
        showUpload: false,
-
 
894
        dropZoneEnabled: false,
-
 
895
        maxFileCount: 1,
-
 
896
        allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
-
 
897
        mainClass: "input-group",
-
 
898
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size_profile',
-
 
899
    });
-
 
900
 
-
 
901
   $('#form-skill #skills').select2({ 
-
 
902
        theme: 'bootstrap4',
-
 
903
        width: '100%', 
-
 
904
        placeholder: 'LABEL_SELECT_ONE_SKILLS'
-
 
905
    });
-
 
906
    $('#form-language #languages').select2({ 
-
 
907
        theme: 'bootstrap4',
-
 
908
        width: '100%',
-
 
909
        placeholder: 'LABEL_SELECT_ONE_LANGUAGE'
-
 
910
    });
-
 
911
    
-
 
912
    
-
 
913
    CKEDITOR.replace('description');
-
 
914
 
-
 
915
    autocompleteLocation.addListener('place_changed', $.fn.fillInAddressLocation);
-
 
916
 
-
 
Línea 917... Línea 214...
917
    $('#form-location #is_main').bootstrapToggle({'on' : 'LABEL_MAIN_LOCATION',  'off' : 'LABEL_SECONDARY_LOCATION', 'width' : '160px', 'height' : '40px'});
214
    });
Línea 918... Línea -...
918
    
-
 
919
});
215
    
920
 
216
});
Línea 921... Línea 217...
921
 
217
 
922
JS;
-
 
923
$this->inlineScript()->captureEnd();
218
JS;
924
 
219
$this->inlineScript()->captureEnd();
925
$jsonLocations = json_encode($locations);
220
 
926
 
221
$jsonLocations = json_encode($locations);
927
$js = <<<JS
222
$js = <<<JS
Línea 947... Línea 242...
947
    companySize: "$company_size",
242
    companySize: "$company_size",
948
    companyName: "$company_name",
243
    companyName: "$company_name",
949
    foundationYear: "$foundation_year",
244
    foundationYear: "$foundation_year",
950
    website: "$website",
245
    website: "$website",
951
    header: "$header",
246
    header: "$header",
952
    footer: "$footer"
247
    footer: "$footer",
-
 
248
    googleApiKey: "$google_map_key"
953
}
249
}
954
JS;
250
JS;
Línea 955... Línea 251...
955
 
251
 
956
$this->inlineScript()->appendScript($js);
252
$this->inlineScript()->appendScript($js);
Línea 979... Línea 275...
979
</style>
275
</style>
Línea 980... Línea 276...
980
 
276
 
981
<!-- Content Header (Page header) -->
277
<!-- Content Header (Page header) -->
982
<div id="profile">
278
<div id="profile">
983
</div>
-
 
984
<div class="modal" tabindex="-1" role="dialog" id="extended-box">
-
 
985
    <div class="modal-dialog" role="document">
-
 
986
        <?php
-
 
987
        $form = $this->formExtended;
-
 
988
        $form->setAttributes([
-
 
989
            'method' => 'post',
-
 
990
            'action' => $routeExtended,
-
 
991
            'name' => 'form-extended',
-
 
992
            'id' => 'form-extended'
-
 
993
        ]);
-
 
994
        $form->prepare();
-
 
995
        echo $this->form()->openTag($form);
-
 
996
        ?>
-
 
997
        <div class="modal-content">
-
 
998
            <div class="modal-header">
-
 
999
                <h3 class="modal-title">LABEL_CHANGE</h3>
-
 
1000
            </div>
-
 
1001
            <div class="modal-body">
-
 
1002
                <div class="form-group">
-
 
1003
                    <?php
-
 
1004
                    $element = $form->get('description');
-
 
1005
                    $element->setAttributes(['class' => 'form-control']);
-
 
1006
                    $element->setOptions(['label' => 'LABEL_OVERVIEW']);
-
 
1007
                    echo $this->formLabel($element);
-
 
1008
                    echo $this->formTextArea($element);
-
 
1009
                    ?>
-
 
1010
                </div>
-
 
1011
            </div>
-
 
1012
            <div class="modal-footer">
-
 
1013
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1014
                <button type="button" class="btn btn-default btn-extended-close">LABEL_CANCEL</button>
-
 
1015
            </div>
-
 
1016
            <?php echo $this->form()->closeTag($form); ?>
-
 
1017
        </div>
-
 
1018
    </div>
-
 
1019
</div>
-
 
1020
<div class="modal" tabindex="-1" role="dialog" id="foundation-year-box">
-
 
1021
    <div class="modal-dialog" role="document">
-
 
1022
        <?php
-
 
1023
        $form = $this->formFoundationYear;
-
 
1024
        $form->setAttributes([
-
 
1025
            'method' => 'post',
-
 
1026
            'action' => $routeFoundationYear,
-
 
1027
            'name' => 'form-foundation-year',
-
 
1028
            'id' => 'form-foundation-year'
-
 
1029
        ]);
-
 
1030
        $form->prepare();
-
 
1031
        echo $this->form()->openTag($form);
-
 
1032
        ?>
-
 
1033
        <div class="modal-content">
-
 
1034
            <div class="modal-header">
-
 
1035
                <h3 class="modal-title">LABEL_CHANGE</h3>
-
 
1036
            </div>
-
 
1037
            <div class="modal-body">
-
 
1038
                <div class="form-group">
-
 
1039
                    <?php
-
 
1040
                    $element = $form->get('foundation_year');
-
 
1041
                    $element->setAttributes(['class' => 'form-control']);
-
 
1042
                    $element->setOptions(['label' => 'LABEL_FOUNDATION_YEAR']);
-
 
1043
                    echo $this->formLabel($element);
-
 
1044
                    echo $this->formText($element);
-
 
1045
                    ?>
-
 
1046
                </div>
-
 
1047
            </div>
-
 
1048
            <div class="modal-footer">
-
 
1049
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1050
                <button type="button" class="btn btn-default btn-fondation-year-close">LABEL_CANCEL</button>
-
 
1051
            </div>
-
 
1052
            <?php echo $this->form()->closeTag($form); ?>
-
 
1053
        </div>
-
 
1054
    </div>
-
 
1055
</div>
279
</div>
1056
<div class="modal" tabindex="-1" role="dialog" id="industry-box">
280
<div class="modal" tabindex="-1" role="dialog" id="industry-box">
1057
    <div class="modal-dialog" role="document">
281
    <div class="modal-dialog" role="document">
1058
        <?php
282
        <?php
1059
        $form = $this->formIndustry;
283
        $form = $this->formIndustry;
Línea 1122... Línea 346...
1122
                <button type="button" class="btn btn-default btn-company-size-close">LABEL_CANCEL</button>
346
                <button type="button" class="btn btn-default btn-company-size-close">LABEL_CANCEL</button>
1123
            </div>
347
            </div>
1124
            <?php echo $this->form()->closeTag($form); ?>
348
            <?php echo $this->form()->closeTag($form); ?>
1125
        </div>
349
        </div>
1126
    </div>
350
    </div>
1127
</div>
-
 
1128
<div class="modal" tabindex="-1" role="dialog" id="location-box">
-
 
1129
    <div class="modal-dialog" role="document">
-
 
1130
        <?php
-
 
1131
        $form = $this->formLocation;
-
 
1132
        $form->setAttributes([
-
 
1133
            'method' => 'post',
-
 
1134
            'action' => '',
-
 
1135
            'name' => 'form-location',
-
 
1136
            'id' => 'form-location'
-
 
1137
        ]);
-
 
1138
        $form->prepare();
-
 
1139
        echo $this->form()->openTag($form);
-
 
1140
 
-
 
1141
        $fieldnames = [
-
 
1142
            'formatted_address',
-
 
1143
            'address1',
-
 
1144
            'address2',
-
 
1145
            'country',
-
 
1146
            'state',
-
 
1147
            'city1',
-
 
1148
            'city2',
-
 
1149
            'postal_code',
-
 
1150
            'latitude',
-
 
1151
            'longitude',
-
 
1152
        ];
-
 
1153
 
-
 
1154
        foreach ($fieldnames as $fieldname) {
-
 
1155
 
-
 
1156
            $element = $form->get($fieldname);
-
 
1157
            echo $this->formHidden($element);
-
 
1158
        }
-
 
1159
        ?>
-
 
1160
        <div class="modal-content">
-
 
1161
            <div class="modal-header">
-
 
1162
                <h3 class="modal-title">LABEL_CHANGE</h3>
-
 
1163
            </div>
-
 
1164
            <div class="modal-body">
-
 
1165
                <div class="form-group datefm">
-
 
1166
                    <?php
-
 
1167
                    $element = $form->get('location_search');
-
 
1168
                    $element->setAttributes(['class' => 'form-control']);
-
 
1169
                    $element->setOptions(['label' => 'LABEL_LOCATION']);
-
 
1170
                    echo $this->formLabel($element);
-
 
1171
                    echo $this->formText($element);
-
 
1172
                    ?>
-
 
1173
                    <i class="fa fa-map-marker"></i>
-
 
1174
                </div>
-
 
1175
                <div class="form-group">
-
 
1176
                    <?php
-
 
1177
                    $element = $form->get('is_main');
-
 
1178
                    echo $this->formCheckbox($element);
-
 
1179
                    ?>
-
 
1180
                </div>
-
 
1181
            </div>
-
 
1182
            <div class="modal-footer">
-
 
1183
                <button type="submit" class="btn btn-primary ">LABEL_SAVE</button>
-
 
1184
                <button type="button" class="btn btn-default btn-location-close">LABEL_CANCEL</button>
-
 
1185
            </div>
-
 
1186
            <?php echo $this->form()->closeTag($form); ?>
-
 
1187
        </div>
-
 
1188
    </div>
-
 
1189
</div>
-
 
1190
<div class="modal" tabindex="-1" role="dialog" id="social-networks-box">
-
 
1191
    <div class="modal-dialog" role="document">
-
 
1192
        <?php
-
 
1193
        $form = $this->formSocialNetwork;
-
 
1194
        $form->setAttributes([
-
 
1195
            'method' => 'post',
-
 
1196
            'action' => $routeSocialNetworks,
-
 
1197
            'name' => 'form-social-network',
-
 
1198
            'id' => 'form-social-network'
-
 
1199
        ]);
-
 
1200
        $form->prepare();
-
 
1201
        echo $this->form()->openTag($form);
-
 
1202
        ?>
-
 
1203
        <div class="modal-content">
-
 
1204
            <div class="modal-header">
-
 
1205
                <h3 class="modal-title">LABEL_CHANGE</h3>
-
 
1206
            </div>
-
 
1207
            <div class="modal-body">
-
 
1208
                <div class="form-group">
-
 
1209
                    <?php
-
 
1210
                    $element = $form->get('facebook');
-
 
1211
                    $element->setAttributes(['class' => 'form-control']);
-
 
1212
                    $element->setOptions(['label' => 'LABEL_FACEBOOK']);
-
 
1213
                    echo $this->formLabel($element);
-
 
1214
                    echo $this->formText($element);
-
 
1215
                    ?>
-
 
1216
                </div>
-
 
1217
                <div class="form-group">
-
 
1218
                    <?php
-
 
1219
                    $element = $form->get('twitter');
-
 
1220
                    $element->setAttributes(['class' => 'form-control']);
-
 
1221
                    $element->setOptions(['label' => 'LABEL_TWITTER']);
-
 
1222
                    echo $this->formLabel($element);
-
 
1223
                    echo $this->formText($element);
-
 
1224
                    ?>
-
 
1225
                </div>
-
 
1226
                <div class="form-group">
-
 
1227
                    <?php
-
 
1228
                    $element = $form->get('instagram');
-
 
1229
                    $element->setAttributes(['class' => 'form-control']);
-
 
1230
                    $element->setOptions(['label' => 'LABEL_INSTAGRAM']);
-
 
1231
                    echo $this->formLabel($element);
-
 
1232
                    echo $this->formText($element);
-
 
1233
                    ?>
-
 
1234
                </div>
-
 
1235
                <div class="form-group">
-
 
1236
                </div>
-
 
1237
                <div class="modal-footer">
-
 
1238
                    <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1239
                    <button type="button" class="btn btn-default btn-social-network-close">LABEL_CANCEL</button>
-
 
1240
                </div>
-
 
1241
            </div>
-
 
1242
            <?php echo $this->form()->closeTag($form); ?>
-
 
1243
        </div>
-
 
1244
    </div>
-
 
1245
</div>
-
 
1246
<div class="modal" tabindex="-1" role="dialog" id="image-box">
-
 
1247
    <div class="modal-dialog" role="document">
-
 
1248
        <?php
-
 
1249
        $form = $this->formImage;
-
 
1250
        $form->setAttributes([
-
 
1251
            'method' => 'post',
-
 
1252
            'action' => $routeImageUpload,
-
 
1253
            'name' => 'form-image',
-
 
1254
            'id' => 'form-image',
-
 
1255
            'enctype' => 'multipart/form-data'
-
 
1256
        ]);
-
 
1257
        $form->prepare();
-
 
1258
        echo $this->form()->openTag($form);
-
 
1259
        ?>
-
 
1260
        <div class="modal-content">
-
 
1261
            <div class="modal-header">
-
 
1262
                <h3 class="modal-title">LABEL_CHANGE</h3>
-
 
1263
            </div>
-
 
1264
            <div class="modal-body">
-
 
1265
                <div class="form-group">
-
 
1266
                    <div class="file-loading">
-
 
1267
                        <?php
-
 
1268
                        $element = $form->get('image');
-
 
1269
                        $element->setAttributes(['class' => 'form-control', 'accept' => 'image/jpeg,image/png']);
-
 
1270
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
-
 
1271
                        echo $this->formLabel($element);
-
 
1272
                        echo $this->formFile($element);
-
 
1273
                        ?>
-
 
1274
                    </div>
-
 
1275
                </div>
-
 
1276
            </div>
-
 
1277
            <div class="modal-footer">
-
 
1278
                <button type="submit" class="btn btn-primary">LABEL_UPLOAD</button>
-
 
1279
                <button type="button" class="btn btn-default btn-image-close">LABEL_CANCEL</button>
-
 
1280
            </div>
-
 
1281
            <?php echo $this->form()->closeTag($form); ?>
-
 
1282
        </div>
-
 
1283
    </div>
-
 
1284
</div>
351
</div>
1285
352