update
This commit is contained in:
@@ -265,6 +265,18 @@
|
||||
<? endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="current_parent" style="margin-top: 10px;">
|
||||
<select name="task_parent" class="form-control task_parent_select" task_id="<?= (int)$this -> task['id'];?>">
|
||||
<option value="0">-- bez zadania nadrzednego --</option>
|
||||
<? if ( is_array( $this -> parent_tasks ) ): foreach ( $this -> parent_tasks as $parent_task ):?>
|
||||
<? $parent_task_id = isset( $parent_task['id'] ) ? (int)$parent_task['id'] : 0;?>
|
||||
<? if ( !$parent_task_id or $parent_task_id === (int)$this -> task['id'] ) continue;?>
|
||||
<option value="<?= $parent_task_id;?>" <? if ( (int)$this -> task['parent_id'] === $parent_task_id ):?>selected="selected"<? endif;?>>
|
||||
<?= htmlspecialchars( (string)$parent_task['name'] );?><? if ( !empty( $parent_task['client'] ) ):?> - <?= htmlspecialchars( (string)$parent_task['client'] );?><? endif;?>
|
||||
</option>
|
||||
<? endforeach; endif;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="task-subtask-action">
|
||||
<a href="/tasks/task_edit/project_id=<?= (int)$this -> task['project_id'];?>&client_id=<?= (int)$this -> task['client_id'];?>&parent_id=<?= (int)$this -> task['id'];?>" class="btn btn-success btn-sm task-popup-compact-btn">Dodaj podzadanie</a>
|
||||
</div>
|
||||
@@ -327,7 +339,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.task_popup .task_details .content .right .client .select2-container {
|
||||
.task_popup .task_details .content .right .client .select2-container,
|
||||
.task_popup .task_details .content .right .project .select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
@@ -819,12 +832,20 @@
|
||||
if ( $.fn.select2 )
|
||||
{
|
||||
var client_select = popup.find( '.task_client_select' );
|
||||
var parent_select = popup.find( '.task_parent_select' );
|
||||
|
||||
client_select.select2({
|
||||
theme: 'bootstrap-5',
|
||||
width: '100%',
|
||||
placeholder: 'Wybierz klienta',
|
||||
dropdownParent: popup
|
||||
});
|
||||
parent_select.select2({
|
||||
theme: 'bootstrap-5',
|
||||
width: '100%',
|
||||
placeholder: 'Wybierz zadanie nadrzedne',
|
||||
dropdownParent: popup
|
||||
});
|
||||
|
||||
client_select.on( 'select2:open', function() {
|
||||
setTimeout( function() {
|
||||
|
||||
Reference in New Issue
Block a user