<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Consejo de la Magistratura de Buenos Aires</title>
<link rel="icon" href="https://www.cmagistratura.gba.gov.ar/core/misc/favicon.ico">
<link rel="stylesheet" href="{{ asset('css/materialize.css', 'portal') }}" />
<link rel="stylesheet" href="{{ asset('css/custom.css', 'portal') }}" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style>
{% block estilos %}
html,
body {
height: 100%;
}
html {
display: table;
margin: auto;
}
body {
display: table-cell;
vertical-align: middle;
}
body {
background: var(--cdlmag-primario-1); //color azul primario;
}
.caja {width: 400px;}
.card .card-title {
font-size: 18px;
}
.input-field {
position: relative;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.card-error{
padding: 17px;
margin: 0.5rem 0 1rem 0;
border-radius: 2px;
}
@media (max-width: 600px) {
.caja {
width:auto;
}
}
{% endblock %}
</style>
</head>
<body>
<div class="section">
{% block contenido %}{% endblock %}
</div>
<!--fin -->
<script type="text/javascript" src="{{ asset('js/jquery/jquery-3.5.1.js', 'portal') }}"></script>
<script type="text/javascript" src="{{ asset('js/materialize.js', 'portal') }}"></script>
<script type="text/javascript">
{% block javascripts_base %}{% endblock %}
/**
* Fix the displayed date format when opening the calendar for the
* first time since there's no setting to do it otherwise.
*/
function initDateFormat( datePicker ) {
console.debug(datePicker);
var selectedDate = ( typeof datePicker.date === 'undefined' || datePicker.date === null ) ? datePicker.options.defaultDate : datePicker.date;
var shortWeekdays = datePicker.options.i18n.weekdaysShort;
var shortMonths = datePicker.options.i18n.monthsShort;
var day = selectedDate.getDate();
var weekday = shortWeekdays[ selectedDate.getDay() ];
var month = shortMonths[ selectedDate.getMonth() ];
var formattedDate = weekday + ', ' + day + ' ' + month;
document.querySelector(".datepicker-date-display .date-text").innerHTML = formattedDate;
document.querySelector(".datepicker-date-display .year-text").innerHTML = selectedDate.getFullYear();
}
function inicializarDatePicker(
p_defaultDate,
p_yearRange,
p_maxDate,
p_setDefaultDate
)
{
$('.datepicker').datepicker({
autoClose: true,
showClearBtn: true,
format: 'dd/mm/yyyy',
container: 'body',
defaultDate: p_defaultDate,
yearRange: p_yearRange,
maxDate: p_maxDate,
setDefaultDate: p_setDefaultDate,
onDraw: function (datePicker) {
// materialize select dropdown not proper working on mobile and tablets so we make it browser default select
$('.datepicker-container').find('.datepicker-select').addClass('browser-default');
$(".datepicker-container .select-dropdown.dropdown-trigger").remove();
},
onOpen: function (p) {
var instance = M.Datepicker.getInstance(this.el);
var d = instance.el.value.split(/[^0-9]/);
var newDate = new Date(d[2], d[1] - 1, d[0]);
instance.setDate(newDate);
initDateFormat(instance);
},
i18n: {
cancel: 'Cancelar',
clear: 'Limpiar',
done: 'Aceptar',
weekdays: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
weekdaysShort: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
weekdaysAbbrev: ["D", "L", "M", "M", "J", "V", "S"],
today: 'Hoy',
months: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
monthsShort: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
}
});
}
$(document).ready(function(){
$('.modal').modal();
{# Abrir modal de avisos en caso necesario #}
{% if app.session.flashBag.has('notice') %}
$('#modalAvisos').modal('open');
{% endif %}
{% if app.session.flashBag.has('error') %}
$('#modalErrores').modal('open');
{% endif %}
{% block js_document_ready %}{% endblock %}
});
</script>
{# Modals de avisos #}
{% if app.session.flashBag.has('notice') %}
<div id="modalAvisos" class="modal">
<div class="modal-content">
{% for message in app.session.flashbag.get('notice') %}
{{ message |raw }}
{% endfor %}
<div>
<div class="modal-footer">
<a href="{{ path('app_login') }}" class="modal-close waves-effect waves-green btn-flat">Aceptar</a>
<div>
</div>
{% endif %}
{% if app.session.flashBag.has('error') %}
<div id="modalErrores" class="modal red lighten-2">
<div class="modal-content">
{% for message in app.session.flashbag.get('error') %}
{{ message |raw }}
{% endfor %}
<div>
<div class="modal-footer red lighten-2">
<a href="#!" class="modal-close waves-effect waves-green btn-flat">Aceptar</a>
<div>
</div>
{% endif %}
{% block dialogos_modales %}{% endblock %}
</body>
</html>