Move add note to inline section instead of modal

This commit is contained in:
Mike Koch 2016-11-30 21:25:10 -05:00
parent c6a2f7fcff
commit ba8d35d762
2 changed files with 37 additions and 35 deletions

View File

@ -1129,25 +1129,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?> ?>
<?php echo $hesklang['no_notes_for_this_ticket']; ?> <?php echo $hesklang['no_notes_for_this_ticket']; ?>
<?php endif; ?> <?php endif; ?>
</div> <div id="noteform" style="display: none">
<?php if ($can_reply): ?> <h3><?php echo $hesklang['addnote']; ?></h3>
<div class="box-footer">
<button class="btn btn-default pull-right" data-toggle="modal" data-target="#noteform">
<i class="fa fa-plus-circle"></i> <?php echo $hesklang['addnote']; ?>
</button>
</div>
<?php endif; ?>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="noteform">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"><?php echo $hesklang['addnote']; ?></h4>
</div>
<form class="form-horizontal" data-toggle="validator" method="post" action="admin_ticket.php" style="margin:0px; padding:0px;" <form class="form-horizontal" data-toggle="validator" method="post" action="admin_ticket.php" style="margin:0px; padding:0px;"
enctype="multipart/form-data"> enctype="multipart/form-data">
<div class="modal-body">
<div class="form-group"> <div class="form-group">
<label for="note-message" class="control-label col-sm-2"><?php echo $hesklang['message']; ?></label> <label for="note-message" class="control-label col-sm-2"><?php echo $hesklang['message']; ?></label>
<div class="col-sm-10"> <div class="col-sm-10">
@ -1165,11 +1150,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div> </div>
</div> </div>
<?php display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/ticket/upload-attachment.php', 'notesFiledrop'); ?> <?php display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/ticket/upload-attachment.php', 'notesFiledrop'); ?>
</div> <div class="text-right">
<div class="modal-footer">
<i><?php echo $hesklang['nhid']; ?></i>&nbsp; <i><?php echo $hesklang['nhid']; ?></i>&nbsp;
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-danger" onclick="hesk_toggleLayerDisplay('noteform')"><?php echo $hesklang['cancel']; ?></button>
<input type="submit" class="btn btn-success" value="<?php echo $hesklang['s']; ?>"> <input type="submit" class="btn btn-success" value="<?php echo $hesklang['s']; ?>">
</div> </div>
<input type="hidden" name="track" value="<?php echo $trackingID; ?>"> <input type="hidden" name="track" value="<?php echo $trackingID; ?>">
@ -1178,6 +1162,13 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</form> </form>
</div> </div>
</div> </div>
<?php if ($can_reply): ?>
<div class="box-footer">
<button class="btn btn-default pull-right" onclick="hesk_toggleLayerDisplay('noteform')">
<i class="fa fa-plus-circle"></i> <?php echo $hesklang['addnote']; ?>
</button>
</div>
<?php endif; ?>
</div> </div>
<?php <?php
/* Reply form on top? */ /* Reply form on top? */

View File

@ -223,6 +223,17 @@ button.dropdown-submit {
background: #f39c12; background: #f39c12;
} }
#noteform {
background: white;
margin: 10px -10px -10px;
padding: 10px;
}
#noteform > h3 {
padding-bottom: 10px;
border-bottom: solid 1px #000;
}
.full-width { .full-width {
width: 100%; width: 100%;
} }