mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
terminadas respuesta. falta repasar todo y cabecera datatable y permisos menus y botones
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
<div class="mb-3 col-9">
|
||||
<label class="form-label"><?= lang("Tickets.asunto") ?></label>
|
||||
<input type="text" name="titulo" class="form-control"
|
||||
<?= ($formAction !== route_to('NewTicket', $ticket->id))?"readonly":"" ?>
|
||||
<?= ($formAction !== route_to('NewTicket', $ticket->id)) ? "readonly" : "" ?>
|
||||
value="<?= old('titulo', $ticket->titulo) ?>">
|
||||
</div>
|
||||
</div>
|
||||
@ -43,7 +43,7 @@
|
||||
<div class="col-3 mb-3">
|
||||
<label class="form-label"><?= lang("Tickets.tipo") ?></label>
|
||||
<select id="categoria" name="categoria_id" class="form-control select2"
|
||||
<?= ($formAction !== route_to('NewTicket', $ticket->id) && !auth()->user()->can('tickets.edit'))?"disabled":"" ?>>
|
||||
<?= ($formAction !== route_to('NewTicket', $ticket->id) && !auth()->user()->can('tickets.edit')) ? "disabled" : "" ?>>
|
||||
<?php foreach ($categorias as $categoria): ?>
|
||||
<option value="<?= $categoria['id']; ?>" <?= $categoria['id'] == $ticket->categoria_id ? ' selected' : '' ?>> <?= $categoria['text']; ?>
|
||||
</option>
|
||||
@ -55,7 +55,7 @@
|
||||
<div class="col-3 mb-3">
|
||||
<label class="form-label"><?= lang("Tickets.seccion") ?></label>
|
||||
<select id="seccion" name="seccion_id" class="form-control select2"
|
||||
<?= ($formAction !== route_to('NewTicket', $ticket->id) && !auth()->user()->can('tickets.edit'))?"disabled":"" ?>>
|
||||
<?= ($formAction !== route_to('NewTicket', $ticket->id) && !auth()->user()->can('tickets.edit')) ? "disabled" : "" ?>>
|
||||
<?php foreach ($secciones as $seccion): ?>
|
||||
<option value="<?= $seccion['id']; ?>" <?= $seccion['id'] == $ticket->seccion_id ? ' selected' : '' ?>><?= $seccion['text']; ?>
|
||||
</option>
|
||||
@ -67,14 +67,14 @@
|
||||
<label class="form-label"><?= lang("Tickets.estado") ?></label>
|
||||
<?php if ($formAction !== route_to('NewTicket') && auth()->user()->can('tickets.edit')): ?>
|
||||
<select id="estado" name="estado_id" class="form-control select2">
|
||||
<?php else: ?>
|
||||
<select id="estado" name="estado_id" class="form-control select2" disabled>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($estados as $estado): ?>
|
||||
<option value="<?= $estado['id']; ?>" <?= $estado['id'] == $ticket->estado_id ? ' selected' : '' ?>><?= $estado['text']; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php else: ?>
|
||||
<select id="estado" name="estado_id" class="form-control select2" disabled>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($estados as $estado): ?>
|
||||
<option value="<?= $estado['id']; ?>" <?= $estado['id'] == $ticket->estado_id ? ' selected' : '' ?>><?= $estado['text']; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -114,11 +114,24 @@
|
||||
<div class="mb-3">
|
||||
<label class="form-label"><?= lang("Tickets.descripcion") ?></label>
|
||||
<textarea id="descripcion" name="descripcion" class="form-control"
|
||||
<?= ($formAction !== route_to('NewTicket', $ticket->id))?"readonly":"" ?>
|
||||
<?= ($formAction !== route_to('NewTicket', $ticket->id)) ? "readonly" : "" ?>
|
||||
rows="4"><?= old('descripcion', $ticket->descripcion) ?></textarea>
|
||||
</div>
|
||||
|
||||
<?php if ($formAction === route_to('NewTicket')): ?>
|
||||
<?php if (isset($respuesta) || ($formAction !== route_to('NewTicket') && auth()->user()->can('tickets.edit'))) : ?>
|
||||
|
||||
<h4><?= lang("Tickets.respuesta") ?></h4>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label"><?= lang("Tickets.respuesta") ?></label>
|
||||
<textarea id="respuestaMensaje" name="respuesta_mensaje" class="form-control"
|
||||
<?= !auth()->user()->can('tickets.edit') ? "readonly" : "" ?>
|
||||
rows="4"><?= isset($respuesta) ? old('respuestaMensaje', $respuesta->mensaje) : "" ?></textarea>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($formAction === route_to('NewTicket') || ($formAction !== route_to('NewTicket') && auth()->user()->can('tickets.edit'))): ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="mb-3">
|
||||
@ -127,8 +140,9 @@
|
||||
accept="image/*">
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php if ($formAction !== route_to('NewTicket')): ?>
|
||||
<h4><?= lang("Tickets.adjuntos_ticket") ?></h4>
|
||||
<div class="container">
|
||||
<?php foreach ($imagesTicket as $image): ?>
|
||||
@ -145,14 +159,15 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="pt-4">
|
||||
<?php if ($formAction === route_to('NewTicket') ||
|
||||
($formAction !== route_to('NewTicket') && auth()->user()->can('tickets.edit'))): ?>
|
||||
<?php if (
|
||||
$formAction === route_to('NewTicket') ||
|
||||
($formAction !== route_to('NewTicket') && auth()->user()->can('tickets.edit'))
|
||||
): ?>
|
||||
<input
|
||||
type="submit"
|
||||
class="btn btn-primary float-start me-sm-3 me-1"
|
||||
name="save"
|
||||
value="<?= lang("Basic.global.Save") ?>"
|
||||
/>
|
||||
type="submit"
|
||||
class="btn btn-primary float-start me-sm-3 me-1"
|
||||
name="save"
|
||||
value="<?= lang("Basic.global.Save") ?>" />
|
||||
<?php endif; ?>
|
||||
<?= anchor(route_to("TicketIndex"), lang("Basic.global.back"), ["class" => "btn btn-secondary"]) ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user