Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 118 Rev 119
Línea 57... Línea 57...
57
 
57
 
58
 
58
 
59
 
-
 
60
$this->inlineScript()->captureStart();
-
 
61
echo <<<JS
-
 
62
    jQuery( document ).ready(function( $ ) {
-
 
63
 
-
 
64
        $.validator.setDefaults({
-
 
65
            debug: true,
-
 
66
            highlight: function(element) {
-
 
67
                $(element).addClass('is-invalid');
-
 
68
            },
-
 
69
            unhighlight: function(element) {
-
 
70
                $(element).removeClass('is-invalid');
-
 
71
            },
-
 
72
            errorElement: 'span',
-
 
73
            errorClass: 'error invalid-feedback',
-
 
74
            errorPlacement: function(error, element) {
-
 
75
                if(element.parent('.form-group').length) {
-
 
76
                    error.insertAfter(element);
-
 
77
                } else if(element.parent('.toggle').length) {
-
 
78
                    error.insertAfter(element.parent().parent());
-
 
79
                } else {
-
 
80
                    error.insertAfter(element.parent());
-
 
81
                }
-
 
82
            }
-
 
83
        });
-
 
84
    
-
 
85
    
-
 
86
        $.fn.showFormErrorValidator = function(fieldname, errors) {
-
 
87
            var field = $(fieldname);
-
 
88
            if(field) {
-
 
89
                $(field).addClass('is-invalid');
-
 
90
    
-
 
91
 
-
 
92
                var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
-
 
93
                if(field.parent('.form-group').length) {
-
 
94
                    error.insertAfter(field);
-
 
95
                } else  if(field.parent('.toggle').length) {
-
 
96
                    error.insertAfter(field.parent().parent());
-
 
97
                } else {
-
 
98
                    error.insertAfter(field.parent());
-
 
99
                }
-
 
100
            }
-
 
101
        };
-
 
102
 
-
 
103
 
-
 
104
 
-
 
105
 
-
 
106
        var allowEdit   = $allowEdit;
-
 
107
        var allowDelete = $allowDelete;
-
 
108
        
-
 
109
        var gridTable = $('#gridTable').dataTable( {
-
 
110
            'processing': true,
-
 
111
            'serverSide': true,
-
 
112
            'searching': true,
-
 
113
            'order': [[ 0, 'asc' ]],
-
 
114
            'ordering':  true,
-
 
115
            'ordenable' : true,
-
 
116
            'responsive': true,
-
 
117
            'select' : false,
-
 
118
        	'paging': true,
-
 
119
            'pagingType': 'simple_numbers',
-
 
120
    		'ajax': {
-
 
121
    			'url' : '$routeDatatable',
-
 
122
    			'type' : 'get',
-
 
123
                'beforeSend': function (request) {
-
 
124
                    NProgress.start();
-
 
125
                },
-
 
126
                'dataFilter': function(response) {
-
 
127
                    var response = jQuery.parseJSON( response );
-
 
128
                    
-
 
129
                    var json                = {};
-
 
130
                    json.recordsTotal       = 0;
-
 
131
                    json.recordsFiltered    = 0;
-
 
132
                    json.data               = [];
-
 
133
                    
-
 
134
                    
-
 
135
                    if(response.success) {
-
 
136
                        json.recordsTotal       = response.data.total;
-
 
137
                        json.recordsFiltered    = response.data.total;
-
 
138
                        json.data               = response.data.items;
-
 
139
                    } else {
-
 
140
                        $.fn.showError(response.data)
-
 
141
                    }
-
 
142
                    
-
 
143
                    return JSON.stringify( json );
-
 
144
                }
-
 
145
    		},
-
 
146
            'language' : {
-
 
147
                'sProcessing':     'LABEL_DATATABLE_SPROCESSING',
-
 
148
                'sLengthMenu':     'LABEL_DATATABLE_SLENGTHMENU',
-
 
149
                'sZeroRecords':    'LABEL_DATATABLE_SZERORECORDS',
-
 
150
                'sEmptyTable':     'LABEL_DATATABLE_SEMPTYTABLE',
-
 
151
                'sInfo':           'LABEL_DATATABLE_SINFO',
-
 
152
                'sInfoEmpty':      'LABEL_DATATABLE_SINFOEMPTY',
-
 
153
                'sInfoFiltered':   'LABEL_DATATABLE_SINFOFILTERED',
-
 
154
                'sInfoPostFix':    '',
-
 
155
                'sSearch':         'LABEL_DATATABLE_SSEARCH',
-
 
156
                'sUrl':            '',
-
 
157
                'sInfoThousands':  ',',
-
 
158
                'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
-
 
159
                'oPaginate': {
-
 
160
                    'sFirst':    'LABEL_DATATABLE_SFIRST',
-
 
161
                    'sLast':     'LABEL_DATATABLE_SLAST',
-
 
162
                    'sNext':     'LABEL_DATATABLE_SNEXT',
-
 
163
                    'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
-
 
164
                },
-
 
165
                'oAria': {
-
 
166
                    'sSortAscending':  ': LABEL_DATATABLE_SSORTASCENDING',
-
 
167
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
-
 
168
                },
-
 
169
            },
-
 
170
            'drawCallback': function( settings ) {
-
 
171
                NProgress.done();
-
 
172
                $('button.btn-delete').confirmation({
-
 
173
                    rootSelector: 'button.btn-delete',
-
 
174
                    title : 'LABEL_ARE_YOU_SURE',
-
 
175
                    singleton : true,
-
 
176
                    btnOkLabel: 'LABEL_YES',
-
 
177
                    btnCancelLabel: 'LABEL_NO',
-
 
178
                    onConfirm: function(value) {
-
 
179
                        action = $(this).data('href');
-
 
180
                        NProgress.start();
-
 
181
                        $.ajax({
-
 
182
                            'dataType'  : 'json',
-
 
183
                            'accept'    : 'application/json',
-
 
184
                            'method'    : 'post',
-
 
185
                            'url'       :  action,
-
 
186
                        }).done(function(response) {
-
 
187
                            if(response['success']) {
-
 
188
                                $.fn.showSuccess(response['data']);
-
 
189
                                gridTable.api().ajax.reload(null, false);
-
 
190
                            } else {
-
 
191
                                $.fn.showError(response['data']);
-
 
192
                            }
-
 
193
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
194
                            $.fn.showError(textStatus);
-
 
195
                        }).always(function() {
-
 
196
                            NProgress.done();
-
 
197
                        });
-
 
198
                    },
-
 
199
                });
-
 
200
            },
-
 
201
            'aoColumns': [
-
 
202
                { 'mDataProp': 'name' },
-
 
203
    	        { 'mDataProp': 'language'},
-
 
204
                { 'mDataProp': 'status' },
-
 
205
                { 'mDataProp': 'actions' },
-
 
206
    	    ],
-
 
207
            'columnDefs': [
-
 
208
                {
-
 
209
                    'targets': 0,
-
 
210
                    'className' : 'text-vertical-middle',
-
 
211
                },
-
 
212
                {
-
 
213
                    'targets': 1,
-
 
214
                    'className' : 'text-vertical-middle',
-
 
215
                },
-
 
216
                {
-
 
217
                    'targets': -2,
-
 
218
                    'orderable': false,
-
 
219
                    'className' : 'text-center',
-
 
220
                      'render' : function ( data, type, row ) {
-
 
221
                      
-
 
222
                        checked = data == 'a' ? ' checked="checked" ' : '';
-
 
223
                        return '<div class="checkbox checkbox-success">' +
-
 
224
                            '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
-
 
225
                            '<label ></label></div>';
-
 
226
                    }
-
 
227
                },
-
 
228
                {
-
 
229
                    'targets': -1,
-
 
230
                    'orderable': false,
-
 
231
                    'render' : function ( data, type, row ) {
-
 
232
                        s = '';
-
 
233
                        
-
 
234
                        if(allowEdit) {
-
 
235
                            s = s + '<button class="btn btn-primary btn-edit" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button>&nbsp;';
-
 
236
                            s = s + '<button class="btn btn-primary btn-add-sections" data-toggle="tooltip" title="LABEL_ADD LABEL_SECTION"><i class="fa fa-pencil"></i> LABEL_ADD LABEL_SECTION </button>&nbsp;';
-
 
237
                        }
-
 
238
                        if(allowDelete) {
-
 
239
                            s = s + '<button class="btn btn-danger btn-delete" data-href="' + data['link_delete']+ '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button>&nbsp;';
-
 
240
                        }
-
 
241
                        return s;
-
 
242
                    }
-
 
243
                }
-
 
244
              ],
-
 
245
        });
-
 
246
 
-
 
247
 
-
 
248
        var validator = $('#form').validate({
-
 
249
            debug: true,
-
 
250
            onclick: false,
-
 
251
            onkeyup: false,
-
 
252
            ignore: [],
-
 
253
            rules: {
-
 
254
                'name': {
-
 
255
                    required: true,
-
 
256
                    maxlength: 128,
-
 
257
                },
-
 
258
                'description': {
-
 
259
                    updateCkeditor:function() {
-
 
260
                        CKEDITOR.instances.description.updateElement();
-
 
261
                    },
-
 
262
                    required: true,
-
 
263
                },
-
 
264
                'text': {
-
 
265
                    updateCkeditor:function() {
-
 
266
                        CKEDITOR.instances.text.updateElement();
-
 
267
                    },
-
 
268
                    required: false,
-
 
269
                },
-
 
270
                'language': {
-
 
271
                    required: true,
-
 
272
                },
-
 
273
                'status': {
-
 
274
                    required: false,
-
 
275
                },
-
 
276
            },
-
 
277
            submitHandler: function(form)
-
 
278
            {
-
 
279
                $.ajax({
-
 
280
                    'dataType'  : 'json',
-
 
281
                    'accept'    : 'application/json',
-
 
282
                    'method'    : 'post',
-
 
283
                    'url'       :  $('#form').attr('action'),
-
 
284
                    'data'      :  $('#form').serialize()
-
 
285
                }).done(function(response) {
-
 
286
                    NProgress.start();
-
 
287
                    if(response['success']) {
-
 
288
                        $.fn.showSuccess(response['data']);
-
 
289
                        
-
 
290
                        $('#modal').modal( 'hide');
-
 
291
                        
-
 
292
                         gridTable.api().ajax.reload(null, false);
-
 
293
                    } else {
-
 
294
                        validator.resetForm();
-
 
295
                        if(jQuery.type(response['data']) == 'string') {
-
 
296
                            $.fn.showError(response['data']);
-
 
297
                        } else  {
-
 
298
                            $.each(response['data'], function( fieldname, errors ) {
-
 
299
                                $.fn.showFormErrorValidator('#form #' + fieldname, errors);
-
 
300
                            });
-
 
301
                        }
-
 
302
                    }
-
 
303
                }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
304
                   $.fn.showError(textStatus);
-
 
305
                }).always(function() {
-
 
306
                    NProgress.done();
-
 
307
                });
-
 
308
                return false;
-
 
309
            },
-
 
310
            invalidHandler: function(form, validator) {
-
 
311
            
-
 
312
            }
-
 
313
        });
-
 
314
        
-
 
315
        $('body').on('click', 'button.btn-add', function(e) {
-
 
316
            e.preventDefault();
-
 
317
 
-
 
318
            $('span[id="form-title"]').html('LABEL_ADD');
-
 
319
            $('#form').attr('action', '$routeAdd');
-
 
320
            $('#form #name').val('');
-
 
321
            $('#form #language').val('$language_es');
-
 
322
            CKEDITOR.instances.description.setData('');
-
 
323
            CKEDITOR.instances.text.setData('');
-
 
324
 
-
 
325
            $('#form #status').bootstrapToggle('on');
-
 
326
 
-
 
327
 
-
 
328
            validator.resetForm();
-
 
329
            $('#modal').modal('show');
-
 
330
        });
-
 
331
        
-
 
332
        $('body').on('click', 'button.btn-edit', function(e) {
-
 
333
            e.preventDefault();
-
 
334
            NProgress.start();
-
 
335
            var action = $(this).data('href');
-
 
336
 
-
 
337
            $.ajax({
-
 
338
                'dataType'  : 'json',
-
 
339
                'accept'    : 'application/json',
-
 
340
                'method'    : 'get',
-
 
341
                'url'       :  action,
-
 
342
            }).done(function(response) {
-
 
343
                if(response['success']) {
-
 
344
 
-
 
345
                    $('span[id="form-title"]').html('LABEL_EDIT');
-
 
346
                    $('#form').attr('action', action);
-
 
347
                    $('#form #name').val(response['data']['name']);
-
 
348
                    $('#form #language').val(response['data']['language']);
-
 
349
                    CKEDITOR.instances.description.setData(response['data']['description']);
-
 
350
                    CKEDITOR.instances.text.setData(response['data']['text']);
-
 
351
                    $('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
-
 
352
                    validator.resetForm();
-
 
353
                    
-
 
354
                    $('#modal').modal('show');
-
 
355
                } else {
-
 
356
                    $.fn.showError(response['data']);
-
 
357
                }
-
 
358
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
359
                $.fn.showError(textStatus);
-
 
360
            }).always(function() {
-
 
361
                NProgress.done();
-
 
362
            });
-
 
363
        });
-
 
364
 
-
 
365
        $('body').on('click', 'button.btn-refresh', function(e) {
-
 
366
            e.preventDefault();
-
 
367
            gridTable.api().ajax.reload(null, false);
-
 
368
        });
-
 
369
        
-
 
370
 
-
 
371
        $('body').on('click', 'button.btn-cancel', function(e) {
-
 
372
            e.preventDefault();
-
 
373
            $('#modal').modal('hide');
-
 
374
        });
-
 
375
 
-
 
376
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
-
 
377
 
-
 
378
        CKEDITOR.replace('description');
-
 
379
        CKEDITOR.replace('text');
-
 
380
    });
