Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16248 Rev 16701
Línea 10... Línea 10...
10
 
10
 
11
$allowAdd       = $acl->isAllowed($roleName, 'my-coach/categories/add') ? 1 : 0;
11
$allowAdd       = $acl->isAllowed($roleName, 'my-coach/categories/add') ? 1 : 0;
12
$allowEdit      = $acl->isAllowed($roleName, 'my-coach/categories/edit') ? 1 : 0;
12
$allowEdit      = $acl->isAllowed($roleName, 'my-coach/categories/edit') ? 1 : 0;
Línea 13... Línea -...
13
$allowDelete    = $acl->isAllowed($roleName, 'my-coach/categories/delete') ? 1 : 0;
-
 
14
 
-
 
15
 
-
 
16
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
13
$allowDelete    = $acl->isAllowed($roleName, 'my-coach/categories/delete') ? 1 : 0;
17
 
14
 
Línea 18... Línea 15...
18
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
15
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
Línea 241... Línea 238...
241
            rules: {
238
            rules: {
242
                'name': {
239
                'name': {
243
                    required: true,
240
                    required: true,
244
                    maxlength: 128,
241
                    maxlength: 128,
245
                },
242
                },
246
                'description': {
-
 
247
                    updateCkeditor:function() {
-
 
248
                        CKEDITOR.instances.description.updateElement();
-
 
249
                    },
-
 
250
                    required: true,
-
 
251
                },
-
 
252
 
-
 
253
                'status': {
243
                'status': {
254
                    required: false,
244
                    required: false,
255
                },
245
                },
256
                'privacy': {
246
                'privacy': {
257
                    required: true
247
                    required: true
Línea 303... Línea 293...
303
            e.preventDefault();
293
            e.preventDefault();
Línea 304... Línea 294...
304
 
294
 
305
            $('span[id="form-title"]').html('LABEL_ADD');
295
            $('span[id="form-title"]').html('LABEL_ADD');
306
            $('#form').attr('action', '$routeAdd');
296
            $('#form').attr('action', '$routeAdd');
307
            $('#form #name').val('');
-
 
308
            $('#form #description').val('');
297
            $('#form #name').val('');
309
            $('#form #privacy').val('$privacy_company').trigger('change');
298
            $('#form #privacy').val('$privacy_company').trigger('change');
310
            $('#form #status').bootstrapToggle('on');
-
 
311
            CKEDITOR.instances.description.setData('');
299
            $('#form #status').bootstrapToggle('on');
Línea 312... Línea 300...
312
 
300
            
313
 
301
 
Línea 314... Línea 302...
314
            validator.resetForm();
302
            validator.resetForm();
Línea 332... Línea 320...
332
                    $('span[id="form-title"]').html('LABEL_EDIT');
320
                    $('span[id="form-title"]').html('LABEL_EDIT');
333
                    $('#form').attr('action', action);
321
                    $('#form').attr('action', action);
334
                    $('#form #name').val(response['data']['name']);
322
                    $('#form #name').val(response['data']['name']);
335
                    $('#form #privacy').val(response['data']['privacy']).trigger('change');
323
                    $('#form #privacy').val(response['data']['privacy']).trigger('change');
336
                    $('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
324
                    $('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
337
 
-
 
338
 
-
 
339
                    CKEDITOR.instances.description.setData(response['data']['description']);
-
 
340
                    validator.resetForm();
325
                    validator.resetForm();
Línea 341... Línea 326...
341
                    
326
                    
Línea 342... Línea 327...
342
                    $('#modal').modal('show');
327
                    $('#modal').modal('show');
Línea 373... Línea 358...
373
        $('#form #privacy').select2({
358
        $('#form #privacy').select2({
374
            theme: 'bootstrap4',
359
            theme: 'bootstrap4',
375
            width: '100%',
360
            width: '100%',
376
        });
361
        });
Línea 377... Línea -...
377
 
-
 
378
 
-
 
379
        CKEDITOR.replace( 'description'); 
362
 
Línea 380... Línea 363...
380
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
363
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
381
 
364
 
382
    });
365
    });
Línea 470... Línea 453...
470
                            echo $this->formText($element);
453
                            echo $this->formText($element);
471
                            ?>
454
                            ?>
472
               			</div>
455
               			</div>
Línea 473... Línea -...
473
       
-
 
474
                            
-
 
475
 
-
 
476
                    	<div class="form-group">
-
 
477
                  			<?php
-
 
478
                            $element = $form->get('description');
-
 
479
                            $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
-
 
480
                            $element->setAttributes(['class' => 'form-control']);
-
 
481
 
-
 
482
                            echo $this->formLabel($element);
-
 
483
                            echo $this->formTextArea($element);
-
 
484
                            ?>
-
 
485
                     	</div>
-
 
486
	
-
 
487
                            
456
       
488
 
457
                            
489
                    <div class="form-group ">
458
                    <div class="form-group ">
490
                        <?php
459
                        <?php
491
                        $element = $form->get('privacy');
460
                        $element = $form->get('privacy');