فهرست منبع

Agenda: Fix attachment link UI see BT#16127

Julio Montoya 5 سال پیش
والد
کامیت
266a0c4d2f
2فایلهای تغییر یافته به همراه16 افزوده شده و 4 حذف شده
  1. 4 3
      main/calendar/agenda_js.php
  2. 12 1
      main/template/default/agenda/month.tpl

+ 4 - 3
main/calendar/agenda_js.php

@@ -279,11 +279,12 @@ if ($agenda->type === 'course') {
     $form->addElement('checkbox', 'add_as_annonuncement', null, get_lang('AddAsAnnouncement'));
     $form->addHtml('</div>');
     $form->addElement('textarea', 'comment', get_lang('Comment'), ['id' => 'comment']);
-    $form->addHtml('<div id="attachment_block" style="display: none">');
-    $form->addLabel(get_lang('Attachment'), '<div id="attachment_text" style="display: none"></div>');
-    $form->addHtml('</div>');
 }
 
+$form->addHtml('<div id="attachment_block" style="display: none">');
+$form->addLabel(get_lang('Attachment'), '<div id="attachment_text" style="display: none"></div>');
+$form->addHtml('</div>');
+
 $tpl->assign('form_add', $form->returnForm());
 $tpl->assign('legend_list', api_get_configuration_value('agenda_legend'));
 

+ 12 - 1
main/template/default/agenda/month.tpl

@@ -47,7 +47,7 @@ $(document).ready(function() {
 		autoOpen : false,
 		modal : false,
 		width : 600,
-		height : 600,
+		height : 550,
         zIndex : 20000 // added because of qtip2
    	});
 
@@ -722,6 +722,8 @@ $(document).ready(function() {
                 $("#simple_title").html(calEvent.title);
                 $("#simple_content").html(calEvent.description);
                 $("#simple_comment").html(calEvent.comment);
+                $("#simple_attachment").html(calEvent.attachment);
+
                 $("#simple-dialog-form").dialog("open");
                 $("#simple-dialog-form").dialog({
 					buttons: {
@@ -818,6 +820,15 @@ $(document).ready(function() {
                     <div id="simple_comment"></div>
                 </div>
             </div>
+
+            <div class="form-group">
+                <label class="col-sm-3 control-label">
+                    <b>{{ "Attachment" |get_lang}}</b>
+                </label>
+                <div class="col-sm-9">
+                    <div id="simple_attachment"></div>
+                </div>
+            </div>
         </form>
     </div>
 </div>