chg: [bootstrap] Migrated APP to use bootstrap v5.x
parent
ea469e0fc5
commit
67b43635d0
|
@ -18,18 +18,18 @@ $footerButtons = [
|
||||||
|
|
||||||
$tools = sprintf(
|
$tools = sprintf(
|
||||||
'<div class="mx-auto mb-3 mw-75 d-flex align-items-center">
|
'<div class="mx-auto mb-3 mw-75 d-flex align-items-center">
|
||||||
<span class="flex-grow-1 text-right" style="font-size: large;">%s</span>
|
<span class="flex-grow-1 text-end" style="font-size: large;">%s</span>
|
||||||
<span class="mx-3">%s</span>
|
<span class="mx-3">%s</span>
|
||||||
<span class="flex-grow-1 text-left" style="font-size: large;">%s</span>
|
<span class="flex-grow-1 text-start" style="font-size: large;">%s</span>
|
||||||
</div>',
|
</div>',
|
||||||
sprintf('<span class="mr-2 d-inline-flex flex-column"><a href="%s" target="_blank" title="%s">%s</a><i style="font-size: medium;" class="text-center">%s</i></span>',
|
sprintf('<span class="me-2 d-inline-flex flex-column"><a href="%s" target="_blank" title="%s">%s</a><i style="font-size: medium;" class="text-center">%s</i></span>',
|
||||||
sprintf('/localTools/view/%s', h($request['localTool']->id)),
|
sprintf('/localTools/view/%s', h($request['localTool']->id)),
|
||||||
h($request['localTool']->description),
|
h($request['localTool']->description),
|
||||||
h($request['localTool']->name),
|
h($request['localTool']->name),
|
||||||
__('(local tool)')
|
__('(local tool)')
|
||||||
),
|
),
|
||||||
sprintf('<i class="%s fa-lg"></i>', $this->FontAwesome->getClass('long-arrow-alt-right')),
|
sprintf('<i class="%s fa-lg"></i>', $this->FontAwesome->getClass('long-arrow-alt-right')),
|
||||||
sprintf('<span class="ml-2 d-inline-flex flex-column"><a href="%s" target="_blank" title="%s">%s</a><i style="font-size: medium;" class="text-center">%s</i></span>',
|
sprintf('<span class="ms-2 d-inline-flex flex-column"><a href="%s" target="_blank" title="%s">%s</a><i style="font-size: medium;" class="text-center">%s</i></span>',
|
||||||
sprintf('/localTools/broodTools/%s', h($request['data']['remote_tool']['id'])),
|
sprintf('/localTools/broodTools/%s', h($request['data']['remote_tool']['id'])),
|
||||||
h($request['data']['remote_tool']['description'] ?? ''),
|
h($request['data']['remote_tool']['description'] ?? ''),
|
||||||
h($request['data']['remote_tool']['name']),
|
h($request['data']['remote_tool']['name']),
|
||||||
|
@ -77,9 +77,9 @@ $requestData = $this->Bootstrap->collapse([
|
||||||
sprintf('<pre class="p-2 rounded mb-0" style="background: #eeeeee55;"><code>%s</code></pre>', json_encode($request['data']['sent'], JSON_PRETTY_PRINT))
|
sprintf('<pre class="p-2 rounded mb-0" style="background: #eeeeee55;"><code>%s</code></pre>', json_encode($request['data']['sent'], JSON_PRETTY_PRINT))
|
||||||
);
|
);
|
||||||
|
|
||||||
$rows = sprintf('<tr><td class="font-weight-bold">%s</td><td>%s</td></tr>', __('URL'), h($request['data']['url']));
|
$rows = sprintf('<tr><td class="fw-bold">%s</td><td>%s</td></tr>', __('URL'), h($request['data']['url']));
|
||||||
$rows .= sprintf('<tr><td class="font-weight-bold">%s</td><td>%s</td></tr>', __('Reason'), h($request['data']['reason']['message']) ?? '');
|
$rows .= sprintf('<tr><td class="fw-bold">%s</td><td>%s</td></tr>', __('Reason'), h($request['data']['reason']['message']) ?? '');
|
||||||
$rows .= sprintf('<tr><td class="font-weight-bold">%s</td><td>%s</td></tr>', __('Errors'), h(json_encode($request['data']['reason']['errors'])) ?? '');
|
$rows .= sprintf('<tr><td class="fw-bold">%s</td><td>%s</td></tr>', __('Errors'), h(json_encode($request['data']['reason']['errors'])) ?? '');
|
||||||
$table2 = sprintf('<table class="table table-sm table-borderless"><tbody>%s</tbody></table>', $rows);
|
$table2 = sprintf('<table class="table table-sm table-borderless"><tbody>%s</tbody></table>', $rows);
|
||||||
|
|
||||||
$form = $this->element('genericElements/Form/genericForm', [
|
$form = $this->element('genericElements/Form/genericForm', [
|
||||||
|
|
|
@ -184,12 +184,10 @@ class BootstrapGeneric
|
||||||
{
|
{
|
||||||
return BootstrapGeneric::genNode('button', [
|
return BootstrapGeneric::genNode('button', [
|
||||||
'type' => 'button',
|
'type' => 'button',
|
||||||
'class' => 'close',
|
'class' => 'btn-close',
|
||||||
'data-dismiss' => $dismissTarget,
|
'data-bs-dismiss' => $dismissTarget,
|
||||||
'arial-label' => __('Close')
|
'arial-label' => __('Close')
|
||||||
], BootstrapGeneric::genNode('span', [
|
]);
|
||||||
'arial-hidden' => 'true'
|
|
||||||
], '×'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function getTextClassForVariant($variant)
|
protected static function getTextClassForVariant($variant)
|
||||||
|
@ -340,7 +338,7 @@ class BootstrapTabs extends BootstrapGeneric
|
||||||
private function genVerticalTabs()
|
private function genVerticalTabs()
|
||||||
{
|
{
|
||||||
$html = $this->openNode('div', ['class' => array_merge(['row', ($this->options['card'] ? 'card flex-row' : '')], ["border-{$this->options['header-border-variant']}"])]);
|
$html = $this->openNode('div', ['class' => array_merge(['row', ($this->options['card'] ? 'card flex-row' : '')], ["border-{$this->options['header-border-variant']}"])]);
|
||||||
$html .= $this->openNode('div', ['class' => array_merge(['col-' . $this->options['vertical-size'], ($this->options['card'] ? 'card-header border-right' : '')], ["bg-{$this->options['header-variant']}", "text-{$this->options['header-text-variant']}", "border-{$this->options['header-border-variant']}"])]);
|
$html .= $this->openNode('div', ['class' => array_merge(['col-' . $this->options['vertical-size'], ($this->options['card'] ? 'card-header border-end' : '')], ["bg-{$this->options['header-variant']}", "text-{$this->options['header-text-variant']}", "border-{$this->options['header-border-variant']}"])]);
|
||||||
$html .= $this->genNav();
|
$html .= $this->genNav();
|
||||||
$html .= $this->closeNode('div');
|
$html .= $this->closeNode('div');
|
||||||
$html .= $this->openNode('div', ['class' => array_merge(['col-' . (12 - $this->options['vertical-size']), ($this->options['card'] ? 'card-body2' : '')], ["bg-{$this->options['body-variant']}", "text-{$this->options['body-text-variant']}"])]);
|
$html .= $this->openNode('div', ['class' => array_merge(['col-' . (12 - $this->options['vertical-size']), ($this->options['card'] ? 'card-body2' : '')], ["bg-{$this->options['body-variant']}", "text-{$this->options['body-text-variant']}"])]);
|
||||||
|
@ -375,7 +373,7 @@ class BootstrapTabs extends BootstrapGeneric
|
||||||
[!empty($navItem['active']) ? 'active' : ''],
|
[!empty($navItem['active']) ? 'active' : ''],
|
||||||
[!empty($navItem['disabled']) ? 'disabled' : '']
|
[!empty($navItem['disabled']) ? 'disabled' : '']
|
||||||
),
|
),
|
||||||
'data-toggle' => $this->options['pills'] ? 'pill' : 'tab',
|
'data-bs-toggle' => $this->options['pills'] ? 'pill' : 'tab',
|
||||||
'id' => $navItem['id'] . '-tab',
|
'id' => $navItem['id'] . '-tab',
|
||||||
'href' => '#' . $navItem['id'],
|
'href' => '#' . $navItem['id'],
|
||||||
'aria-controls' => $navItem['id'],
|
'aria-controls' => $navItem['id'],
|
||||||
|
@ -633,7 +631,6 @@ class BoostrapButton extends BootstrapGeneric {
|
||||||
'variant' => 'primary',
|
'variant' => 'primary',
|
||||||
'outline' => false,
|
'outline' => false,
|
||||||
'size' => '',
|
'size' => '',
|
||||||
'block' => false,
|
|
||||||
'icon' => null,
|
'icon' => null,
|
||||||
'class' => [],
|
'class' => [],
|
||||||
'type' => 'button',
|
'type' => 'button',
|
||||||
|
@ -671,9 +668,6 @@ class BoostrapButton extends BootstrapGeneric {
|
||||||
if (!empty($this->options['size'])) {
|
if (!empty($this->options['size'])) {
|
||||||
$this->bsClasses[] = "btn-$this->options['size']";
|
$this->bsClasses[] = "btn-$this->options['size']";
|
||||||
}
|
}
|
||||||
if ($this->options['block']) {
|
|
||||||
$this->bsClasses[] = 'btn-block';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function button()
|
public function button()
|
||||||
|
@ -702,7 +696,7 @@ class BoostrapButton extends BootstrapGeneric {
|
||||||
private function genIcon()
|
private function genIcon()
|
||||||
{
|
{
|
||||||
return $this->genNode('span', [
|
return $this->genNode('span', [
|
||||||
'class' => ['mr-1', "fa fa-{$this->options['icon']}"],
|
'class' => ['me-1', "fa fa-{$this->options['icon']}"],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,8 +737,8 @@ class BoostrapBadge extends BootstrapGeneric {
|
||||||
$html = $this->genNode('span', [
|
$html = $this->genNode('span', [
|
||||||
'class' => [
|
'class' => [
|
||||||
'badge',
|
'badge',
|
||||||
"badge-{$this->options['variant']}",
|
"bg-{$this->options['variant']}",
|
||||||
$this->options['pill'] ? 'badge-pill' : '',
|
$this->options['pill'] ? 'rounded-pill' : '',
|
||||||
],
|
],
|
||||||
'title' => $this->options['title']
|
'title' => $this->options['title']
|
||||||
], h($this->options['text']));
|
], h($this->options['text']));
|
||||||
|
@ -877,7 +871,7 @@ class BoostrapModal extends BootstrapGeneric {
|
||||||
'variant' => 'primary',
|
'variant' => 'primary',
|
||||||
'text' => __('Ok'),
|
'text' => __('Ok'),
|
||||||
'params' => [
|
'params' => [
|
||||||
'data-dismiss' => $this->options['confirmFunction'] ? '' : 'modal',
|
'data-bs-dismiss' => $this->options['confirmFunction'] ? '' : 'modal',
|
||||||
'onclick' => $this->options['confirmFunction']
|
'onclick' => $this->options['confirmFunction']
|
||||||
]
|
]
|
||||||
]))->button();
|
]))->button();
|
||||||
|
@ -894,7 +888,7 @@ class BoostrapModal extends BootstrapGeneric {
|
||||||
'variant' => 'secondary',
|
'variant' => 'secondary',
|
||||||
'text' => h($this->options['cancelText']),
|
'text' => h($this->options['cancelText']),
|
||||||
'params' => [
|
'params' => [
|
||||||
'data-dismiss' => 'modal',
|
'data-bs-dismiss' => 'modal',
|
||||||
'onclick' => $this->options['cancelFunction']
|
'onclick' => $this->options['cancelFunction']
|
||||||
]
|
]
|
||||||
]))->button();
|
]))->button();
|
||||||
|
@ -904,7 +898,7 @@ class BoostrapModal extends BootstrapGeneric {
|
||||||
'text' => h($this->options['confirmText']),
|
'text' => h($this->options['confirmText']),
|
||||||
'class' => 'modal-confirm-button',
|
'class' => 'modal-confirm-button',
|
||||||
'params' => [
|
'params' => [
|
||||||
// 'data-dismiss' => $this->options['confirmFunction'] ? '' : 'modal',
|
// 'data-bs-dismiss' => $this->options['confirmFunction'] ? '' : 'modal',
|
||||||
'data-confirmFunction' => sprintf('%s', $this->options['confirmFunction'])
|
'data-confirmFunction' => sprintf('%s', $this->options['confirmFunction'])
|
||||||
]
|
]
|
||||||
]))->button();
|
]))->button();
|
||||||
|
@ -920,7 +914,7 @@ class BoostrapModal extends BootstrapGeneric {
|
||||||
'text' => h($buttonConfig['text']),
|
'text' => h($buttonConfig['text']),
|
||||||
'class' => 'modal-confirm-button',
|
'class' => 'modal-confirm-button',
|
||||||
'params' => [
|
'params' => [
|
||||||
'data-dismiss' => !empty($buttonConfig['clickFunction']) ? '' : 'modal',
|
'data-bs-dismiss' => !empty($buttonConfig['clickFunction']) ? '' : 'modal',
|
||||||
'data-clickFunction' => sprintf('%s', $buttonConfig['clickFunction'])
|
'data-clickFunction' => sprintf('%s', $buttonConfig['clickFunction'])
|
||||||
]
|
]
|
||||||
]))->button();
|
]))->button();
|
||||||
|
@ -1053,19 +1047,19 @@ class BoostrapSwitch extends BootstrapGeneric {
|
||||||
$tmpId = 'tmp-' . mt_rand();
|
$tmpId = 'tmp-' . mt_rand();
|
||||||
$html = $this->genNode('div', [
|
$html = $this->genNode('div', [
|
||||||
'class' => [
|
'class' => [
|
||||||
'custom-control custom-switch',
|
'form-check form-switch',
|
||||||
],
|
],
|
||||||
'title' => $this->options['title']
|
'title' => $this->options['title']
|
||||||
], implode('', [
|
], implode('', [
|
||||||
$this->genNode('input', [
|
$this->genNode('input', [
|
||||||
'type' => "checkbox",
|
'type' => "checkbox",
|
||||||
'class' => 'custom-control-input',
|
'class' => 'orm-check-input',
|
||||||
'id' => $tmpId,
|
'id' => $tmpId,
|
||||||
($this->options['disabled'] ? 'disabled' : '') => '',
|
($this->options['disabled'] ? 'disabled' : '') => '',
|
||||||
($this->options['checked'] ? 'checked' : '') => $this->options['checked'] ? 'checked' : ''
|
($this->options['checked'] ? 'checked' : '') => $this->options['checked'] ? 'checked' : ''
|
||||||
]),
|
]),
|
||||||
$this->genNode('label', [
|
$this->genNode('label', [
|
||||||
'class' => 'custom-control-label',
|
'class' => 'orm-check-label',
|
||||||
'for' => $tmpId,
|
'for' => $tmpId,
|
||||||
], h($this->options['label']))
|
], h($this->options['label']))
|
||||||
]));
|
]));
|
||||||
|
@ -1161,7 +1155,7 @@ class BoostrapCollapse extends BootstrapGeneric {
|
||||||
{
|
{
|
||||||
$html = $this->genNode('a', [
|
$html = $this->genNode('a', [
|
||||||
'class' => ['text-decoration-none'],
|
'class' => ['text-decoration-none'],
|
||||||
'data-toggle' => 'collapse',
|
'data-bs-toggle' => 'collapse',
|
||||||
'href' => '#collapseExample',
|
'href' => '#collapseExample',
|
||||||
'role' => 'button',
|
'role' => 'button',
|
||||||
'aria-expanded' => 'false',
|
'aria-expanded' => 'false',
|
||||||
|
@ -1271,7 +1265,7 @@ class BoostrapProgressTimeline extends BootstrapGeneric {
|
||||||
return $this->genNode('li', [
|
return $this->genNode('li', [
|
||||||
'class' => [
|
'class' => [
|
||||||
'text-center',
|
'text-center',
|
||||||
'font-weight-bold',
|
'fw-bold',
|
||||||
$isActive ? 'progress-active' : 'progress-inactive',
|
$isActive ? 'progress-active' : 'progress-inactive',
|
||||||
],
|
],
|
||||||
], h($step['text'] ?? ''));
|
], h($step['text'] ?? ''));
|
||||||
|
|
|
@ -52,7 +52,7 @@ class DataFromPathHelper extends Helper
|
||||||
$extractedVars[$i] = $varValue;
|
$extractedVars[$i] = $varValue;
|
||||||
}
|
}
|
||||||
foreach ($extractedVars as $i => $value) {
|
foreach ($extractedVars as $i => $value) {
|
||||||
$value = $options['highlight'] ? "<span class=\"font-weight-light\">${value}</span>" : $value;
|
$value = $options['highlight'] ? "<span class=\"fw-light\">${value}</span>" : $value;
|
||||||
$str = str_replace(
|
$str = str_replace(
|
||||||
"{{{$i}}}",
|
"{{{$i}}}",
|
||||||
$value,
|
$value,
|
||||||
|
|
|
@ -5,9 +5,9 @@ echo $this->element('genericElements/genericModal', [
|
||||||
'<p>%s</p><p>%s</p><p>%s</p>',
|
'<p>%s</p><p>%s</p><p>%s</p>',
|
||||||
__('Please make sure that you note down the authkey below, this is the only time the authkey is shown in plain text, so make sure you save it. If you lose the key, simply remove the entry and generate a new one.'),
|
__('Please make sure that you note down the authkey below, this is the only time the authkey is shown in plain text, so make sure you save it. If you lose the key, simply remove the entry and generate a new one.'),
|
||||||
__('Cerebrate will use the first and the last 4 digit for identification purposes.'),
|
__('Cerebrate will use the first and the last 4 digit for identification purposes.'),
|
||||||
sprintf('%s: <span class="font-weight-bold">%s</span>', __('Authkey'), h($entity->authkey_raw))
|
sprintf('%s: <span class="fw-bold">%s</span>', __('Authkey'), h($entity->authkey_raw))
|
||||||
),
|
),
|
||||||
'actionButton' => sprintf('<button" class="btn btn-primary" data-dismiss="modal">%s</button>', __('I have noted down my key, take me back now')),
|
'actionButton' => sprintf('<button" class="btn btn-primary" data-bs-dismiss="modal">%s</button>', __('I have noted down my key, take me back now')),
|
||||||
'noCancel' => true,
|
'noCancel' => true,
|
||||||
'staticBackdrop' => true,
|
'staticBackdrop' => true,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -130,7 +130,7 @@ echo $this->element('genericElements/IndexTable/index_table', [
|
||||||
)
|
)
|
||||||
const $footer = $(modalObject.ajaxApi.statusNode).parent()
|
const $footer = $(modalObject.ajaxApi.statusNode).parent()
|
||||||
modalObject.ajaxApi.statusNode.remove()
|
modalObject.ajaxApi.statusNode.remove()
|
||||||
const $cancelButton = $footer.find('button[data-dismiss="modal"]')
|
const $cancelButton = $footer.find('button[data-bs-dismiss="modal"]')
|
||||||
$cancelButton.text('<?= __('OK') ?>').removeClass('btn-secondary').addClass('btn-primary')
|
$cancelButton.text('<?= __('OK') ?>').removeClass('btn-secondary').addClass('btn-primary')
|
||||||
}
|
}
|
||||||
UI.submissionModal('/inbox/delete', successCallback, failCallback).then(([modalObject, ajaxApi]) => {
|
UI.submissionModal('/inbox/delete', successCallback, failCallback).then(([modalObject, ajaxApi]) => {
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
<?php
|
<h1><?= __('Welcome!') ?></h1>
|
||||||
$Parsedown = new Parsedown();
|
|
||||||
echo $Parsedown->text($md);
|
|
|
@ -8,11 +8,11 @@
|
||||||
$table = Cake\ORM\TableRegistry::get($tableName);
|
$table = Cake\ORM\TableRegistry::get($tableName);
|
||||||
$fieldPath = !empty($table->getDisplayField()) ? $table->getDisplayField() : 'id';
|
$fieldPath = !empty($table->getDisplayField()) ? $table->getDisplayField() : 'id';
|
||||||
$section .= sprintf('<span class="d-flex text-nowrap px-2 search-container-model">
|
$section .= sprintf('<span class="d-flex text-nowrap px-2 search-container-model">
|
||||||
<span class="text-uppercase text-muted mr-3 model-text">%s</span>
|
<span class="text-uppercase text-muted me-3 model-text">%s</span>
|
||||||
<span class="d-flex align-items-center search-container-divider">
|
<span class="d-flex align-items-center search-container-divider">
|
||||||
<hr class="m-0"/>
|
<hr class="m-0"/>
|
||||||
</span>
|
</span>
|
||||||
<span class="font-weight-light text-muted ml-3 model-text">%s</span>
|
<span class="fw-light text-muted ms-3 model-text">%s</span>
|
||||||
</span>', h($tableName), $tableResult['amount']);
|
</span>', h($tableName), $tableResult['amount']);
|
||||||
|
|
||||||
foreach ($tableResult['entries'] as $entry) {
|
foreach ($tableResult['entries'] as $entry) {
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
}
|
}
|
||||||
$remaining = $tableResult['amount'] - count($tableResult['entries']);
|
$remaining = $tableResult['amount'] - count($tableResult['entries']);
|
||||||
if ($remaining > 0) {
|
if ($remaining > 0) {
|
||||||
$section .= sprintf('<a href="%s" class="dropdown-item total-found d-block pr-2">%s <strong class="total-found-number text-primary">%s</strong><span class="total-found-text d-inline ml-1" href="#">%s</span></a>',
|
$section .= sprintf('<a href="%s" class="dropdown-item total-found d-block pe-2">%s <strong class="total-found-number text-primary">%s</strong><span class="total-found-text d-inline ms-1" href="#">%s</span></a>',
|
||||||
Cake\Routing\Router::URL([
|
Cake\Routing\Router::URL([
|
||||||
'controller' => 'instance',
|
'controller' => 'instance',
|
||||||
'action' => 'search_all',
|
'action' => 'search_all',
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($ajax)) {
|
if (!empty($ajax)) {
|
||||||
$sections[] = sprintf('<a class="dropdown-item border-top text-center text-muted p-2" href="%s"><i class="%s mr-2"></i>%s</a>',
|
$sections[] = sprintf('<a class="dropdown-item border-top text-center text-muted p-2" href="%s"><i class="%s me-2"></i>%s</a>',
|
||||||
Cake\Routing\Router::URL([
|
Cake\Routing\Router::URL([
|
||||||
'controller' => 'instance',
|
'controller' => 'instance',
|
||||||
'action' => 'search_all',
|
'action' => 'search_all',
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
__('View all results')
|
__('View all results')
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
echo sprintf('<h2 class="font-weight-light mb-4">%s <span class="text-monospace">%s</span></h2>', __('Global search results for:'), h($this->request->getParam('?')['search'] ?? ''));
|
echo sprintf('<h2 class="fw-light mb-4">%s <span class="font-monospace">%s</span></h2>', __('Global search results for:'), h($this->request->getParam('?')['search'] ?? ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($sections)) {
|
if (!empty($sections)) {
|
||||||
|
|
|
@ -69,8 +69,8 @@ echo $this->element('genericElements/IndexTable/index_table', [
|
||||||
$conflictingTemplate = getConflictingTemplate($row, $data);
|
$conflictingTemplate = getConflictingTemplate($row, $data);
|
||||||
if (!empty($conflictingTemplate)) {
|
if (!empty($conflictingTemplate)) {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
"<span class=\"text-danger font-weight-bolder\">%s</span> %s.<br />
|
"<span class=\"text-danger fw-bolder\">%s</span> %s.<br />
|
||||||
<ul><li><span class=\"font-weight-bolder\">%s</span> %s <span class=\"font-weight-bolder\">%s</span></li></ul>",
|
<ul><li><span class=\"fw-bolder\">%s</span> %s <span class=\"fw-bolder\">%s</span></li></ul>",
|
||||||
__('Conflict with:'),
|
__('Conflict with:'),
|
||||||
$this->Html->link(
|
$this->Html->link(
|
||||||
h($conflictingTemplate->name),
|
h($conflictingTemplate->name),
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
echo $this->Html->image('logo-purple.png', ['alt' => 'CakePHP', 'class="form-signin"']);
|
echo $this->Html->image('logo-purple.png', ['alt' => 'CakePHP', 'class="form-signin"']);
|
||||||
echo '<div class="form-signin">';
|
echo '<div class="form-signin">';
|
||||||
|
$template = [
|
||||||
|
'inputContainer' => '<div class="form-floating input {{type}}{{required}}">{{content}}</div>',
|
||||||
|
'formGroup' => '{{input}}{{label}}',
|
||||||
|
'submitContainer' => '<div class="submit d-grid">{{content}}</div>',
|
||||||
|
];
|
||||||
|
$this->Form->setTemplates($template);
|
||||||
echo $this->Form->create(null, ['url' => ['controller' => 'users', 'action' => 'login']]);
|
echo $this->Form->create(null, ['url' => ['controller' => 'users', 'action' => 'login']]);
|
||||||
echo $this->Form->control('username', ['label' => false, 'class' => 'form-control', 'placeholder' => __('Username')]);
|
echo $this->Form->control('username', ['label' => 'Username', 'class' => 'form-control mb-2', 'placeholder' => __('Username')]);
|
||||||
echo $this->Form->control('password', ['type' => 'password', 'label' => false, 'class' => 'form-control', 'placeholder' => __('Password')]);
|
echo $this->Form->control('password', ['type' => 'password', 'label' => 'Password', 'class' => 'form-control mb-3', 'placeholder' => __('Password')]);
|
||||||
echo $this->Form->submit(__('Submit'), ['class' => 'btn btn-lg btn-primary btn-block']);
|
echo $this->Form->control(__('Submit'), ['type' => 'submit', 'class' => 'btn btn-primary']);
|
||||||
echo $this->Form->end();
|
echo $this->Form->end();
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -14,7 +14,6 @@ if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||||
?>
|
?>
|
||||||
<div class="alert <?= h($class) ?> alert-dismissible fade show" role="alert">
|
<div class="alert <?= h($class) ?> alert-dismissible fade show" role="alert">
|
||||||
<?= $message ?>
|
<?= $message ?>
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,6 @@ if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||||
<?= $message ?>
|
<?= $message ?>
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,6 @@ if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||||
<?= $message ?>
|
<?= $message ?>
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
$controlParams = [
|
$controlParams = [
|
||||||
'options' => $fieldData['options'],
|
'options' => $fieldData['options'],
|
||||||
'empty' => $fieldData['empty'] ?? false,
|
'empty' => $fieldData['empty'] ?? false,
|
||||||
'class' => ($fieldData['class'] ?? '') . ' formDropdown custom-select'
|
'class' => ($fieldData['class'] ?? '') . ' formDropdown form-select'
|
||||||
];
|
];
|
||||||
echo $this->FormFieldMassage->prepareFormElement($this->Form, $controlParams, $fieldData);
|
echo $this->FormFieldMassage->prepareFormElement($this->Form, $controlParams, $fieldData);
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
$label = $fieldData['label'];
|
$label = $fieldData['label'];
|
||||||
$formElement = $this->FormFieldMassage->prepareFormElement($this->Form, $params, $fieldData);
|
$formElement = $this->FormFieldMassage->prepareFormElement($this->Form, $params, $fieldData);
|
||||||
$temp = sprintf(
|
$temp = sprintf(
|
||||||
'<div class="form-group row ">
|
'<div class="row mb-3">
|
||||||
<div class="col-sm-2 col-form-label">%s</div>
|
<div class="col-sm-2 form-label">%s</div>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
%s<span class="input-group-append">%s</span>
|
%s<span>%s</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>',
|
</div>',
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'<span id = "%sInfoPopover" class="icon-info-sign" data-toggle="popover" data-trigger="hover"></span>',
|
'<span id = "%sInfoPopover" class="icon-info-sign" data-bs-toggle="popover" data-bs-trigger="hover"></span>',
|
||||||
h($field['field'])
|
h($field['field'])
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -28,16 +28,16 @@
|
||||||
$formRandomValue = Cake\Utility\Security::randomString(8);
|
$formRandomValue = Cake\Utility\Security::randomString(8);
|
||||||
$formCreate = $this->Form->create($entity, ['id' => 'form-' . $formRandomValue]);
|
$formCreate = $this->Form->create($entity, ['id' => 'form-' . $formRandomValue]);
|
||||||
$default_template = [
|
$default_template = [
|
||||||
'inputContainer' => '<div class="form-group row">{{content}}</div>',
|
'inputContainer' => '<div class="row mb-3">{{content}}</div>',
|
||||||
'inputContainerError' => '<div class="form-group row has-error">{{content}}</div>',
|
'inputContainerError' => '<div class="row mb-3 has-error">{{content}}</div>',
|
||||||
'label' => '{{text}}',
|
'label' => '{{text}}',
|
||||||
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}} />',
|
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}} />',
|
||||||
'textarea' => '<textarea name="{{name}}" {{attrs}}>{{value}}</textarea>',
|
'textarea' => '<textarea name="{{name}}" {{attrs}}>{{value}}</textarea>',
|
||||||
'select' => '<select name="{{name}}" {{attrs}}>{{content}}</select>',
|
'select' => '<select name="{{name}}" {{attrs}}>{{content}}</select>',
|
||||||
'checkbox' => '<input type="checkbox" name="{{name}}" value="{{value}}"{{attrs}}>',
|
'checkbox' => '<input type="checkbox" name="{{name}}" value="{{value}}"{{attrs}}>',
|
||||||
'checkboxFormGroup' => '{{label}}',
|
'checkboxFormGroup' => '{{label}}',
|
||||||
'formGroup' => '<div class="col-sm-2 col-form-label" {{attrs}}>{{label}}</div><div class="col-sm-10">{{input}}{{error}}</div>',
|
'formGroup' => '<div class="col-sm-2 form-label" {{attrs}}>{{label}}</div><div class="col-sm-10">{{input}}{{error}}</div>',
|
||||||
'nestingLabel' => '{{hidden}}<div class="col-sm-2 col-form-label">{{text}}</div><div class="col-sm-10">{{input}}</div>',
|
'nestingLabel' => '{{hidden}}<div class="col-sm-2 form-label">{{text}}</div><div class="col-sm-10">{{input}}</div>',
|
||||||
'option' => '<option value="{{value}}"{{attrs}}>{{text}}</option>',
|
'option' => '<option value="{{value}}"{{attrs}}>{{text}}</option>',
|
||||||
'optgroup' => '<optgroup label="{{label}}"{{attrs}}>{{content}}</optgroup>',
|
'optgroup' => '<optgroup label="{{label}}"{{attrs}}>{{content}}</optgroup>',
|
||||||
'select' => '<select name="{{name}}"{{attrs}}>{{content}}</select>',
|
'select' => '<select name="{{name}}"{{attrs}}>{{content}}</select>',
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
'body' => sprintf(
|
'body' => sprintf(
|
||||||
'%s%s%s%s%s%s',
|
'%s%s%s%s%s%s',
|
||||||
empty($data['description']) ? '' : sprintf(
|
empty($data['description']) ? '' : sprintf(
|
||||||
'<div class="pb-2 font-weight-light">%s</div>',
|
'<div class="pb-2 fw-light">%s</div>',
|
||||||
$data['description']
|
$data['description']
|
||||||
),
|
),
|
||||||
$ajaxFlashMessage,
|
$ajaxFlashMessage,
|
||||||
|
@ -106,8 +106,12 @@
|
||||||
$fieldsString,
|
$fieldsString,
|
||||||
empty($metaTemplateString) ? '' : $this->element(
|
empty($metaTemplateString) ? '' : $this->element(
|
||||||
'genericElements/accordion_scaffold', [
|
'genericElements/accordion_scaffold', [
|
||||||
'body' => $metaTemplateString,
|
'children' => [
|
||||||
'title' => 'Meta fields'
|
[
|
||||||
|
'body' => $metaTemplateString,
|
||||||
|
'title' => 'Meta fields'
|
||||||
|
]
|
||||||
|
]
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
$formEnd
|
$formEnd
|
||||||
|
@ -127,28 +131,36 @@
|
||||||
$fieldsString,
|
$fieldsString,
|
||||||
empty($metaTemplateString) ? '' : $this->element(
|
empty($metaTemplateString) ? '' : $this->element(
|
||||||
'genericElements/accordion_scaffold', [
|
'genericElements/accordion_scaffold', [
|
||||||
'body' => $metaTemplateString,
|
'children' => [
|
||||||
'title' => 'Meta fields'
|
[
|
||||||
|
'body' => $metaTemplateString,
|
||||||
|
'title' => 'Meta fields'
|
||||||
|
]
|
||||||
|
]
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
$formEnd
|
$formEnd
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'%s<h2 class="font-weight-light">%s</h2>%s%s%s%s%s%s%s%s%s',
|
'%s<h2 class="fw-light">%s</h2>%s%s%s%s%s%s%s%s%s',
|
||||||
empty($ajax) ? '<div class="col-8">' : '',
|
empty($ajax) ? '<div class="col-8">' : '',
|
||||||
empty($data['title']) ? sprintf('%s %s', $actionName, $modelName) : h($data['title']),
|
empty($data['title']) ? sprintf('%s %s', $actionName, $modelName) : h($data['title']),
|
||||||
$formCreate,
|
$formCreate,
|
||||||
$ajaxFlashMessage,
|
$ajaxFlashMessage,
|
||||||
empty($data['description']) ? '' : sprintf(
|
empty($data['description']) ? '' : sprintf(
|
||||||
'<div class="pb-3 font-weight-light">%s</div>',
|
'<div class="pb-3 fw-light">%s</div>',
|
||||||
$data['description']
|
$data['description']
|
||||||
),
|
),
|
||||||
sprintf('<div class="panel">%s</div>', $fieldsString),
|
sprintf('<div class="panel">%s</div>', $fieldsString),
|
||||||
empty($metaTemplateString) ? '' : $this->element(
|
empty($metaTemplateString) ? '' : $this->element(
|
||||||
'genericElements/accordion_scaffold', [
|
'genericElements/accordion_scaffold', [
|
||||||
'body' => $metaTemplateString,
|
'children' => [
|
||||||
'title' => 'Meta fields',
|
[
|
||||||
|
'body' => $metaTemplateString,
|
||||||
|
'title' => 'Meta fields',
|
||||||
|
]
|
||||||
|
],
|
||||||
'class' => 'mb-2'
|
'class' => 'mb-2'
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* - function($row, $options): the lambda function. $row contain the row data
|
* - function($row, $options): the lambda function. $row contain the row data
|
||||||
* - options: array of options. datapaths described in the datapath keyname will be extracted and replaced with the actual row value
|
* - options: array of options. datapaths described in the datapath keyname will be extracted and replaced with the actual row value
|
||||||
*/
|
*/
|
||||||
echo '<td class="action-links text-right text-nowrap">';
|
echo '<td class="action-links text-end text-nowrap">';
|
||||||
foreach ($actions as $action) {
|
foreach ($actions as $action) {
|
||||||
if (isset($action['requirement']) && !$action['requirement']) {
|
if (isset($action['requirement']) && !$action['requirement']) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -5,7 +5,7 @@ $canRemove = $this->request->getParam('prefix') !== 'Open';
|
||||||
if ($field['scope'] === 'individuals') {
|
if ($field['scope'] === 'individuals') {
|
||||||
foreach ($raw_alignments as $alignment) {
|
foreach ($raw_alignments as $alignment) {
|
||||||
$alignments .= sprintf(
|
$alignments .= sprintf(
|
||||||
'<div><span class="font-weight-bold">%s</span> @ %s <a href="#" class="fas fa-trash .text-reset .text-decoration-none" onClick="%s"></a></div>',
|
'<div><span class="fw-bold">%s</span> @ %s <a href="#" class="fas fa-trash .text-reset .text-decoration-none" onClick="%s"></a></div>',
|
||||||
h($alignment['type']),
|
h($alignment['type']),
|
||||||
sprintf(
|
sprintf(
|
||||||
'<a href="%sorganisations/view/%s">%s</a>',
|
'<a href="%sorganisations/view/%s">%s</a>',
|
||||||
|
@ -25,7 +25,7 @@ if ($field['scope'] === 'individuals') {
|
||||||
} else if ($field['scope'] === 'organisations') {
|
} else if ($field['scope'] === 'organisations') {
|
||||||
foreach ($raw_alignments as $alignment) {
|
foreach ($raw_alignments as $alignment) {
|
||||||
$alignments .= sprintf(
|
$alignments .= sprintf(
|
||||||
'<div>[<span class="font-weight-bold">%s</span>] %s <a href="#" class="fas fa-trash .text-reset .text-decoration-none" onClick="%s"></a></div>',
|
'<div>[<span class="fw-bold">%s</span>] %s <a href="#" class="fas fa-trash .text-reset .text-decoration-none" onClick="%s"></a></div>',
|
||||||
h($alignment['type']),
|
h($alignment['type']),
|
||||||
sprintf(
|
sprintf(
|
||||||
'<a href="%sindividuals/view/%s">%s</a>',
|
'<a href="%sindividuals/view/%s">%s</a>',
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
$start = $this->Hash->extract($row, 'authkey_start')[0];
|
$start = $this->Hash->extract($row, 'authkey_start')[0];
|
||||||
$end = $this->Hash->extract($row, 'authkey_end')[0];
|
$end = $this->Hash->extract($row, 'authkey_end')[0];
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'<div>%s: <span class="font-weight-bold text-info">%s</span></div>',
|
'<div>%s: <span class="fw-bold text-info">%s</span></div>',
|
||||||
__('Starts with'),
|
__('Starts with'),
|
||||||
h($start)
|
h($start)
|
||||||
);
|
);
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'<div>%s: <span class="font-weight-bold text-info">%s</span></div>',
|
'<div>%s: <span class="fw-bold text-info">%s</span></div>',
|
||||||
__('Ends with'),
|
__('Ends with'),
|
||||||
h($end)
|
h($end)
|
||||||
);
|
);
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
(!empty($this->Hash->extract($row, $field['data_path'])[0])) ? 'check' : 'times',
|
(!empty($this->Hash->extract($row, $field['data_path'])[0])) ? 'check' : 'times',
|
||||||
empty($rules_raw) ? '' :
|
empty($rules_raw) ? '' :
|
||||||
sprintf(
|
sprintf(
|
||||||
' <span data-toggle="popover" title="%s" data-content="%s">(%s)</span>',
|
' <span data-bs-toggle="popover" title="%s" data-bs-content="%s">(%s)</span>',
|
||||||
__('Filter rules'),
|
__('Filter rules'),
|
||||||
$rules_raw,
|
$rules_raw,
|
||||||
__('Rules')
|
__('Rules')
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
$data = h($data);
|
$data = h($data);
|
||||||
if (is_numeric($data)) {
|
if (is_numeric($data)) {
|
||||||
if ($data == 0) {
|
if ($data == 0) {
|
||||||
$data = '<span class="text-primary font-weight-bold">' . __('Indefinite') . '</span>';
|
$data = '<span class="text-primary fw-bold">' . __('Indefinite') . '</span>';
|
||||||
} else {
|
} else {
|
||||||
if ($data <= time()) {
|
if ($data <= time()) {
|
||||||
$data = '<span class="text-danger font-weight-bold">' . __('Expired') . '</span>';
|
$data = '<span class="text-danger fw-bold">' . __('Expired') . '</span>';
|
||||||
} else {
|
} else {
|
||||||
$data = '<span class="text-success font-weight-bold">' . date('Y-m-d H:i:s', $data) . '</span>';
|
$data = '<span class="text-success fw-bold">' . date('Y-m-d H:i:s', $data) . '</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'<span class="font-weight-bold">%s</span>: %s',
|
'<span class="fw-bold">%s</span>: %s',
|
||||||
$types[$type]['name'],
|
$types[$type]['name'],
|
||||||
$this->Html->link(
|
$this->Html->link(
|
||||||
sprintf(
|
sprintf(
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
}
|
}
|
||||||
if ($actions) {
|
if ($actions) {
|
||||||
$headersHtml .= sprintf(
|
$headersHtml .= sprintf(
|
||||||
'<th class="actions text-right">%s</th>',
|
'<th class="actions text-end">%s</th>',
|
||||||
__('Actions')
|
__('Actions')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
$tableRandomValue = Cake\Utility\Security::randomString(8);
|
$tableRandomValue = Cake\Utility\Security::randomString(8);
|
||||||
echo '<div id="table-container-' . h($tableRandomValue) . '">';
|
echo '<div id="table-container-' . h($tableRandomValue) . '">';
|
||||||
if (!empty($data['title'])) {
|
if (!empty($data['title'])) {
|
||||||
echo sprintf('<h2 class="font-weight-light">%s</h2>', h($data['title']));
|
echo sprintf('<h2 class="fw-light">%s</h2>', h($data['title']));
|
||||||
}
|
}
|
||||||
if (!empty($data['description'])) {
|
if (!empty($data['description'])) {
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'<div class="font-weight-light">%s</div>',
|
'<div class="fw-light">%s</div>',
|
||||||
empty($data['description']) ? '' : h($data['description'])
|
empty($data['description']) ? '' : h($data['description'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'<a class="btn btn-small btn-dropdown-toggle %s %s" %s %s data-toggle="dropdown" href="#" %s>%s%s%s <span class="caret"></span></a><ul class="dropdown-menu">%s</ul>',
|
'<a class="btn btn-small btn-dropdown-toggle %s %s" %s %s data-bs-toggle="dropdown" href="#" %s>%s%s%s <span class="caret"></span></a><ul class="dropdown-menu">%s</ul>',
|
||||||
empty($data['class']) ? '' : h($data['class']),
|
empty($data['class']) ? '' : h($data['class']),
|
||||||
empty($data['active']) ? 'btn-inverse' : 'btn-primary', // Change the default class for highlighted/active toggles here
|
empty($data['active']) ? 'btn-inverse' : 'btn-primary', // Change the default class for highlighted/active toggles here
|
||||||
empty($data['id']) ? '' : 'id="' . h($data['id']) . '"',
|
empty($data['id']) ? '' : 'id="' . h($data['id']) . '"',
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'<div class="multi_select_actions btn-group mr-2 flex-wrap collapse" role="group" aria-label="button-group" data-table-random-value="%s">%s</div>',
|
'<div class="multi_select_actions btn-group me-2 flex-wrap collapse" role="group" aria-label="button-group" data-table-random-value="%s">%s</div>',
|
||||||
$tableRandomValue,
|
$tableRandomValue,
|
||||||
$buttons
|
$buttons
|
||||||
);
|
);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
$filteringButton = $this->Bootstrap->button($buttonConfig);
|
$filteringButton = $this->Bootstrap->button($buttonConfig);
|
||||||
}
|
}
|
||||||
$button = empty($data['button']) && empty($data['fa-icon']) ? '' : sprintf(
|
$button = empty($data['button']) && empty($data['fa-icon']) ? '' : sprintf(
|
||||||
'<div class="input-group-append"><button class="btn btn-primary" %s id="quickFilterButton-%s" %s>%s%s</button>%s</div>',
|
'<button class="btn btn-primary" %s id="quickFilterButton-%s" %s>%s%s</button>%s',
|
||||||
empty($data['data']) ? '' : h($data['data']),
|
empty($data['data']) ? '' : h($data['data']),
|
||||||
h($tableRandomValue),
|
h($tableRandomValue),
|
||||||
$filterEffective ? '' : 'disabled="disabled"',
|
$filterEffective ? '' : 'disabled="disabled"',
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
$elements .= $this->element('/genericElements/ListTopBar/element_' . (empty($element['type']) ? 'simple' : h($element['type'])), array('data' => $element, 'tableRandomValue' => $tableRandomValue));
|
$elements .= $this->element('/genericElements/ListTopBar/element_' . (empty($element['type']) ? 'simple' : h($element['type'])), array('data' => $element, 'tableRandomValue' => $tableRandomValue));
|
||||||
}
|
}
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'<div %s class="btn-group btn-group-sm mr-2 flex-wrap" role="group" aria-label="button-group">%s</div>',
|
'<div %s class="btn-group btn-group-sm me-2 flex-wrap" role="group" aria-label="button-group">%s</div>',
|
||||||
(!empty($data['id'])) ? 'id="' . h($data['id']) . '"' : '',
|
(!empty($data['id'])) ? 'id="' . h($data['id']) . '"' : '',
|
||||||
$elements
|
$elements
|
||||||
);
|
);
|
||||||
|
|
|
@ -11,7 +11,7 @@ if (!empty($field['path'])) {
|
||||||
if ($field['scope'] === 'individuals') {
|
if ($field['scope'] === 'individuals') {
|
||||||
foreach ($extracted['alignments'] as $alignment) {
|
foreach ($extracted['alignments'] as $alignment) {
|
||||||
$alignments .= sprintf(
|
$alignments .= sprintf(
|
||||||
'<div><span class="font-weight-bold">%s</span> @ %s <a href="#" class="fas fa-trash" onClick="%s"></a></div>',
|
'<div><span class="fw-bold">%s</span> @ %s <a href="#" class="fas fa-trash" onClick="%s"></a></div>',
|
||||||
h($alignment['type']),
|
h($alignment['type']),
|
||||||
sprintf(
|
sprintf(
|
||||||
'<a href="%sorganisations/view/%s">%s</a>',
|
'<a href="%sorganisations/view/%s">%s</a>',
|
||||||
|
@ -31,7 +31,7 @@ if ($field['scope'] === 'individuals') {
|
||||||
} else if ($field['scope'] === 'organisations') {
|
} else if ($field['scope'] === 'organisations') {
|
||||||
foreach ($extracted['alignments'] as $alignment) {
|
foreach ($extracted['alignments'] as $alignment) {
|
||||||
$alignments .= sprintf(
|
$alignments .= sprintf(
|
||||||
'<div>[<span class="font-weight-bold">%s</span>] %s <a href="#" class="fas fa-trash" onClick="%s"></a></div>',
|
'<div>[<span class="fw-bold">%s</span>] %s <a href="#" class="fas fa-trash" onClick="%s"></a></div>',
|
||||||
h($alignment['type']),
|
h($alignment['type']),
|
||||||
sprintf(
|
sprintf(
|
||||||
'<a href="%sindividuals/view/%s">%s</a>',
|
'<a href="%sindividuals/view/%s">%s</a>',
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
'<div class="card-header" id="heading-%s"><h5 class="mb0">%s</h5></div>',
|
'<div class="card-header" id="heading-%s"><h5 class="mb0">%s</h5></div>',
|
||||||
$randomId,
|
$randomId,
|
||||||
sprintf(
|
sprintf(
|
||||||
'<button class="btn btn-link" data-toggle="collapse" data-target="#view-child-%s" aria-expanded="true" aria-controls="collapseOne">%s</button>',
|
'<button class="btn btn-link" data-bs-toggle="collapse" data-bs-target="#view-child-%s" aria-expanded="true" aria-controls="collapseOne">%s</button>',
|
||||||
$randomId,
|
$randomId,
|
||||||
h($child['title'])
|
h($child['title'])
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
sprintf(
|
sprintf(
|
||||||
'<div class="collapse %s" id="view-child-%s" data-parent="#accordion" labelledby="heading-%s"><div id="view-child-body-%s" class="card-body" data-content-url="%s" data-load-on="%s"></div></div>',
|
'<div class="collapse %s" id="view-child-%s" data-bs-parent="#accordion" labelledby="heading-%s"><div id="view-child-body-%s" class="card-body" data-content-url="%s" data-load-on="%s"></div></div>',
|
||||||
!empty($child['collapsed']) ? 'show' : 'collapsed',
|
!empty($child['collapsed']) ? 'show' : 'collapsed',
|
||||||
$randomId,
|
$randomId,
|
||||||
$randomId,
|
$randomId,
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
}
|
}
|
||||||
$listElements .= sprintf(
|
$listElements .= sprintf(
|
||||||
"<tr class=\"row\">
|
"<tr class=\"row\">
|
||||||
<td class=\"col-sm-2 font-weight-bold\">%s</td>
|
<td class=\"col-sm-2 fw-bold\">%s</td>
|
||||||
<td class=\"col-sm-10\">%s</td>
|
<td class=\"col-sm-10\">%s</td>
|
||||||
</tr>",
|
</tr>",
|
||||||
h($field['key']),
|
h($field['key']),
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
foreach ($metaTemplate->meta_template_fields as $metaTemplateField) {
|
foreach ($metaTemplate->meta_template_fields as $metaTemplateField) {
|
||||||
$metaField = $metaTemplateField->meta_fields[0];
|
$metaField = $metaTemplateField->meta_fields[0];
|
||||||
$fieldsHtml .= sprintf(
|
$fieldsHtml .= sprintf(
|
||||||
'<tr class="row"><td class="col-sm-2 font-weight-bold">%s</td><td class="col-sm-10">%s</td></tr>',
|
'<tr class="row"><td class="col-sm-2 fw-bold">%s</td><td class="col-sm-10">%s</td></tr>',
|
||||||
h($metaField->field),
|
h($metaField->field),
|
||||||
$this->element(
|
$this->element(
|
||||||
'/genericElements/SingleViews/Fields/genericField',
|
'/genericElements/SingleViews/Fields/genericField',
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
$title;
|
$title;
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
"<div id=\"single-view-table-container-%s\">
|
"<div id=\"single-view-table-container-%s\">
|
||||||
<h2 class=\"font-weight-light\">%s</h2>
|
<h2 class=\"fw-light\">%s</h2>
|
||||||
%s%s
|
%s%s
|
||||||
<div class=\"px-3 col-sm-8 panel\">
|
<div class=\"px-3 col-sm-8 panel\">
|
||||||
<table id=\"single-view-table-%s\" class=\"table table-striped\">%s</table>
|
<table id=\"single-view-table-%s\" class=\"table table-striped\">%s</table>
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
$randomId = Cake\Utility\Security::randomString(8);
|
$accordionId = Cake\Utility\Security::randomString(8);
|
||||||
?>
|
?>
|
||||||
<div id="accordion" class="<?= !empty($class) ? $class : '' ?>">
|
<div class="accordion <?= !empty($class) ? $class : '' ?>" id="accordion-<?= $accordionId ?>">
|
||||||
<div class="card">
|
<?php foreach ($children as $child): ?>
|
||||||
<div class="card-header" id="heading-<?= $randomId ?>">
|
<?php $childId = Cake\Utility\Security::randomString(8); ?>
|
||||||
<h5 class="mb0"><a href="#" class="btn btn-link" data-toggle="collapse" data-target="#view-child-<?= $randomId ?>" aria-expanded="true" aria-controls="collapseOne"><?= h($title) ?></a></h5>
|
<div class="accordion-item">
|
||||||
|
<h2 class="accordion-header" id="heading-<?= $childId ?>">
|
||||||
|
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-<?= $childId ?>" aria-expanded="false" aria-controls="collapse-<?= $childId ?>">
|
||||||
|
<?= h($child['title']) ?>
|
||||||
|
</button>
|
||||||
|
</h2>
|
||||||
|
<div id="collapse-<?= $childId ?>" class="accordion-collapse collapse" aria-labelledby="heading-<?= $accordionId ?>" data-bs-parent="#accordion-<?= $accordionId ?>">
|
||||||
|
<div class="accordion-body">
|
||||||
|
<?= $child['body'] ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse collapsed" id="view-child-<?= $randomId ?>" data-parent="#accordion" labelledby="heading-<?= $randomId ?>">
|
<?php endforeach; ?>
|
||||||
<div id="view-child-body-<?= $randomId ?>" class="card-body" data-load-on="ready"><?= $body ?></div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,9 +1,8 @@
|
||||||
<div class="modal-dialog <?= empty($class) ? '' : h($class) ?>" <?= !empty($staticBackdrop) ? 'data-backdrop="static"' : ''?> role="document">
|
<div class="modal-dialog <?= empty($class) ? '' : h($class) ?>" <?= !empty($staticBackdrop) ? 'data-bs-backdrop="static"' : ''?> role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title"><?= h($title) ?></h5>
|
<h5 class="modal-title"><?= h($title) ?></h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<?php if (empty($noCancel)): ?>
|
<?php if (empty($noCancel)): ?>
|
||||||
<button type="button" class="btn btn-secondary cancel-button" data-dismiss="modal"><?= __('Cancel') ?></button>
|
<button type="button" class="btn btn-secondary cancel-button" data-bs-dismiss="modal"><?= __('Cancel') ?></button>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?= $actionButton ?>
|
<?= $actionButton ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -41,7 +41,7 @@ foreach ($data['menu'] as $name => $menuElement) {
|
||||||
$navdata .= sprintf(
|
$navdata .= sprintf(
|
||||||
'<li class="nav-item dropdown">%s%s</li>',
|
'<li class="nav-item dropdown">%s%s</li>',
|
||||||
sprintf(
|
sprintf(
|
||||||
'<a class="nav-link dropdown-toggle" href="#" id="%s" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">%s</a>',
|
'<a class="nav-link dropdown-toggle" href="#" id="%s" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">%s</a>',
|
||||||
'dropdown-label-' . h($i),
|
'dropdown-label-' . h($i),
|
||||||
h($name)
|
h($name)
|
||||||
),
|
),
|
||||||
|
@ -58,7 +58,7 @@ $logoutButton = sprintf(
|
||||||
__('Logout')
|
__('Logout')
|
||||||
);
|
);
|
||||||
$navdata = sprintf(
|
$navdata = sprintf(
|
||||||
'<div class="collapse navbar-collapse" id="navbarCollapse"><ul class="navbar-nav mr-auto">%s%s</ul></div>',
|
'<div class="collapse navbar-collapse" id="navbarCollapse"><ul class="navbar-nav me-auto">%s%s</ul></div>',
|
||||||
$navdata,
|
$navdata,
|
||||||
$logoutButton
|
$logoutButton
|
||||||
);
|
);
|
||||||
|
@ -73,6 +73,6 @@ echo sprintf(
|
||||||
'<nav class="navbar navbar-expand-lg navbar-dark %s">%s%s%s</nav>',
|
'<nav class="navbar navbar-expand-lg navbar-dark %s">%s%s%s</nav>',
|
||||||
$darkMode ? 'bg-primary' : 'bg-dark',
|
$darkMode ? 'bg-primary' : 'bg-dark',
|
||||||
$homeButton,
|
$homeButton,
|
||||||
'<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>',
|
'<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>',
|
||||||
$navdata
|
$navdata
|
||||||
);
|
);
|
||||||
|
|
|
@ -36,7 +36,7 @@ if (isset($menu[$metaGroup])) {
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
'<div class="dropdown show">%s%s</div>',
|
'<div class="dropdown show">%s%s</div>',
|
||||||
sprintf(
|
sprintf(
|
||||||
'<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="sideMenuDropdownLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">%s</a>',
|
'<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="sideMenuDropdownLink" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">%s</a>',
|
||||||
__('Navigation')
|
__('Navigation')
|
||||||
),
|
),
|
||||||
sprintf(
|
sprintf(
|
||||||
|
|
|
@ -5,7 +5,7 @@ $backgroundColour = $darkMode ? 'bg-dark' : 'bg-light';
|
||||||
if (isset($menu[$metaGroup])) {
|
if (isset($menu[$metaGroup])) {
|
||||||
foreach ($menu[$metaGroup] as $scope => $scopeData) {
|
foreach ($menu[$metaGroup] as $scope => $scopeData) {
|
||||||
$children .= sprintf(
|
$children .= sprintf(
|
||||||
'<a href="%s" class="font-weight-bold list-group-item list-group-item-action %s %s pl-1 border-0">%s</a>',
|
'<a href="%s" class="fw-bold list-group-item list-group-item-action %s %s ps-1 border-0">%s</a>',
|
||||||
empty($scopeData['url']) ? '#' : $baseurl . '/' . h($scopeData['url']),
|
empty($scopeData['url']) ? '#' : $baseurl . '/' . h($scopeData['url']),
|
||||||
empty($scopeData['class']) ? '' : h($scopeData['class']),
|
empty($scopeData['class']) ? '' : h($scopeData['class']),
|
||||||
$backgroundColour,
|
$backgroundColour,
|
||||||
|
@ -36,9 +36,9 @@ if (isset($menu[$metaGroup])) {
|
||||||
}
|
}
|
||||||
$active = ($scope === $this->request->getParam('controller') && $action === $this->request->getParam('action'));
|
$active = ($scope === $this->request->getParam('controller') && $action === $this->request->getParam('action'));
|
||||||
if (!empty($data['popup'])) {
|
if (!empty($data['popup'])) {
|
||||||
$link_template = '<a href="#" onClick="UI.submissionModalAutoGuess(\'%s\')" class="list-group-item list-group-item-action %s %s pl-3 border-0 %s">%s</a>';
|
$link_template = '<a href="#" onClick="UI.submissionModalAutoGuess(\'%s\')" class="list-group-item list-group-item-action %s %s ps-3 border-0 %s">%s</a>';
|
||||||
} else {
|
} else {
|
||||||
$link_template = '<a href="%s" class="list-group-item list-group-item-action %s %s pl-3 border-0 %s">%s</a>';
|
$link_template = '<a href="%s" class="list-group-item list-group-item-action %s %s ps-3 border-0 %s">%s</a>';
|
||||||
}
|
}
|
||||||
$children .= sprintf(
|
$children .= sprintf(
|
||||||
$link_template,
|
$link_template,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<span class="app-icon w-100 h-100" title="<?= __('Cerebrate') ?>"></span>
|
<span class="app-icon w-100 h-100" title="<?= __('Cerebrate') ?>"></span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<button class="navbar-toggler d-sm-none" type="button" data-toggle="collapse" data-target="#app-sidebar" aria-controls="app-sidebar" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler d-sm-none" type="button" data-bs-toggle="collapse" data-bs-target="#app-sidebar" aria-controls="app-sidebar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
'wrapper' => sprintf(
|
'wrapper' => sprintf(
|
||||||
'<nav class="header-breadcrumb d-xl-block d-none"{{attrs}}><ol class="">{{content}}</ol></nav>'
|
'<nav class="header-breadcrumb d-xl-block d-none"{{attrs}}><ol class="">{{content}}</ol></nav>'
|
||||||
),
|
),
|
||||||
'item' => '<li class="header-breadcrumb-item"{{attrs}}><i class="{{icon}} mr-1"></i><a class="{{linkClass}}" href="{{url}}"{{innerAttrs}}>{{title}}</a></li>{{separator}}',
|
'item' => '<li class="header-breadcrumb-item"{{attrs}}><i class="{{icon}} me-1"></i><a class="{{linkClass}}" href="{{url}}"{{innerAttrs}}>{{title}}</a></li>{{separator}}',
|
||||||
'itemWithoutLink' => '<li class="header-breadcrumb-item"{{attrs}}><span{{innerAttrs}}>{{title}}</span></li>{{separator}}',
|
'itemWithoutLink' => '<li class="header-breadcrumb-item"{{attrs}}><span{{innerAttrs}}>{{title}}</span></li>{{separator}}',
|
||||||
'separator' => '<li class="header-breadcrumb-separator"{{attrs}}><span{{innerAttrs}}><i class="fa fa-sm fa-angle-right"></i></span></li>'
|
'separator' => '<li class="header-breadcrumb-separator"{{attrs}}><span{{innerAttrs}}><i class="fa fa-sm fa-angle-right"></i></span></li>'
|
||||||
]);
|
]);
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
$this->Breadcrumbs->add(h($entry['label']), Router::url($entry['url']), [
|
$this->Breadcrumbs->add(h($entry['label']), Router::url($entry['url']), [
|
||||||
'title' => h($entry['label']),
|
'title' => h($entry['label']),
|
||||||
'templateVars' => [
|
'templateVars' => [
|
||||||
'linkClass' => $i == 0 ? 'font-weight-light' : '',
|
'linkClass' => $i == 0 ? 'fw-light' : '',
|
||||||
'icon' => !empty($entry['icon']) ? $this->FontAwesome->getClass(h($entry['icon'])) : ''
|
'icon' => !empty($entry['icon']) ? $this->FontAwesome->getClass(h($entry['icon'])) : ''
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
<?php if (!empty($breadcrumbAction)): ?>
|
<?php if (!empty($breadcrumbAction)): ?>
|
||||||
<div class="header-breadcrumb-actions dropdown d-flex align-items-center">
|
<div class="header-breadcrumb-actions dropdown d-flex align-items-center">
|
||||||
<a class="btn btn-primary dropdown-toggle" href="#" role="button" id="dropdownMenuBreadcrumbAction" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<a class="btn btn-primary dropdown-toggle" href="#" role="button" id="dropdownMenuBreadcrumbAction" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<?= __('Actions') ?>
|
<?= __('Actions') ?>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuBreadcrumbAction">
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuBreadcrumbAction">
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
use Cake\Routing\Router;
|
use Cake\Routing\Router;
|
||||||
?>
|
?>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a class="nav-link px-2 text-decoration-none profile-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#" data-offset="10,20">
|
<a class="nav-link px-2 text-decoration-none profile-button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#" data-bs-offset="10,20">
|
||||||
<i class="<?= $this->FontAwesome->getClass('bell') ?> fa-lg"></i>
|
<i class="<?= $this->FontAwesome->getClass('bell') ?> fa-lg"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<div class="dropdown-menu dropdown-menu-end">
|
||||||
<?php if (empty($notifications)): ?>
|
<?php if (empty($notifications)): ?>
|
||||||
<h6 class="dropdown-header"><?= __('- No notification -') ?></h6>
|
<h6 class="dropdown-header"><?= __('- No notification -') ?></h6>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -2,22 +2,22 @@
|
||||||
use Cake\Routing\Router;
|
use Cake\Routing\Router;
|
||||||
?>
|
?>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a class="nav-link px-2 text-decoration-none profile-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#" data-offset="10,20">
|
<a class="nav-link px-2 text-decoration-none profile-button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#" data-bs-offset="10,20">
|
||||||
<i class="<?= $this->FontAwesome->getClass('user-circle') ?> fa-lg"></i>
|
<i class="<?= $this->FontAwesome->getClass('user-circle') ?> fa-lg"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<div class="dropdown-menu dropdown-menu-end">
|
||||||
<h6 class="dropdown-header"><?= h($this->request->getAttribute('identity')['username']) ?></h6>
|
<h6 class="dropdown-header"><?= h($this->request->getAttribute('identity')['username']) ?></h6>
|
||||||
<a class="dropdown-item" href="<?= Router::url(['controller' => 'users', 'action' => 'view']) ?>">
|
<a class="dropdown-item" href="<?= Router::url(['controller' => 'users', 'action' => 'view']) ?>">
|
||||||
<i class="mr-1 <?= $this->FontAwesome->getClass('user-circle') ?>"></i>
|
<i class="me-1 <?= $this->FontAwesome->getClass('user-circle') ?>"></i>
|
||||||
<?= __('My Account') ?>
|
<?= __('My Account') ?>
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" href="<?= Router::url(['controller' => 'users', 'action' => 'userSettings']) ?>">
|
<a class="dropdown-item" href="<?= Router::url(['controller' => 'users', 'action' => 'userSettings']) ?>">
|
||||||
<i class="mr-1 <?= $this->FontAwesome->getClass('user-cog') ?>"></i>
|
<i class="me-1 <?= $this->FontAwesome->getClass('user-cog') ?>"></i>
|
||||||
<?= __('Settings') ?>
|
<?= __('Settings') ?>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="<?= Router::url(['controller' => 'users', 'action' => 'logout']) ?>">
|
<a class="dropdown-item" href="<?= Router::url(['controller' => 'users', 'action' => 'logout']) ?>">
|
||||||
<i class="mr-1 <?= $this->FontAwesome->getClass('sign-out-alt') ?>"></i>
|
<i class="me-1 <?= $this->FontAwesome->getClass('sign-out-alt') ?>"></i>
|
||||||
<?= __('Logout') ?>
|
<?= __('Logout') ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
<input type="text" class="form-control d-inline-block" id="globalSearch" placeholder="<?= __('Search in Cerebrate...') ?>">
|
<input type="text" class="form-control d-inline-block" id="globalSearch" placeholder="<?= __('Search in Cerebrate...') ?>">
|
||||||
<i class="icon <?= $this->FontAwesome->getClass('search') ?>"></i>
|
<i class="icon <?= $this->FontAwesome->getClass('search') ?>"></i>
|
||||||
</span>
|
</span>
|
||||||
<button type="button" class="dropdown-toggle d-none" id="dropdownMenuSearchAll" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-reference="parent"></button>
|
<button type="button" class="dropdown-toggle d-none" id="dropdownMenuSearchAll" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"></button>
|
||||||
<div class="global-search-result-container dropdown-menu dropdown-menu-right p-0 pt-2" aria-labelledby="dropdownMenuSearchAll">
|
<div class="global-search-result-container dropdown-menu dropdown-menu-end p-0 pt-2" aria-labelledby="dropdownMenuSearchAll">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-menu d-flex ml-1">
|
<div class="header-menu d-flex ms-1">
|
||||||
<?= $this->element('layouts/header/header-notifications') ?>
|
<?= $this->element('layouts/header/header-notifications') ?>
|
||||||
<?= $this->element('layouts/header/header-profile') ?>
|
<?= $this->element('layouts/header/header-profile') ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<li class="<?= !empty($children) ? 'parent collapsed' : '' ?>">
|
<li class="<?= !empty($children) ? 'parent collapsed' : '' ?>">
|
||||||
<a class="sidebar-link <?= !empty($children) ? 'collapsed' : '' ?> <?= $active ? 'active' : '' ?> <?= $hasActiveChild ? 'have-active-child' : '' ?>" href="<?= h($url) ?>" <?= !empty($children) ? 'data-toggle="collapse"' : '' ?> <?= $hasActiveChild ? 'aria-expanded="true"' : '' ?>>
|
<a class="sidebar-link <?= !empty($children) ? 'collapsed' : '' ?> <?= $active ? 'active' : '' ?> <?= $hasActiveChild ? 'have-active-child' : '' ?>" href="<?= h($url) ?>" <?= !empty($children) ? 'data-bs-toggle="collapse"' : '' ?> <?= $hasActiveChild ? 'aria-expanded="true"' : '' ?>>
|
||||||
<i class="sidebar-icon <?= $this->FontAwesome->getClass($icon) ?>"></i>
|
<i class="sidebar-icon <?= $this->FontAwesome->getClass($icon) ?>"></i>
|
||||||
<span class="text"><?= h($label) ?></span>
|
<span class="text"><?= h($label) ?></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title"><?= h($title) ?></h5>
|
<h5 class="modal-title"><?= h($title) ?></h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
@ -16,7 +15,7 @@
|
||||||
['class' => 'btn btn-primary button-execute', 'id' => 'submitButton']
|
['class' => 'btn btn-primary button-execute', 'id' => 'submitButton']
|
||||||
)
|
)
|
||||||
?>
|
?>
|
||||||
<button type="button" class="btn btn-secondary cancel-button" data-dismiss="modal"><?= __('Cancel') ?></button>
|
<button type="button" class="btn btn-secondary cancel-button" data-bs-dismiss="modal"><?= __('Cancel') ?></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -85,11 +85,11 @@ echo $this->Bootstrap->modal([
|
||||||
|
|
||||||
function addControlRow($filteringTable) {
|
function addControlRow($filteringTable) {
|
||||||
const availableFilters = <?= json_encode($filters) ?>;
|
const availableFilters = <?= json_encode($filters) ?>;
|
||||||
const $selectField = $('<select/>').addClass('fieldSelect custom-select custom-select-sm')
|
const $selectField = $('<select/>').addClass('fieldSelect form-select form-select-sm')
|
||||||
availableFilters.forEach(filter => {
|
availableFilters.forEach(filter => {
|
||||||
$selectField.append($('<option/>').text(filter))
|
$selectField.append($('<option/>').text(filter))
|
||||||
});
|
});
|
||||||
const $selectOperator = $('<select/>').addClass('fieldOperator custom-select custom-select-sm')
|
const $selectOperator = $('<select/>').addClass('fieldOperator form-select form-select-sm')
|
||||||
.append([
|
.append([
|
||||||
$('<option/>').text('=').val('='),
|
$('<option/>').text('=').val('='),
|
||||||
$('<option/>').text('!=').val('!='),
|
$('<option/>').text('!=').val('!='),
|
||||||
|
@ -111,7 +111,7 @@ echo $this->Bootstrap->modal([
|
||||||
}
|
}
|
||||||
|
|
||||||
function addFilteringRow($filteringTable, field, value, operator) {
|
function addFilteringRow($filteringTable, field, value, operator) {
|
||||||
const $selectOperator = $('<select/>').addClass('fieldOperator custom-select custom-select-sm')
|
const $selectOperator = $('<select/>').addClass('fieldOperator form-select form-select-sm')
|
||||||
.append([
|
.append([
|
||||||
$('<option/>').text('=').val('='),
|
$('<option/>').text('=').val('='),
|
||||||
$('<option/>').text('!=').val('!='),
|
$('<option/>').text('!=').val('!='),
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<?= $this->fetch('title') ?>
|
<?= $this->fetch('title') ?>
|
||||||
</title>
|
</title>
|
||||||
<?= $this->Html->meta('icon') ?>
|
<?= $this->Html->meta('icon') ?>
|
||||||
<?= $this->Html->css('bootstrap.css') ?>
|
<?= $this->Html->css('bootstrap-5.1.1.css') ?>
|
||||||
<?= $this->Html->css('login.css') ?>
|
<?= $this->Html->css('login.css') ?>
|
||||||
<?= $this->Html->css('main.css') ?>
|
<?= $this->Html->css('main.css') ?>
|
||||||
<?= $this->Html->css('font-awesome') ?>
|
<?= $this->Html->css('font-awesome') ?>
|
||||||
|
|
|
@ -429,7 +429,7 @@ ul.sidebar-elements > li.category > span.category-divider > hr {
|
||||||
}
|
}
|
||||||
|
|
||||||
.center-navbar nav.header-breadcrumb li.header-breadcrumb-item a {
|
.center-navbar nav.header-breadcrumb li.header-breadcrumb-item a {
|
||||||
/* text-decoration: none; */
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-breadcrumb-children {
|
.header-breadcrumb-children {
|
||||||
|
@ -473,6 +473,6 @@ ul.sidebar-elements > li.category > span.category-divider > hr {
|
||||||
}
|
}
|
||||||
|
|
||||||
.composed-app-icon-container > .app-icon:hover {
|
.composed-app-icon-container > .app-icon:hover {
|
||||||
mask-position: 0 0, 2.4px 23.5px;
|
mask-position: 0 0, 2.4px 21px;
|
||||||
-webkit-mask-position: 0 0, 2.4px 23.5px;
|
-webkit-mask-position: 0 0, 2.4px 21px;
|
||||||
}
|
}
|
|
@ -1,28 +1,7 @@
|
||||||
/* based on the example from https://getbootstrap.com/docs/4.0/examples/sign-in/*/
|
/* based on the example from https://getbootstrap.com/docs/4.0/examples/sign-in/ */
|
||||||
.form-signin {
|
.form-signin {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 330px;
|
max-width: 330px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-signin .form-control {
|
|
||||||
position: relative;
|
|
||||||
box-sizing: border-box;
|
|
||||||
height: auto;
|
|
||||||
padding: 10px;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
.form-signin .form-control:focus {
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
.form-signin input[type="email"] {
|
|
||||||
margin-bottom: -1px;
|
|
||||||
border-bottom-right-radius: 0;
|
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
}
|
|
||||||
.form-signin input[type="password"] {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-top-left-radius: 0;
|
|
||||||
border-top-right-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -351,7 +351,7 @@ class Toaster {
|
||||||
$toastHeader.append($toastHeaderMuted)
|
$toastHeader.append($toastHeaderMuted)
|
||||||
}
|
}
|
||||||
if (options.closeButton) {
|
if (options.closeButton) {
|
||||||
var $closeButton = $('<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"><span aria-hidden="true">×</span></button>')
|
var $closeButton = $('<button type="button" class="ml-2 mb-1 close" data-bs-dismiss="toast" aria-label="Close"></button>')
|
||||||
$toastHeader.append($closeButton)
|
$toastHeader.append($closeButton)
|
||||||
}
|
}
|
||||||
$toast.append($toastHeader)
|
$toast.append($toastHeader)
|
||||||
|
@ -510,13 +510,14 @@ class ModalFactory {
|
||||||
'confirm-danger',
|
'confirm-danger',
|
||||||
]
|
]
|
||||||
|
|
||||||
static closeButtonHtml = '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'
|
static closeButtonHtml = '<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"></button>'
|
||||||
|
|
||||||
/** Create the HTML of the modal and inject it into the DOM */
|
/** Create the HTML of the modal and inject it into the DOM */
|
||||||
makeModal() {
|
makeModal() {
|
||||||
if (this.isValid()) {
|
if (this.isValid()) {
|
||||||
this.$modal = this.buildModal()
|
this.$modal = this.buildModal()
|
||||||
$('#mainModalContainer').append(this.$modal)
|
$('#mainModalContainer').append(this.$modal)
|
||||||
|
this.modalInstance = new bootstrap.Modal(this.$modal[0], this.bsModalOptions)
|
||||||
} else {
|
} else {
|
||||||
console.log('Modal not valid')
|
console.log('Modal not valid')
|
||||||
}
|
}
|
||||||
|
@ -526,7 +527,8 @@ class ModalFactory {
|
||||||
show() {
|
show() {
|
||||||
if (this.isValid()) {
|
if (this.isValid()) {
|
||||||
var that = this
|
var that = this
|
||||||
this.$modal.modal(this.bsModalOptions)
|
this.modalInstance.show()
|
||||||
|
this.$modal
|
||||||
.on('hidden.bs.modal', function () {
|
.on('hidden.bs.modal', function () {
|
||||||
that.removeModal()
|
that.removeModal()
|
||||||
that.options.hiddenCallback(that)
|
that.options.hiddenCallback(that)
|
||||||
|
@ -537,6 +539,17 @@ class ModalFactory {
|
||||||
that.findSubmitButtonAndAddListener()
|
that.findSubmitButtonAndAddListener()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
// this.$modal.modal(this.bsModalOptions)
|
||||||
|
// .on('hidden.bs.modal', function () {
|
||||||
|
// that.removeModal()
|
||||||
|
// that.options.hiddenCallback(that)
|
||||||
|
// })
|
||||||
|
// .on('shown.bs.modal', function () {
|
||||||
|
// that.options.shownCallback(that)
|
||||||
|
// if (that.attachSubmitButtonListener) {
|
||||||
|
// that.findSubmitButtonAndAddListener()
|
||||||
|
// }
|
||||||
|
// })
|
||||||
} else {
|
} else {
|
||||||
console.log('Modal not valid')
|
console.log('Modal not valid')
|
||||||
}
|
}
|
||||||
|
@ -544,7 +557,8 @@ class ModalFactory {
|
||||||
|
|
||||||
/** Hide the modal using the bootstrap modal's hide command */
|
/** Hide the modal using the bootstrap modal's hide command */
|
||||||
hide() {
|
hide() {
|
||||||
this.$modal.modal('hide')
|
// this.$modal.modal('hide')
|
||||||
|
this.modalInstance.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Remove the modal from the DOM */
|
/** Remove the modal from the DOM */
|
||||||
|
@ -567,7 +581,7 @@ class ModalFactory {
|
||||||
* @return {jQuery} The modal jQuery object
|
* @return {jQuery} The modal jQuery object
|
||||||
*/
|
*/
|
||||||
buildModal() {
|
buildModal() {
|
||||||
const $modal = $('<div class="modal fade" tabindex="-1" aria-hidden="true"/>')
|
const $modal = $('<div class="modal fade" tabindex="-1"/>')
|
||||||
if (this.options.id !== false) {
|
if (this.options.id !== false) {
|
||||||
$modal.attr('id', this.options.id)
|
$modal.attr('id', this.options.id)
|
||||||
$modal.attr('aria-labelledby', this.options.id)
|
$modal.attr('aria-labelledby', this.options.id)
|
||||||
|
@ -642,7 +656,7 @@ class ModalFactory {
|
||||||
getFooterOkOnly() {
|
getFooterOkOnly() {
|
||||||
return [
|
return [
|
||||||
$('<button type="button" class="btn btn-primary">OK</button>')
|
$('<button type="button" class="btn btn-primary">OK</button>')
|
||||||
.attr('data-dismiss', 'modal'),
|
.attr('data-bs-dismiss', 'modal'),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -650,19 +664,19 @@ class ModalFactory {
|
||||||
getFooterConfirm() {
|
getFooterConfirm() {
|
||||||
let variant = this.options.type.split('-')[1]
|
let variant = this.options.type.split('-')[1]
|
||||||
variant = variant !== undefined ? variant : 'primary'
|
variant = variant !== undefined ? variant : 'primary'
|
||||||
const $buttonCancel = $('<button type="button" class="btn btn-secondary" data-dismiss="modal"></button>')
|
const $buttonCancel = $('<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"></button>')
|
||||||
.text(this.options.cancelText)
|
.text(this.options.cancelText)
|
||||||
.click(
|
.click(
|
||||||
(evt) => {
|
(evt) => {
|
||||||
this.options.cancel(() => { this.hide() }, this, evt)
|
this.options.cancel(() => { this.hide() }, this, evt)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.attr('data-dismiss', (this.options.closeManually || !this.options.closeOnSuccess) ? '' : 'modal')
|
.attr('data-bs-dismiss', (this.options.closeManually || !this.options.closeOnSuccess) ? '' : 'modal')
|
||||||
|
|
||||||
const $buttonConfirm = $('<button type="button" class="btn"></button>')
|
const $buttonConfirm = $('<button type="button" class="btn"></button>')
|
||||||
.addClass('btn-' + variant)
|
.addClass('btn-' + variant)
|
||||||
.text(this.options.confirmText)
|
.text(this.options.confirmText)
|
||||||
.attr('data-dismiss', (this.options.closeManually || this.options.closeOnSuccess) ? '' : 'modal')
|
.attr('data-bs-dismiss', (this.options.closeManually || this.options.closeOnSuccess) ? '' : 'modal')
|
||||||
$buttonConfirm.click(this.getConfirmationHandlerFunction($buttonConfirm))
|
$buttonConfirm.click(this.getConfirmationHandlerFunction($buttonConfirm))
|
||||||
return [$buttonCancel, $buttonConfirm]
|
return [$buttonCancel, $buttonConfirm]
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue