| Línea 229... |
Línea 229... |
| 229 |
sections = [];
|
229 |
sections = [];
|
| 230 |
$('#form-main').attr('action', action);
|
230 |
$('#form-main').attr('action', action);
|
| 231 |
$('#form-main #form-name').val(response['data']['name']);
|
231 |
$('#form-main #form-name').val(response['data']['name']);
|
| 232 |
$('#form-main #job_description_id').val(response['data']['job_description_id']);
|
232 |
$('#form-main #job_description_id').val(response['data']['job_description_id']);
|
| 233 |
$('#form-main #form-status').val(response['data']['status']);
|
233 |
$('#form-main #form-status').val(response['data']['status']);
|
| - |
|
234 |
CKEDITOR.instances['form-description'].setData(response['data']['description']);
|
| - |
|
235 |
CKEDITOR.instances['form-text'].setData(response['data']['text']);
|
| 234 |
sections = response['data']['content'] || [];
|
236 |
sections = response['data']['content'] || [];
|
| 235 |
renderData(sections);
|
237 |
renderData(sections);
|
| 236 |
$('#row-lists').hide();
|
238 |
$('#row-lists').hide();
|
| 237 |
$('#row-form').show();
|
239 |
$('#row-form').show();
|
| 238 |
} else {
|
240 |
} else {
|
| Línea 388... |
Línea 390... |
| 388 |
sections = [];
|
390 |
sections = [];
|
| 389 |
$('#form-main').attr('action', '$routeAdd');
|
391 |
$('#form-main').attr('action', '$routeAdd');
|
| 390 |
$('#form-main #form-name').val('');
|
392 |
$('#form-main #form-name').val('');
|
| 391 |
$('#form-main #job_description_id').val('');
|
393 |
$('#form-main #job_description_id').val('');
|
| 392 |
$('#form-main #form-status').val('$status_active');
|
394 |
$('#form-main #form-status').val('$status_active');
|
| - |
|
395 |
CKEDITOR.instances['form-text'].setData('');
|
| - |
|
396 |
CKEDITOR.instances['form-description'].setData('');
|
| 393 |
$('#row-lists').hide();
|
397 |
$('#row-lists').hide();
|
| 394 |
$('#row-form').show();
|
398 |
$('#row-form').show();
|
| 395 |
$('#form-main #form-name').focus();
|
399 |
$('#form-main #form-name').focus();
|
| 396 |
return;
|
400 |
return;
|
| 397 |
});
|
401 |
});
|
| Línea 422... |
Línea 426... |
| 422 |
'url': $('#form-main').attr('action'),
|
426 |
'url': $('#form-main').attr('action'),
|
| 423 |
'data': {
|
427 |
'data': {
|
| 424 |
'name': $('#form-main #form-name').val(),
|
428 |
'name': $('#form-main #form-name').val(),
|
| 425 |
'job_description_id': $('#form-main #job_description_id').val(),
|
429 |
'job_description_id': $('#form-main #job_description_id').val(),
|
| 426 |
'status': $('#form-main #form-status').val(),
|
430 |
'status': $('#form-main #form-status').val(),
|
| - |
|
431 |
'description': $('#form-main #form-description').val(),
|
| - |
|
432 |
'text': $('#form-main #form-text').val(),
|
| 427 |
'content': JSON.stringify(sections)
|
433 |
'content': JSON.stringify(sections)
|
| 428 |
},
|
434 |
},
|
| 429 |
}).done(function(response) {
|
435 |
}).done(function(response) {
|
| 430 |
if (response['success']) {
|
436 |
if (response['success']) {
|
| 431 |
$.fn.showSuccess(response['data']);
|
437 |
$.fn.showSuccess(response['data']);
|
| Línea 596... |
Línea 602... |
| 596 |
<?php foreach ($jobsDescription as $rs): ?>
|
602 |
<?php foreach ($jobsDescription as $rs): ?>
|
| 597 |
<option value="<?php echo $rs->uuid;?>"><?php echo $rs->name;?></option>
|
603 |
<option value="<?php echo $rs->uuid;?>"><?php echo $rs->name;?></option>
|
| 598 |
<?php endforeach; ?>
|
604 |
<?php endforeach; ?>
|
| 599 |
</select>
|
605 |
</select>
|
| 600 |
</div>
|
606 |
</div>
|
| - |
|
607 |
<div class="form-group">
|
| - |
|
608 |
<label for="form-description">LABEL_DESCRIPTION</label>
|
| - |
|
609 |
<!-- ckeditor -->
|
| - |
|
610 |
<textarea name="form-description" id="form-description" rows="5" class="ckeditor form-control"></textarea>
|
| - |
|
611 |
</div>
|
| - |
|
612 |
<div class="form-group">
|
| - |
|
613 |
<label for="form-text">LABEL_TEXT</label>
|
| - |
|
614 |
<!-- ckeditor -->
|
| - |
|
615 |
<textarea name="form-text" id="form-text" rows="5" class="ckeditor form-control"></textarea>
|
| - |
|
616 |
</div>
|
| 601 |
<div class="form-group">
|
617 |
<div class="form-group">
|
| 602 |
<label for="form-status">LABEL_STATUS</label>
|
618 |
<label for="form-status">LABEL_STATUS</label>
|
| 603 |
<select name="form-status" id="form-status" class="form-control">
|
619 |
<select name="form-status" id="form-status" class="form-control">
|
| 604 |
<option value="<?php echo $status_inactive; ?>">LABEL_INACTIVE</option>
|
620 |
<option value="<?php echo $status_inactive; ?>">LABEL_INACTIVE</option>
|
| 605 |
<option value="<?php echo $status_active; ?>">LABEL_ACTIVE</option>
|
621 |
<option value="<?php echo $status_active; ?>">LABEL_ACTIVE</option>
|