80 lines
2.6 KiB
PHP
80 lines
2.6 KiB
PHP
<h4>
|
|
Carga de documentos
|
|
</h4>
|
|
<div class="ui list">
|
|
@include('admin.documento', ['descripcion' => 'Escrituras Públicas', 'link' => 'escrituras_publicas'])
|
|
@include('admin.documento', ['descripcion' => 'Balances Anuales', 'link' => 'balances_anuales'])
|
|
@include('admin.documento', ['descripcion' => 'Interés y Patrimonio', 'link' => 'intereses_y_patrimonio'])
|
|
@include('admin.documento', ['descripcion' => 'Informes Fiscalía', 'link' => 'informes_fiscalia'])
|
|
@include('admin.documento', ['descripcion' => 'Valores', 'link' => 'valores'])
|
|
</div>
|
|
<div class="ui basic modal" id="doc_form">
|
|
<i class="close icon"></i>
|
|
<div class="inverted dark-blue header">
|
|
</div>
|
|
<div class="inverted dark-blue content">
|
|
<form class="ui form" method="post" action="#">
|
|
<input type="hidden" name="filename" />
|
|
<div class="field">
|
|
<input type="file" name="archivo" placeholder="Archivo" />
|
|
</div>
|
|
<button class="ui button">Subir</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<h4>
|
|
Transparencia
|
|
</h4>
|
|
<div class="ui toggle checkbox" id="transparencia">
|
|
<label>Activar</label>
|
|
<input type="checkbox" name="transparencia"
|
|
@if ($transparencia)
|
|
checked="checked"
|
|
@endif
|
|
/>
|
|
</div>
|
|
|
|
@push('scripts')
|
|
<script type="text/javascript">
|
|
function formulario(link, title) {
|
|
$('#doc_form').find('.header').html(title)
|
|
$('#doc_form').find('form').find("[name='filename']").val(link)
|
|
$('#doc_form').modal('show')
|
|
$('#doc_form').find('form').submit(function(e) {
|
|
e.preventDefault()
|
|
var form_data = new FormData(this)
|
|
$.ajax({
|
|
url: '{{$urls->base}}/admin/documentos',
|
|
type: 'post',
|
|
data: form_data,
|
|
contentType: false,
|
|
cache: false,
|
|
processData: false,
|
|
success: function(data) {
|
|
if (data.estado == true) {
|
|
$('#doc_form').find('.header').html('')
|
|
$('#doc_form').find('form').find("[name='filename']").val('')
|
|
$('#doc_form').modal('hide')
|
|
}
|
|
}
|
|
})
|
|
|
|
return false
|
|
})
|
|
}
|
|
$(document).ready(function() {
|
|
$('#transparencia').checkbox()
|
|
$('#transparencia').click(function() {
|
|
var status = $(this).checkbox('is checked')
|
|
$.post('{{$urls->base}}/admin/transparencia', {'activo': status}, function(data) {}, 'json')
|
|
})
|
|
$('#doc_form').modal()
|
|
$('.form_link').click(function() {
|
|
var link = $(this).attr('data-link')
|
|
var title = $(this).attr('data-title')
|
|
formulario(link, title)
|
|
})
|
|
})
|
|
</script>
|
|
@endpush
|