| Línea 237... |
Línea 237... |
| 237 |
$('#form-main').attr('action', action);
|
237 |
$('#form-main').attr('action', action);
|
| 238 |
$('#form-main #form-name').val(response['data']['name']);
|
238 |
$('#form-main #form-name').val(response['data']['name']);
|
| 239 |
$('#form-main #job_description_id').val(response['data']['job_description_id']).trigger('change');
|
239 |
$('#form-main #job_description_id').val(response['data']['job_description_id']).trigger('change');
|
| 240 |
$('#form-main #form-status').val(response['data']['status']);
|
240 |
$('#form-main #form-status').val(response['data']['status']);
|
| 241 |
CKEDITOR.instances['form-description'].setData(response['data']['description']);
|
241 |
CKEDITOR.instances['form-description'].setData(response['data']['description']);
|
| 242 |
CKEDITOR.instances['form-text'].setData(response['data']['text']);
|
- |
|
| - |
|
242 |
|
| 243 |
sections = response['data']['content'] || [];
|
243 |
sections = response['data']['content'] || [];
|
| 244 |
renderData(sections);
|
244 |
renderData(sections);
|
| 245 |
$('#row-lists').hide();
|
245 |
$('#row-lists').hide();
|
| 246 |
$('#row-form').show();
|
246 |
$('#row-form').show();
|
| 247 |
} else {
|
247 |
} else {
|
| Línea 397... |
Línea 397... |
| 397 |
sections = [];
|
397 |
sections = [];
|
| 398 |
$('#form-main').attr('action', '$routeAdd');
|
398 |
$('#form-main').attr('action', '$routeAdd');
|
| 399 |
$('#form-main #form-name').val('');
|
399 |
$('#form-main #form-name').val('');
|
| 400 |
$('#form-main #job_description_id').val('').trigger('change');
|
400 |
$('#form-main #job_description_id').val('').trigger('change');
|
| 401 |
$('#form-main #form-status').val('$status_active');
|
401 |
$('#form-main #form-status').val('$status_active');
|
| 402 |
CKEDITOR.instances['form-text'].setData('');
|
- |
|
| 403 |
CKEDITOR.instances['form-description'].setData('');
|
402 |
CKEDITOR.instances['form-description'].setData('');
|
| 404 |
renderCompetenciesData([]);
|
403 |
renderCompetenciesData([]);
|
| 405 |
$('#row-lists').hide();
|
404 |
$('#row-lists').hide();
|
| 406 |
$('#row-form').show();
|
405 |
$('#row-form').show();
|
| 407 |
$('#form-main #form-name').focus();
|
406 |
$('#form-main #form-name').focus();
|
| Línea 457... |
Línea 456... |
| 457 |
'data': {
|
456 |
'data': {
|
| 458 |
'name': $('#form-main #form-name').val(),
|
457 |
'name': $('#form-main #form-name').val(),
|
| 459 |
'job_description_id': $('#form-main #job_description_id').val(),
|
458 |
'job_description_id': $('#form-main #job_description_id').val(),
|
| 460 |
'status': $('#form-main #form-status').val(),
|
459 |
'status': $('#form-main #form-status').val(),
|
| 461 |
'description': $('#form-main #form-description').val(),
|
460 |
'description': $('#form-main #form-description').val(),
|
| 462 |
'text': $('#form-main #form-text').val(),
|
- |
|
| 463 |
'content': JSON.stringify(sections)
|
461 |
'content': JSON.stringify(sections)
|
| 464 |
},
|
462 |
},
|
| 465 |
}).done(function(response) {
|
463 |
}).done(function(response) {
|
| 466 |
if (response['success']) {
|
464 |
if (response['success']) {
|
| 467 |
$.fn.showSuccess(response['data']);
|
465 |
$.fn.showSuccess(response['data']);
|
| Línea 682... |
Línea 680... |
| 682 |
<label for="form-description">LABEL_DESCRIPTION</label>
|
680 |
<label for="form-description">LABEL_DESCRIPTION</label>
|
| 683 |
<!-- ckeditor -->
|
681 |
<!-- ckeditor -->
|
| 684 |
<textarea name="form-description" id="form-description" rows="5" class="ckeditor form-control"></textarea>
|
682 |
<textarea name="form-description" id="form-description" rows="5" class="ckeditor form-control"></textarea>
|
| 685 |
</div>
|
683 |
</div>
|
| 686 |
<div class="form-group">
|
684 |
<div class="form-group">
|
| 687 |
<label for="form-text">LABEL_TEXT</label>
|
- |
|
| 688 |
<!-- ckeditor -->
|
- |
|
| 689 |
<textarea name="form-text" id="form-text" rows="5" class="ckeditor form-control"></textarea>
|
- |
|
| 690 |
</div>
|
- |
|
| 691 |
<div class="form-group">
|
- |
|
| 692 |
<label for="form-status">LABEL_STATUS</label>
|
685 |
<label for="form-status">LABEL_STATUS</label>
|
| 693 |
<select name="form-status" id="form-status" class="form-control">
|
686 |
<select name="form-status" id="form-status" class="form-control">
|
| 694 |
<option value="<?php echo $status_inactive; ?>">LABEL_INACTIVE</option>
|
687 |
<option value="<?php echo $status_inactive; ?>">LABEL_INACTIVE</option>
|
| 695 |
<option value="<?php echo $status_active; ?>">LABEL_ACTIVE</option>
|
688 |
<option value="<?php echo $status_active; ?>">LABEL_ACTIVE</option>
|
| 696 |
</select>
|
689 |
</select>
|