Use the new button layout on all dropzones
This commit is contained in:
parent
be6659b183
commit
41bbeaf97f
@ -1298,18 +1298,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="dropzone" id="notesFiledrop">
|
<?php build_dropzone_markup('notesFiledrop'); ?>
|
||||||
<div class="fallback">
|
|
||||||
<input type="hidden" name="use-legacy-attachments" value="1">
|
|
||||||
<?php
|
|
||||||
for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) {
|
|
||||||
echo '<input type="file" name="attachment[' . $i . ']" size="50" /><br />';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a href="file_limits.php" target="_blank"
|
|
||||||
onclick="Javascript:hesk_window('file_limits.php',250,500);return false;"><?php echo $hesklang['ful']; ?></a>
|
|
||||||
</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'); ?>
|
||||||
@ -1869,19 +1858,7 @@ function hesk_printReplyForm()
|
|||||||
<label for="attachments" class="col-sm-3 control-label"><?php echo $hesklang['attachments']; ?>:</label>
|
<label for="attachments" class="col-sm-3 control-label"><?php echo $hesklang['attachments']; ?>:</label>
|
||||||
|
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<div class="dropzone" id="filedrop">
|
<?php build_dropzone_markup(); ?>
|
||||||
<div class="fallback">
|
|
||||||
<input type="hidden" name="use-legacy-attachments" value="1">
|
|
||||||
<?php
|
|
||||||
for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) {
|
|
||||||
$cls = ($i == 1 && in_array('attachments', $_SESSION['iserror'])) ? ' class="isError" ' : '';
|
|
||||||
echo '<input type="file" name="attachment[' . $i . ']" size="50" ' . $cls . ' /><br />';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a href="file_limits.php" target="_blank"
|
|
||||||
onclick="Javascript:hesk_window('file_limits.php',250,500);return false;"><?php echo $hesklang['ful']; ?></a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
@ -442,17 +442,7 @@ if (!isset($_SESSION['hide']['new_article']))
|
|||||||
<?php if ($hesk_settings['attachments']['use']): ?>
|
<?php if ($hesk_settings['attachments']['use']): ?>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="attachments" class="control-label"><?php echo $hesklang['attachments']; ?> (<a href="Javascript:void(0)" onclick="Javascript:hesk_window('../file_limits.php',250,500);return false;"><?php echo $hesklang['ful']; ?></a>)</label>
|
<label for="attachments" class="control-label"><?php echo $hesklang['attachments']; ?> (<a href="Javascript:void(0)" onclick="Javascript:hesk_window('../file_limits.php',250,500);return false;"><?php echo $hesklang['ful']; ?></a>)</label>
|
||||||
<div class="dropzone" id="filedrop">
|
<?php build_dropzone_markup(); ?>
|
||||||
<div class="fallback">
|
|
||||||
<input type="hidden" name="use-legacy-attachments" value="1">
|
|
||||||
<?php
|
|
||||||
for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++)
|
|
||||||
{
|
|
||||||
echo '<input type="file" name="attachment['.$i.']" size="50" /><br />';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/admin/knowledgebase/upload-attachment.php');
|
display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/admin/knowledgebase/upload-attachment.php');
|
||||||
@ -1505,24 +1495,9 @@ function edit_article()
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="dropzone" id="filedrop">
|
|
||||||
<div class="fallback">
|
|
||||||
<input type="hidden" name="use-legacy-attachments" value="1">
|
|
||||||
<?php
|
<?php
|
||||||
// New attachments
|
build_dropzone_markup();
|
||||||
if ($hesk_settings['attachments']['use'])
|
display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/admin/knowledgebase/upload-attachment.php');
|
||||||
{
|
|
||||||
for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++)
|
|
||||||
{
|
|
||||||
echo '<input type="file" name="attachment['.$i.']" size="50" /><br />';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/admin/knowledgebase/upload-attachment.php'); ?>
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; //End attachments ?>
|
<?php endif; //End attachments ?>
|
||||||
|
@ -208,6 +208,23 @@ function output_attachment_id_holder_container($id) {
|
|||||||
echo '<div id="attachment-holder-' . $id . '" class="hide"></div>';
|
echo '<div id="attachment-holder-' . $id . '" class="hide"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function build_dropzone_markup($id = 'filedrop') {
|
||||||
|
global $hesklang, $hesk_settings;
|
||||||
|
|
||||||
|
echo '<div class="dropzone" id="' . $id . '">
|
||||||
|
<div class="fallback">
|
||||||
|
<input type="hidden" name="use-legacy-attachments" value="1">';
|
||||||
|
for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) {
|
||||||
|
$cls = ($i == 1 && in_array('attachments', $_SESSION['iserror'])) ? ' class="isError" ' : '';
|
||||||
|
echo '<input type="file" name="attachment[' . $i . ']" size="50" ' . $cls . ' /><br />';
|
||||||
|
}
|
||||||
|
echo '</div>
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-default btn-xs fileinput-button filedrop-button">' . $hesklang['add_files'] . '</button><br>
|
||||||
|
<a href="file_limits.php" target="_blank"
|
||||||
|
onclick="Javascript:hesk_window(\'file_limits.php\',250,500);return false;">'. $hesklang['ful'] . '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
function display_dropzone_field($url, $id = 'filedrop') {
|
function display_dropzone_field($url, $id = 'filedrop') {
|
||||||
global $hesk_settings, $hesklang;
|
global $hesk_settings, $hesklang;
|
||||||
|
|
||||||
|
15
index.php
15
index.php
@ -979,20 +979,7 @@ function print_add_ticket()
|
|||||||
:</label>
|
:</label>
|
||||||
|
|
||||||
<div align="left" class="col-sm-9">
|
<div align="left" class="col-sm-9">
|
||||||
<div class="dropzone" id="filedrop">
|
<?php build_dropzone_markup(); ?>
|
||||||
<div class="fallback">
|
|
||||||
<input type="hidden" name="use-legacy-attachments" value="1">
|
|
||||||
<?php
|
|
||||||
for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) {
|
|
||||||
$cls = ($i == 1 && in_array('attachments', $_SESSION['iserror'])) ? ' class="isError" ' : '';
|
|
||||||
echo '<input type="file" name="attachment[' . $i . ']" size="50" ' . $cls . ' /><br />';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button class="btn btn-default btn-xs fileinput-button filedrop-button"><?php echo $hesklang['add_files']; ?></button><br>
|
|
||||||
<a href="file_limits.php" target="_blank"
|
|
||||||
onclick="Javascript:hesk_window('file_limits.php',250,500);return false;"><?php echo $hesklang['ful']; ?></a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
15
ticket.php
15
ticket.php
@ -654,20 +654,7 @@ function hesk_printCustomerReplyForm($reopen = 0)
|
|||||||
:</label>
|
:</label>
|
||||||
|
|
||||||
<div align="left" class="col-sm-9">
|
<div align="left" class="col-sm-9">
|
||||||
<div class="dropzone" id="filedrop">
|
<?php build_dropzone_markup(); ?>
|
||||||
<div class="fallback">
|
|
||||||
<input type="hidden" name="use-legacy-attachments" value="1">
|
|
||||||
<?php
|
|
||||||
for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) {
|
|
||||||
$cls = ($i == 1 && in_array('attachments', $_SESSION['iserror'])) ? ' class="isError" ' : '';
|
|
||||||
echo '<input type="file" name="attachment[' . $i . ']" size="50" ' . $cls . ' /><br />';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a href="file_limits.php" target="_blank"
|
|
||||||
onclick="Javascript:hesk_window('file_limits.php',250,500);return false;"><?php echo $hesklang['ful']; ?></a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
Loading…
x
Reference in New Issue
Block a user