forked from mahdahar/crm-summit
90 lines
3.2 KiB
PHP
90 lines
3.2 KiB
PHP
<?= $this->extend('layouts/form.php') ?>
|
|
<?= $this->section('content') ?>
|
|
<?php
|
|
$bugtitle = '';
|
|
$bugstatus = '';
|
|
$bugdetail = '';
|
|
$userid_creator = '';
|
|
|
|
?>
|
|
<div class="form-body">
|
|
<h3 class="card-title">Bugs Editor</h3>
|
|
<hr>
|
|
<?php
|
|
if(isset($validation)) {
|
|
?>
|
|
<div class='alert alert-danger alert-dismissible'>
|
|
<?= $validation->listErrors(); ?>
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"> <span aria-hidden="true"></span> </button>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
<form method='POST'>
|
|
<div class="form-group row">
|
|
<label class="col-2 col-form-label">Bug Priority</label>
|
|
<div class="col-10">
|
|
<select class="form-control form-select" name='bugpriority'>
|
|
<?php
|
|
foreach ($bugpriorities as $qbugpriority => $qtext) {
|
|
echo "<option value='$qbugpriority'>$qtext</option>";
|
|
}
|
|
?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-2 col-form-label">Bug Name</label>
|
|
<div class="col-10"><input class="form-control" type="text" name='bugtitle'></div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-2 col-form-label">Bug Detail</label>
|
|
|
|
<div class="col-10">
|
|
<textarea class="form-control mb-1 editor" id="bugdetail_textarea" name="bugdetail"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="hidden" name='bugstatus' value='O'>
|
|
<input type="hidden" name='userid_creator' value='<?= $_SESSION['userid']; ?>'>
|
|
|
|
<button type="button" class="btn btn-dark float-start" onclick="window.close()">Cancel</button>
|
|
<button type="submit" class="btn btn-success text-white float-end"> <i class="fa fa-check"></i> Submit</button>
|
|
</form>
|
|
</div>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
<?= $this->section('script') ?>
|
|
<script src="<?=base_url();?>/assets/tinymce/tinymce.min.js"></script>
|
|
<script>
|
|
// config = {
|
|
// selector:'#bugdetail_textarea',
|
|
// promotion:false,
|
|
// menubar:false,
|
|
// forced_root_block : 'pre',
|
|
// plugins: 'lists',
|
|
// // plugins: 'emoticons',
|
|
// // relative_urls: true,
|
|
// toolbar: 'insertfile undo redo styles styleselect | bold italic | forecolor backcolor emoticons | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
|
|
// };
|
|
// tinymce.init(config);
|
|
|
|
// config
|
|
config = {
|
|
selector:'textarea',
|
|
height:'350',
|
|
promotion:false,
|
|
// forced_root_block : 'pre',
|
|
paste_data_images:false,
|
|
content_style: "p { margin: 0; }",
|
|
plugins: 'preview importcss searchreplace autolink autosave save code visualblocks visualchars fullscreen link template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap emoticons',
|
|
menubar: 'file edit view insert format tools table',
|
|
toolbar: 'undo redo | bold italic underline strikethrough | fontfamily fontsize blocks | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | template link anchor codesample',
|
|
autosave_ask_before_unload: true,
|
|
autosave_interval: '30s',
|
|
automatic_uploads: false,
|
|
};
|
|
tinymce.init(config);
|
|
</script>
|
|
<?= $this->endSection() ?>
|