planifibot/public/js/edit.js

27 lines
1.0 KiB
JavaScript

function copiarEnlace() {
var copyText = document.getElementById("enlace");
/* Select the text field */
copyText.select();
copyText.setSelectionRange(0, 99999); /* For mobile devices */
/* Copy the text inside the text field */
document.execCommand("copy");
alert("ok");
}
const HORARIO_CONTAINER = '<div class="horario-container">\n' +
' <input required name="horario[]dia" type="text" class="formulario dia">\n' +
' <div class="horas">\n' +
' <input required name="horario[]llegada" type="time" class="formulario hora">\n' +
' <input required name="horario[]salida" type="time" class="formulario hora">\n' +
' </div>\n' +
' </div>';
function agregarHorarioContainer() {
$('#horarios').append(HORARIO_CONTAINER);
}
$( document ).ready(function() {
agregarHorarioContainer();
});