fix agenda files upload

pull/2990/head
Alex Aragón 7 years ago
parent a73c856883
commit 06c4dc0874
  1. 15
      app/Resources/public/css/base.css
  2. 3
      main/calendar/agenda.php
  3. 12
      main/inc/lib/agenda.lib.php

@ -933,7 +933,16 @@ input[type=checkbox], input[type=radio] {
border: 1px solid #bbb;
border-collapse: collapse;
}
.file-upload-event{
margin-top: 1rem;
}
.file-upload-event label{
font-weight: normal;
margin-top: 1rem;
}
.file-upload-event .form-control {
margin-bottom: 1rem;
}
.agenda_month_divider {
background-color: #dcdcdc;
font-weight: bold;
@ -4396,10 +4405,6 @@ i.size-32.icon-new-work {
/* Default skill partition colors */
#filepaths input {
margin-bottom: 5px;
}
.xdebug-error {
margin-top: 20px;
}

@ -71,10 +71,11 @@ function add_image_form() {
}
var elem1 = document.createElement("div");
elem1.setAttribute("id","filepath_"+counter_image);
filepaths.appendChild(elem1);
id_elem1 = "filepath_"+counter_image;
id_elem1 = "\'"+id_elem1+"\'";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" />&nbsp; <br />'.get_lang('Description').'&nbsp;&nbsp;<input type=\"text\" name=\"legend[]\" /><br /><br />";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" /><label>'.get_lang('Description').'</label><input class=\"form-control\" type=\"text\" name=\"legend[]\" />";
if (filepaths.childNodes.length == 6) {
var link_attach = document.getElementById("link-more-attach");
if (link_attach) {

@ -2490,12 +2490,16 @@ class Agenda
$form->addElement('textarea', 'comment', get_lang('Comment'));
$form->addLabel(
get_lang('FilesAttachment'),
'<span id="filepaths">
'<div id="filepaths" class="file-upload-event">
<div id="filepath_1">
<input type="file" name="attach_1"/><br />
'.get_lang('Description').'&nbsp;&nbsp;<input type="text" name="legend[]" /><br /><br />
<input type="file" name="attach_1"/>
<label>'.get_lang('Description').'</label>
<input class="form-control" type="text" name="legend[]" />
</div>
</span>'
</div>'
);
$form->addLabel(

Loading…
Cancel
Save