59
 
381
JS;
60
$this->inlineScript()->captureStart();
382
echo <<<JS
61
echo <<<JS
383
		const classFormGenerator = function() {
62
		const classFormGenerator = function() {
384
			this.id 				= 0,
63
			this.id 				= 0,
Línea 2119... Línea 1798...
2119
		</div>
1798
		</div>
2120
	</div><!-- /.container-fluid -->
1799
	</div><!-- /.container-fluid -->
2121
</section>
1800
</section>
Línea 2122... Línea 1801...
2122
 
1801
 
2123
<section class="content">
1802
<section class="content">
2124
	<div class="container-fluid">
1803
	<div class="container-fluid" id="row-forms">
2125
    	<div class="row">
1804
		<div class="row">
2126
        	<div class="col-12">
1805
				<div class="col-12">
2127
				<div class="card">                    
1806
			<div class="card">                    
2128
					<div class="card-body">
1807
				<div class="card-body">
2129
        	    		<table id="gridTable" class="table   table-hover">
1808
							<table id="gridTable" class="table   table-hover">
2130
                      		<thead>
1809
											<thead>
2131
        						<tr>
1810
												<tr>
2132
                                	<th>LABEL_NAME</th>
1811
													<th>LABEL_NAME</th>
2133
                                  	<th>LABEL_LANGUAGE</th>
1812
														<th>LABEL_LANGUAGE</th>
2134
                                  	<th>LABEL_ACTIVE</th>
1813
														<th>LABEL_ACTIVE</th>
2135
                                  	<th>LABEL_ACTIONS</th>
1814
														<th>LABEL_ACTIONS</th>
2136
                                </tr>
1815
												</tr>
2137
                       		</thead>
1816
											</thead>
2138
                         	<tbody>
1817
											<tbody>
2139
                         	</tbody>
1818
											</tbody>
2140
                    	</table>
1819
									</table>
2141
                   	</div>
1820
								</div>
2142
                   	<div class="card-footer clearfix">
1821
							<div class="card-footer clearfix">
2143
                   		<div style="float:right;">
1822
								<div style="float:right;">
2144
							<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
1823
									<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
2145
							<?php if($allowAdd) : ?>
1824
									<?php if($allowAdd) : ?>
2146
							<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
1825
									<button type="button" class="btn btn-primary btn-add-form"><i class="fa fa-plus"></i> LABEL_ADD </button>
-
 
1826
									<?php endif; ?>
2147
							<?php endif; ?>
1827
								</div>
2148
						</div>
-
 
2149
                 	</div>
1828
						</div>
2150
          		</div>
1829
				</div>
2151
           	</div>     
1830
			</div>     
2152
        </div>          
1831
		</div>          
2153
 	</div>
-
 
2154
</section> 	
-
 
2155
 
1832
 	</div>
2156
<!-- The Modal -->
1833
	<!-- Row Edit -->
2157
<div class="modal" id="modal">
1834
	<div class="row" id="row-edit" style="display: none">
2158
	<div class="modal-dialog  modal-xl">
-
 
2159
    	<div class="modal-content">
-
 
2160
 
-
 
2161
            <!-- Modal Header -->
1835
		<div class="col-xs-12 col-md-12">
2162
      		<div class="modal-header">
1836
			<form action="#" name="form-main" id="form-main">
2163
        		<h4 class="modal-title">LABEL_SELF_EVALUATION_FORM - <span id="form-title"></span></h4>
1837
				<input type="hidden" name="form-id" id="form-id" value="0" />
2164
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
-
 
2165
      		</div>
-
 
2166
 
-
 
2167
            <!-- Modal body -->
-
 
2168
      		<div class="modal-body">
-
 
2169
       			 <?php 
-
 
2170
                    $form = $this->form;
-
 
2171
            		$form->setAttributes([
-
 
2172
                        'method'    => 'post',
-
 
2173
                        'name'      => 'form',
-
 
2174
                        'id'        => 'form'
-
 
2175
                    ]);
-
 
2176
    
-
 
2177
                    $form->prepare();
-
 
2178
                    echo $this->form()->openTag($form);
-
 
2179
                    ?>					
1838
				<input type="hidden" name="form-continue" id="form-continue" value="0" />
2180
    					<div class="form-group">
-
 
2181
        					<?php 
1839
						<div class="form-group">
2182
                            $element = $form->get('name');
-
 
2183
                            $element->setOptions(['label' => 'LABEL_NAME']);
1840
							<label for="form-name">LABEL_FIRST_NAME</label>
2184
                            $element->setAttributes(['class' => 'form-control']); 
-
 
2185
                                            
-
 
2186
                            echo $this->formLabel($element);
-
 
2187
                            echo $this->formText($element);
-
 
2188
                            ?>
1841
							<input type="text" name="form-name" id="form-name" class="form-control" maxlength="50" />
2189
						</div>
1842
						</div>
2190
						<div class="form-group">
-
 
2191
                    	<?php 
1843
						<div class="form-group">
2192
                            $element = $form->get('language');
1844
							<label for="form-description">LABEL_DESCRIPTION</label>
2193
                            $element->setOptions(['label' => 'LABEL_LANGUAGE']);
1845
							<!--  ckeditor -->
2194
                            $element->setAttributes(['class' => 'form-control']); 
-
 
2195
 
-
 
2196
                            echo $this->formLabel($element);
-
 
2197
                            echo $this->formSelect($element);
-
 
2198
                        ?>
1846
							<textarea  name="form-description" id="form-description" rows="5" class="ckeditor form-control"></textarea>
2199
						</div>
1847
						</div>
2200
						<div class="form-group">
-
 
2201
                    	<?php 
1848
						<div class="form-group">
2202
                            $element = $form->get('description');
1849
							<label for="form-text">LABEL_TEXT</label>
2203
                            $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
1850
							<!--  ckeditor -->
2204
                            $element->setAttributes(['class' => 'form-control']); 
-
 
2205
                                        
-
 
2206
                            echo $this->formLabel($element);
-
 
2207
                            echo $this->formTextArea($element);
-
 
2208
                        ?>
1851
							<textarea  name="form-text" id="form-text" rows="5" class="ckeditor form-control"></textarea>
2209
						</div>
1852
						</div>
2210
						<div class="form-group">
-
 
2211
                    	<?php 
1853
						<div class="form-group">
2212
                            $element = $form->get('text');
-
 
2213
                            $element->setOptions(['label' => 'LABEL_TEXT']);
1854
							<label for="form-language">LABEL_LANGUAGES</label>
2214
                            $element->setAttributes(['class' => 'form-control']); 
-
 
2215
                                        
1855
							<select name="form-language" id="form-language" class="form-control">
2216
                            echo $this->formLabel($element);
1856
								<option value="EN">LABEL_ENGLISH</option>
2217
                            echo $this->formTextArea($element);
1857
								<option value="SP">LABEL_SPANISH</option>
2218
                        ?>
1858
							</select>
2219
						</div>
1859
						</div>
2220
						<div class="form-group">
1860
						<div class="form-group">
2221
                      	<?php 
1861
							<label for="form-status">LABEL_STATUS</label>
2222
                            $element = $form->get('status');
1862
							<select name="form-status" id="form-status" class="form-control">
-
 
1863
								<option value="D">LABEL_INACTIVE</option>
2223
                            echo $this->formCheckbox($element);
1864
								<option value="A">LABEL_ACTIVE</option>
2224
                        ?>
1865
							</select>
2225
						</div>
-
 
2226
								
-
 
2227
        				<div class="form-group">
-
 
2228
                    		<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
2229
                    		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
-
 
2230
                   		</div>
-
 
2231
     	      		<?php echo $this->form()->closeTag($form); ?>
1866
						</div>
2232
      		</div>
-
 
2233
 
1867
						<br/>
2234
            <!-- Modal footer -->
1868
						<div class="row">
2235
      		<div class="modal-footer">
1869
					<div class="col-xs-12 col-md-12 text-right">
2236
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
1870
						<button class="btn btn-primary" id="btn-add-section" data-toggle="tooltip" title="LABEL_ADD LABEL_SECTION"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD LABEL_SECTION</button>
2237
      		</div>
-
 
2238
 
1871
					</div>
2239
    	</div>
1872
				</div>
2240
	</div>
1873
				<br />	
2241
</div>    			
-
 
2242
			
-
 
-
 
1874
				<div class="row">
-
 
1875
					<div class="col-xs-12 col-md-12">
2243
			
1876
						<div class="panel-group" id="accordion">
Línea -... Línea 1877...
-
 
1877
						
-
 
1878
 
-
 
1879
						
-
 
1880
						</div>	                  
-
 
1881
					</div>
Línea -... Línea 1882...
-
 
1882
				</div>	
-
 
1883
				
-
 
1884
 
-
 
1885
				<div class="form-group">
-
 
1886
					<button type="submit" form="form-main" class="btn btn-info btn-form-save-continue">LABEL_SAVE & LABEL_CONTINUE</button>
-
 
1887
					<button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE & LABEL_CLOSE</button>
-
 
1888
					<button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
2244
 
1889
				</div>
-
 
1890
			</form>
-
 
1891
		</div>
-
 
1892
	</div>
-
 
1893
	<!-- End Row Edit -->
-
 
1894
	<!-- Modals -->
-
 
1895
		<!-- Section Modal -->
-
 
1896
		<div  id="modal-section" class="modal" tabindex="-1" role="dialog">
-
 
1897
			<div class="modal-dialog" role="document">
-
 
1898
					<form action="#" name="form-section" id="form-section">
-
 
1899
						<input type="hidden" name="section-slug" id="section-slug" value="" />
-
 
1900
						<div class="modal-content">
-
 
1901
								<div class="modal-header">
-
 
1902
									<!-- <h4 class="modal-title">Modal title</h4> -->
-
 
1903
									<!-- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1904
								<span aria-hidden="true">&times;</span>
-
 
1905
									</button> -->
-
 
1906
								</div>
-
 
1907
								<div class="modal-body">
-
 
1908
							<div class="form-group">
-
 
1909
								<label for="section-name">LABEL_FIRST_NAME</label>
-
 
1910
										<input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
-
 
1911
									</div>
-
 
1912
									<div class="form-group">
-
 
1913
										<label for="section-text">LABEL_TEXT</label>
-
 
1914
										<!--  ckeditor -->
-
 
1915
										<textarea  name="section-text" id="section-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1916
									</div>
-
 
1917
									<div class="form-group">
-
 
1918
										<label for="section-value">LABEL_VALUE</label>
-
 
1919
										<input type="text" name="section-value" id="section-value"  class="form-control" value="0" />
-
 
1920
									</div>
-
 
1921
								</div>
-
 
1922
								<div class="modal-footer">
-
 
1923
									<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1924
									<button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1925
								</div>
-
 
1926
						</div>
-
 
1927
					</form>
-
 
1928
			</div>
-
 
1929
		</div>
-
 
1930
		<!-- End Modal Section -->
-
 
1931
		<!-- Question Modal -->
-
 
1932
			<div  id="modal-question" class="modal" tabindex="-1" role="dialog">
-
 
1933
				<div class="modal-dialog" role="document">
-
 
1934
					<form action="#" name="form-question" id="form-question">
-
 
1935
						<input type="hidden" name="question-section" id="question-section" />
-
 
1936
						<input type="hidden" name="question-slug" id="question-slug" />
-
 
1937
							<div class="modal-content">
-
 
1938
								<div class="modal-header">
-
 
1939
										<h4 class="modal-title">LABEL_ADD LABEL_QUESTION</h4>
-
 
1940
										<button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1941
											<span aria-hidden="true">&times;</span>
-
 
1942
										</button>
-
 
1943
									</div>
-
 
1944
								<div class="modal-body">
-
 
1945
										<div class="form-group">
-
 
1946
											<label for="question-text">LABEL_TEXT</label>
-
 
1947
											<!--  ckeditor -->
-
 
1948
											<textarea  name="question-text" id="question-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1949
										</div>
-
 
1950
										<div class="form-group">
-
 
1951
											<label for="question-value">LABEL_VALUE</label>
-
 
1952
											<input type="text" name="question-value" id="question-value"  class="form-control" />
-
 
1953
										</div>
-
 
1954
										<div class="form-group">
-
 
1955
											<label for="question-type">LABEL_TYPE</label>
-
 
1956
											<select name="question-type" id="question-type" class="form-control">
-
 
1957
												<option value="open">LABEL_OPEN</option>
-
 
1958
												<option value="simple">Simple</option>
-
 
1959
												<option value="multiple">Multiple</option>
-
 
1960
												<option value="rating-open">LABEL_RATING_OPEN</option>
-
 
1961
												<option value="rating-range">LABEL_RATING_RANGE</option>
-
 
1962
											</select>
-
 
1963
										</div>
-
 
1964
										<div class="form-group">
-
 
1965
											<label for="question-max-length">LABEL_MAXLENGTH</label>
-
 
1966
											<input type="text" name="question-max-length" id="question-max-length"  class="form-control" />
-
 
1967
										</div>
-
 
1968
										<div class="form-group">
-
 
1969
											<label for="question-multiline">LABEL_MULTI_LINE</label>
-
 
1970
											<select name="question-multiline" id="question-multiline" class="form-control">
-
 
1971
												<option value="1">LABEL_YES</option>
-
 
1972
												<option value="0">No</option>
-
 
1973
											</select>
-
 
1974
										</div>
-
 
1975
										<div class="form-group">
-
 
1976
											<label for="question-range">LABEL_RANGE</label>
-
 
1977
											<select name="question-range" id="question-range" class="form-control">
-
 
1978
												<option value="10">1-10</option>
-
 
1979
												<option value="6">1-6</option>
-
 
1980
												<option value="5">1-5</option>
-
 
1981
											</select>
-
 
1982
										</div>
-
 
1983
									</div>
-
 
1984
									<div class="modal-footer">
-
 
1985
										<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1986
										<button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1987
									</div>
-
 
1988
							</div>
-
 
1989
						</form>
-
 
1990
				</div>
-
 
1991
			</div>
-
 
1992
		<!-- End Modal Question -->
-
 
1993
		<!-- MOdal Options -->
-
 
1994
		<div  id="modal-option" class="modal" tabindex="-1" role="dialog">
-
 
1995
			<div class="modal-dialog" role="document">
-
 
1996
				<form action="#" name="form-option" id="form-option">
-
 
1997
						<input type="hidden" name="option-section" id="option-section" value="" />
-
 
1998
						<input type="hidden" name="option-question" id="option-question" value="" />
-
 
1999
						<input type="hidden" name="option-slug" id="option-slug" value="" />
-
 
2000
							<div class="modal-content">
-
 
2001
								<div class="modal-header">
-
 
2002
									<h4 class="modal-title">LABEL_OPTION</h4>
-
 
2003
									<button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
2004
										<span aria-hidden="true">&times;</span>
-
 
2005
									</button>
-
 
2006
								</div>
-
 
2007
								<div class="modal-body">
-
 
2008
									<div class="form-group">
-
 
2009
										<label for="option-text">LABEL_TEXT</label>
-
 
2010
										<!--  ckeditor -->
-
 
2011
										<textarea  name="option-text" id="option-text" rows="5" class="ckeditor form-control"></textarea>
-
 
2012
									</div>
-
 
2013
									<div class="form-group">
-
 
2014
										<label for="option-correct">LABEL_ANSWER_CORRECT</label>
-
 
2015
										<select name="option-correct" id="option-correct" class="form-control">
-
 
2016
											<option value="1">LABEL_YES</option>
-
 
2017
											<option value="0">No</option>
-
 
2018
										</select>
-
 
2019
									</div>
-
 
2020
									<div class="form-group">
-
 
2021
										<label for="option-value">LABEL_VALUE</label>
-
 
2022
										<input type="text" name="option-value" id="option-value" class="form-control" />
-
 
2023
									</div>
-
 
2024
								</div>
-
 
2025
								<div class="modal-footer">
-
 
2026
									<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
2027
									<button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
2028
								</div>
-
 
2029
						</div>
-
 
2030
					</form>
-
 
2031
			</div>
-
 
2032
		</div>
2245
 
2033
		<!-- End Modal Options -->