| Línea 310... |
Línea 310... |
| 310 |
$('span[id="form-title"]').html('LABEL_ADD');
|
310 |
$('span[id="form-title"]').html('LABEL_ADD');
|
| 311 |
$('#form').attr('action', '$routeAdd');
|
311 |
$('#form').attr('action', '$routeAdd');
|
| 312 |
$('#form #name').val('');
|
312 |
$('#form #name').val('');
|
| 313 |
$('#form #competency_type_id').val('').trigger('change');
|
313 |
$('#form #competency_type_id').val('').trigger('change');
|
| 314 |
$('#form #status').bootstrapToggle('on');
|
314 |
$('#form #status').bootstrapToggle('on');
|
| - |
|
315 |
behaviors=[];
|
| 315 |
CKEDITOR.instances.description.setData('');
|
316 |
CKEDITOR.instances.description.setData('');
|
| 316 |
validator.resetForm();
|
317 |
validator.resetForm();
|
| 317 |
$('#row-form').show();
|
318 |
$('#row-form').show();
|
| 318 |
$('#row-list').hide();
|
319 |
$('#row-list').hide();
|
| 319 |
return false;
|
320 |
return false;
|
| Línea 332... |
Línea 333... |
| 332 |
$('#form').attr('action', action);
|
333 |
$('#form').attr('action', action);
|
| 333 |
$('#form #name').val(response['data']['name']);
|
334 |
$('#form #name').val(response['data']['name']);
|
| 334 |
$('#form #competency_type_id').val(response['data']['competency_type_id']).trigger('change');
|
335 |
$('#form #competency_type_id').val(response['data']['competency_type_id']).trigger('change');
|
| 335 |
$('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
|
336 |
$('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
|
| 336 |
CKEDITOR.instances.description.setData(response['data']['description']);
|
337 |
CKEDITOR.instances.description.setData(response['data']['description']);
|
| - |
|
338 |
behaviors=response['data']['behaviors'] || [];
|
| 337 |
validator.resetForm();
|
339 |
validator.resetForm();
|
| 338 |
$('#row-form').show();
|
340 |
$('#row-form').show();
|
| 339 |
$('#row-list').hide();
|
341 |
$('#row-list').hide();
|
| 340 |
} else {
|
342 |
} else {
|
| 341 |
$.fn.showError(response['data']);
|
343 |
$.fn.showError(response['data']);
|