chg: [bootstrap] Migrated APP to use bootstrap v5.x
parent
ea469e0fc5
commit
67b43635d0
|
@ -18,18 +18,18 @@ $footerButtons = [
|
|||
|
||||
$tools = sprintf(
|
||||
'<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="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>',
|
||||
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)),
|
||||
h($request['localTool']->description),
|
||||
h($request['localTool']->name),
|
||||
__('(local tool)')
|
||||
),
|
||||
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'])),
|
||||
h($request['data']['remote_tool']['description'] ?? ''),
|
||||
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))
|
||||
);
|
||||
|
||||
$rows = sprintf('<tr><td class="font-weight-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="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>', __('URL'), h($request['data']['url']));
|
||||
$rows .= sprintf('<tr><td class="fw-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>', __('Errors'), h(json_encode($request['data']['reason']['errors'])) ?? '');
|
||||
$table2 = sprintf('<table class="table table-sm table-borderless"><tbody>%s</tbody></table>', $rows);
|
||||
|
||||
$form = $this->element('genericElements/Form/genericForm', [
|
||||
|
|
|
@ -184,12 +184,10 @@ class BootstrapGeneric
|
|||
{
|
||||
return BootstrapGeneric::genNode('button', [
|
||||
'type' => 'button',
|
||||
'class' => 'close',
|
||||
'data-dismiss' => $dismissTarget,
|
||||
'class' => 'btn-close',
|
||||
'data-bs-dismiss' => $dismissTarget,
|
||||
'arial-label' => __('Close')
|
||||
], BootstrapGeneric::genNode('span', [
|
||||
'arial-hidden' => 'true'
|
||||
], '×'));
|
||||
]);
|
||||
}
|
||||
|
||||
protected static function getTextClassForVariant($variant)
|
||||
|
@ -340,7 +338,7 @@ class BootstrapTabs extends BootstrapGeneric
|
|||
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(['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->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']}"])]);
|
||||
|
@ -375,7 +373,7 @@ class BootstrapTabs extends BootstrapGeneric
|
|||
[!empty($navItem['active']) ? 'active' : ''],
|
||||
[!empty($navItem['disabled']) ? 'disabled' : '']
|
||||
),
|
||||
'data-toggle' => $this->options['pills'] ? 'pill' : 'tab',
|
||||
'data-bs-toggle' => $this->options['pills'] ? 'pill' : 'tab',
|
||||
'id' => $navItem['id'] . '-tab',
|
||||
'href' => '#' . $navItem['id'],
|
||||
'aria-controls' => $navItem['id'],
|
||||
|
@ -633,7 +631,6 @@ class BoostrapButton extends BootstrapGeneric {
|
|||
'variant' => 'primary',
|
||||
'outline' => false,
|
||||
'size' => '',
|
||||
'block' => false,
|
||||
'icon' => null,
|
||||
'class' => [],
|
||||
'type' => 'button',
|
||||
|
@ -671,9 +668,6 @@ class BoostrapButton extends BootstrapGeneric {
|
|||
if (!empty($this->options['size'])) {
|
||||
$this->bsClasses[] = "btn-$this->options['size']";
|
||||
}
|
||||
if ($this->options['block']) {
|
||||
$this->bsClasses[] = 'btn-block';
|
||||
}
|
||||
}
|
||||
|
||||
public function button()
|
||||
|
@ -702,7 +696,7 @@ class BoostrapButton extends BootstrapGeneric {
|
|||
private function genIcon()
|
||||
{
|
||||
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', [
|
||||
'class' => [
|
||||
'badge',
|
||||
"badge-{$this->options['variant']}",
|
||||
$this->options['pill'] ? 'badge-pill' : '',
|
||||
"bg-{$this->options['variant']}",
|
||||
$this->options['pill'] ? 'rounded-pill' : '',
|
||||
],
|
||||
'title' => $this->options['title']
|
||||
], h($this->options['text']));
|
||||
|
@ -877,7 +871,7 @@ class BoostrapModal extends BootstrapGeneric {
|
|||
'variant' => 'primary',
|
||||
'text' => __('Ok'),
|
||||
'params' => [
|
||||
'data-dismiss' => $this->options['confirmFunction'] ? '' : 'modal',
|
||||
'data-bs-dismiss' => $this->options['confirmFunction'] ? '' : 'modal',
|
||||
'onclick' => $this->options['confirmFunction']
|
||||
]
|
||||
]))->button();
|
||||
|
@ -894,7 +888,7 @@ class BoostrapModal extends BootstrapGeneric {
|
|||
'variant' => 'secondary',
|
||||
'text' => h($this->options['cancelText']),
|
||||
'params' => [
|
||||
'data-dismiss' => 'modal',
|
||||
'data-bs-dismiss' => 'modal',
|
||||
'onclick' => $this->options['cancelFunction']
|
||||
]
|
||||
]))->button();
|
||||
|
@ -904,7 +898,7 @@ class BoostrapModal extends BootstrapGeneric {
|
|||
'text' => h($this->options['confirmText']),
|
||||
'class' => 'modal-confirm-button',
|
||||
'params' => [
|
||||
// 'data-dismiss' => $this->options['confirmFunction'] ? '' : 'modal',
|
||||
// 'data-bs-dismiss' => $this->options['confirmFunction'] ? '' : 'modal',
|
||||
'data-confirmFunction' => sprintf('%s', $this->options['confirmFunction'])
|
||||
]
|
||||
]))->button();
|
||||
|
@ -920,7 +914,7 @@ class BoostrapModal extends BootstrapGeneric {
|
|||
'text' => h($buttonConfig['text']),
|
||||
'class' => 'modal-confirm-button',
|
||||
'params' => [
|
||||
'data-dismiss' => !empty($buttonConfig['clickFunction']) ? '' : 'modal',
|
||||
'data-bs-dismiss' => !empty($buttonConfig['clickFunction']) ? '' : 'modal',
|
||||
'data-clickFunction' => sprintf('%s', $buttonConfig['clickFunction'])
|
||||
]
|
||||
]))->button();
|
||||
|
@ -1053,19 +1047,19 @@ class BoostrapSwitch extends BootstrapGeneric {
|
|||
$tmpId = 'tmp-' . mt_rand();
|
||||
$html = $this->genNode('div', [
|
||||
'class' => [
|
||||
'custom-control custom-switch',
|
||||
'form-check form-switch',
|
||||
],
|
||||
'title' => $this->options['title']
|
||||
], implode('', [
|
||||
$this->genNode('input', [
|
||||
'type' => "checkbox",
|
||||
'class' => 'custom-control-input',
|
||||
'class' => 'orm-check-input',
|
||||
'id' => $tmpId,
|
||||
($this->options['disabled'] ? 'disabled' : '') => '',
|
||||
($this->options['checked'] ? 'checked' : '') => $this->options['checked'] ? 'checked' : ''
|
||||
]),
|
||||
$this->genNode('label', [
|
||||
'class' => 'custom-control-label',
|
||||
'class' => 'orm-check-label',
|
||||
'for' => $tmpId,
|
||||
], h($this->options['label']))
|
||||
]));
|
||||
|
@ -1161,7 +1155,7 @@ class BoostrapCollapse extends BootstrapGeneric {
|
|||
{
|
||||
$html = $this->genNode('a', [
|
||||
'class' => ['text-decoration-none'],
|
||||
'data-toggle' => 'collapse',
|
||||
'data-bs-toggle' => 'collapse',
|
||||
'href' => '#collapseExample',
|
||||
'role' => 'button',
|
||||
'aria-expanded' => 'false',
|
||||
|
@ -1271,7 +1265,7 @@ class BoostrapProgressTimeline extends BootstrapGeneric {
|
|||
return $this->genNode('li', [
|
||||
'class' => [
|
||||
'text-center',
|
||||
'font-weight-bold',
|
||||
'fw-bold',
|
||||
$isActive ? 'progress-active' : 'progress-inactive',
|
||||
],
|
||||
], h($step['text'] ?? ''));
|
||||
|
|
|
@ -52,7 +52,7 @@ class DataFromPathHelper extends Helper
|
|||
$extractedVars[$i] = $varValue;
|
||||
}
|
||||
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(
|
||||
"{{{$i}}}",
|
||||
$value,
|
||||
|
|
|
@ -5,9 +5,9 @@ echo $this->element('genericElements/genericModal', [
|
|||
'<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.'),
|
||||
__('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,
|
||||
'staticBackdrop' => true,
|
||||
]);
|
||||
|
|
|
@ -130,7 +130,7 @@ echo $this->element('genericElements/IndexTable/index_table', [
|
|||
)
|
||||
const $footer = $(modalObject.ajaxApi.statusNode).parent()
|
||||
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')
|
||||
}
|
||||
UI.submissionModal('/inbox/delete', successCallback, failCallback).then(([modalObject, ajaxApi]) => {
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
<?php
|
||||
$Parsedown = new Parsedown();
|
||||
echo $Parsedown->text($md);
|
||||
<h1><?= __('Welcome!') ?></h1>
|
|
@ -8,11 +8,11 @@
|
|||
$table = Cake\ORM\TableRegistry::get($tableName);
|
||||
$fieldPath = !empty($table->getDisplayField()) ? $table->getDisplayField() : 'id';
|
||||
$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">
|
||||
<hr class="m-0"/>
|
||||
</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']);
|
||||
|
||||
foreach ($tableResult['entries'] as $entry) {
|
||||
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
$remaining = $tableResult['amount'] - count($tableResult['entries']);
|
||||
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([
|
||||
'controller' => 'instance',
|
||||
'action' => 'search_all',
|
||||
|
@ -46,7 +46,7 @@
|
|||
}
|
||||
|
||||
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([
|
||||
'controller' => 'instance',
|
||||
'action' => 'search_all',
|
||||
|
@ -58,7 +58,7 @@
|
|||
__('View all results')
|
||||
);
|
||||
} 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)) {
|
||||
|
|
|
@ -69,8 +69,8 @@ echo $this->element('genericElements/IndexTable/index_table', [
|
|||
$conflictingTemplate = getConflictingTemplate($row, $data);
|
||||
if (!empty($conflictingTemplate)) {
|
||||
return sprintf(
|
||||
"<span class=\"text-danger font-weight-bolder\">%s</span> %s.<br />
|
||||
<ul><li><span class=\"font-weight-bolder\">%s</span> %s <span class=\"font-weight-bolder\">%s</span></li></ul>",
|
||||
"<span class=\"text-danger fw-bolder\">%s</span> %s.<br />
|
||||
<ul><li><span class=\"fw-bolder\">%s</span> %s <span class=\"fw-bolder\">%s</span></li></ul>",
|
||||
__('Conflict with:'),
|
||||
$this->Html->link(
|
||||
h($conflictingTemplate->name),
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
<?php
|
||||
echo $this->Html->image('logo-purple.png', ['alt' => 'CakePHP', '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->control('username', ['label' => false, 'class' => 'form-control', 'placeholder' => __('Username')]);
|
||||
echo $this->Form->control('password', ['type' => 'password', 'label' => false, 'class' => 'form-control', 'placeholder' => __('Password')]);
|
||||
echo $this->Form->submit(__('Submit'), ['class' => 'btn btn-lg btn-primary btn-block']);
|
||||
echo $this->Form->control('username', ['label' => 'Username', 'class' => 'form-control mb-2', 'placeholder' => __('Username')]);
|
||||
echo $this->Form->control('password', ['type' => 'password', 'label' => 'Password', 'class' => 'form-control mb-3', 'placeholder' => __('Password')]);
|
||||
echo $this->Form->control(__('Submit'), ['type' => 'submit', 'class' => 'btn btn-primary']);
|
||||
echo $this->Form->end();
|
||||
echo '</div>';
|
||||
?>
|
||||
|
|
|
@ -14,7 +14,6 @@ if (!isset($params['escape']) || $params['escape'] !== false) {
|
|||
?>
|
||||
<div class="alert <?= h($class) ?> alert-dismissible fade show" role="alert">
|
||||
<?= $message ?>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,6 @@ if (!isset($params['escape']) || $params['escape'] !== false) {
|
|||
?>
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<?= $message ?>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,6 @@ if (!isset($params['escape']) || $params['escape'] !== false) {
|
|||
?>
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
<?= $message ?>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
$controlParams = [
|
||||
'options' => $fieldData['options'],
|
||||
'empty' => $fieldData['empty'] ?? false,
|
||||
'class' => ($fieldData['class'] ?? '') . ' formDropdown custom-select'
|
||||
'class' => ($fieldData['class'] ?? '') . ' formDropdown form-select'
|
||||
];
|
||||
echo $this->FormFieldMassage->prepareFormElement($this->Form, $controlParams, $fieldData);
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
$label = $fieldData['label'];
|
||||
$formElement = $this->FormFieldMassage->prepareFormElement($this->Form, $params, $fieldData);
|
||||
$temp = sprintf(
|
||||
'<div class="form-group row ">
|
||||
<div class="col-sm-2 col-form-label">%s</div>
|
||||
'<div class="row mb-3">
|
||||
<div class="col-sm-2 form-label">%s</div>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
%s<span class="input-group-append">%s</span>
|
||||
%s<span>%s</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>',
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
}
|
||||
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'])
|
||||
);
|
||||
?>
|
||||
|
|
|
@ -28,16 +28,16 @@
|
|||
$formRandomValue = Cake\Utility\Security::randomString(8);
|
||||
$formCreate = $this->Form->create($entity, ['id' => 'form-' . $formRandomValue]);
|
||||
$default_template = [
|
||||
'inputContainer' => '<div class="form-group row">{{content}}</div>',
|
||||
'inputContainerError' => '<div class="form-group row has-error">{{content}}</div>',
|
||||
'inputContainer' => '<div class="row mb-3">{{content}}</div>',
|
||||
'inputContainerError' => '<div class="row mb-3 has-error">{{content}}</div>',
|
||||
'label' => '{{text}}',
|
||||
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}} />',
|
||||
'textarea' => '<textarea name="{{name}}" {{attrs}}>{{value}}</textarea>',
|
||||
'select' => '<select name="{{name}}" {{attrs}}>{{content}}</select>',
|
||||
'checkbox' => '<input type="checkbox" name="{{name}}" value="{{value}}"{{attrs}}>',
|
||||
'checkboxFormGroup' => '{{label}}',
|
||||
'formGroup' => '<div class="col-sm-2 col-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>',
|
||||
'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 form-label">{{text}}</div><div class="col-sm-10">{{input}}</div>',
|
||||
'option' => '<option value="{{value}}"{{attrs}}>{{text}}</option>',
|
||||
'optgroup' => '<optgroup label="{{label}}"{{attrs}}>{{content}}</optgroup>',
|
||||
'select' => '<select name="{{name}}"{{attrs}}>{{content}}</select>',
|
||||
|
@ -98,7 +98,7 @@
|
|||
'body' => sprintf(
|
||||
'%s%s%s%s%s%s',
|
||||
empty($data['description']) ? '' : sprintf(
|
||||
'<div class="pb-2 font-weight-light">%s</div>',
|
||||
'<div class="pb-2 fw-light">%s</div>',
|
||||
$data['description']
|
||||
),
|
||||
$ajaxFlashMessage,
|
||||
|
@ -106,8 +106,12 @@
|
|||
$fieldsString,
|
||||
empty($metaTemplateString) ? '' : $this->element(
|
||||
'genericElements/accordion_scaffold', [
|
||||
'body' => $metaTemplateString,
|
||||
'title' => 'Meta fields'
|
||||
'children' => [
|
||||
[
|
||||
'body' => $metaTemplateString,
|
||||
'title' => 'Meta fields'
|
||||
]
|
||||
]
|
||||
]
|
||||
),
|
||||
$formEnd
|
||||
|
@ -127,28 +131,36 @@
|
|||
$fieldsString,
|
||||
empty($metaTemplateString) ? '' : $this->element(
|
||||
'genericElements/accordion_scaffold', [
|
||||
'body' => $metaTemplateString,
|
||||
'title' => 'Meta fields'
|
||||
'children' => [
|
||||
[
|
||||
'body' => $metaTemplateString,
|
||||
'title' => 'Meta fields'
|
||||
]
|
||||
]
|
||||
]
|
||||
),
|
||||
$formEnd
|
||||
);
|
||||
} else {
|
||||
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($data['title']) ? sprintf('%s %s', $actionName, $modelName) : h($data['title']),
|
||||
$formCreate,
|
||||
$ajaxFlashMessage,
|
||||
empty($data['description']) ? '' : sprintf(
|
||||
'<div class="pb-3 font-weight-light">%s</div>',
|
||||
'<div class="pb-3 fw-light">%s</div>',
|
||||
$data['description']
|
||||
),
|
||||
sprintf('<div class="panel">%s</div>', $fieldsString),
|
||||
empty($metaTemplateString) ? '' : $this->element(
|
||||
'genericElements/accordion_scaffold', [
|
||||
'body' => $metaTemplateString,
|
||||
'title' => 'Meta fields',
|
||||
'children' => [
|
||||
[
|
||||
'body' => $metaTemplateString,
|
||||
'title' => 'Meta fields',
|
||||
]
|
||||
],
|
||||
'class' => 'mb-2'
|
||||
]
|
||||
),
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* - 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
|
||||
*/
|
||||
echo '<td class="action-links text-right text-nowrap">';
|
||||
echo '<td class="action-links text-end text-nowrap">';
|
||||
foreach ($actions as $action) {
|
||||
if (isset($action['requirement']) && !$action['requirement']) {
|
||||
continue;
|
||||
|
|
|
@ -5,7 +5,7 @@ $canRemove = $this->request->getParam('prefix') !== 'Open';
|
|||
if ($field['scope'] === 'individuals') {
|
||||
foreach ($raw_alignments as $alignment) {
|
||||
$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']),
|
||||
sprintf(
|
||||
'<a href="%sorganisations/view/%s">%s</a>',
|
||||
|
@ -25,7 +25,7 @@ if ($field['scope'] === 'individuals') {
|
|||
} else if ($field['scope'] === 'organisations') {
|
||||
foreach ($raw_alignments as $alignment) {
|
||||
$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']),
|
||||
sprintf(
|
||||
'<a href="%sindividuals/view/%s">%s</a>',
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
$start = $this->Hash->extract($row, 'authkey_start')[0];
|
||||
$end = $this->Hash->extract($row, 'authkey_end')[0];
|
||||
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'),
|
||||
h($start)
|
||||
);
|
||||
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'),
|
||||
h($end)
|
||||
);
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
(!empty($this->Hash->extract($row, $field['data_path'])[0])) ? 'check' : 'times',
|
||||
empty($rules_raw) ? '' :
|
||||
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'),
|
||||
$rules_raw,
|
||||
__('Rules')
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
$data = h($data);
|
||||
if (is_numeric($data)) {
|
||||
if ($data == 0) {
|
||||
$data = '<span class="text-primary font-weight-bold">' . __('Indefinite') . '</span>';
|
||||
$data = '<span class="text-primary fw-bold">' . __('Indefinite') . '</span>';
|
||||
} else {
|
||||
if ($data <= time()) {
|
||||
$data = '<span class="text-danger font-weight-bold">' . __('Expired') . '</span>';
|
||||
$data = '<span class="text-danger fw-bold">' . __('Expired') . '</span>';
|
||||
} 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(
|
||||
'<span class="font-weight-bold">%s</span>: %s',
|
||||
'<span class="fw-bold">%s</span>: %s',
|
||||
$types[$type]['name'],
|
||||
$this->Html->link(
|
||||
sprintf(
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
if ($actions) {
|
||||
$headersHtml .= sprintf(
|
||||
'<th class="actions text-right">%s</th>',
|
||||
'<th class="actions text-end">%s</th>',
|
||||
__('Actions')
|
||||
);
|
||||
}
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
$tableRandomValue = Cake\Utility\Security::randomString(8);
|
||||
echo '<div id="table-container-' . h($tableRandomValue) . '">';
|
||||
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'])) {
|
||||
echo sprintf(
|
||||
'<div class="font-weight-light">%s</div>',
|
||||
'<div class="fw-light">%s</div>',
|
||||
empty($data['description']) ? '' : h($data['description'])
|
||||
);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
}
|
||||
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['active']) ? 'btn-inverse' : 'btn-primary', // Change the default class for highlighted/active toggles here
|
||||
empty($data['id']) ? '' : 'id="' . h($data['id']) . '"',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
]);
|
||||
}
|
||||
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,
|
||||
$buttons
|
||||
);
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
$filteringButton = $this->Bootstrap->button($buttonConfig);
|
||||
}
|
||||
$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']),
|
||||
h($tableRandomValue),
|
||||
$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));
|
||||
}
|
||||
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']) . '"' : '',
|
||||
$elements
|
||||
);
|
||||
|
|
|
@ -11,7 +11,7 @@ if (!empty($field['path'])) {
|
|||
if ($field['scope'] === 'individuals') {
|
||||
foreach ($extracted['alignments'] as $alignment) {
|
||||
$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']),
|
||||
sprintf(
|
||||
'<a href="%sorganisations/view/%s">%s</a>',
|
||||
|
@ -31,7 +31,7 @@ if ($field['scope'] === 'individuals') {
|
|||
} else if ($field['scope'] === 'organisations') {
|
||||
foreach ($extracted['alignments'] as $alignment) {
|
||||
$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']),
|
||||
sprintf(
|
||||
'<a href="%sindividuals/view/%s">%s</a>',
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
'<div class="card-header" id="heading-%s"><h5 class="mb0">%s</h5></div>',
|
||||
$randomId,
|
||||
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,
|
||||
h($child['title'])
|
||||
)
|
||||
),
|
||||
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',
|
||||
$randomId,
|
||||
$randomId,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
}
|
||||
$listElements .= sprintf(
|
||||
"<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>
|
||||
</tr>",
|
||||
h($field['key']),
|
||||
|
@ -69,7 +69,7 @@
|
|||
foreach ($metaTemplate->meta_template_fields as $metaTemplateField) {
|
||||
$metaField = $metaTemplateField->meta_fields[0];
|
||||
$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),
|
||||
$this->element(
|
||||
'/genericElements/SingleViews/Fields/genericField',
|
||||
|
@ -111,7 +111,7 @@
|
|||
$title;
|
||||
echo sprintf(
|
||||
"<div id=\"single-view-table-container-%s\">
|
||||
<h2 class=\"font-weight-light\">%s</h2>
|
||||
<h2 class=\"fw-light\">%s</h2>
|
||||
%s%s
|
||||
<div class=\"px-3 col-sm-8 panel\">
|
||||
<table id=\"single-view-table-%s\" class=\"table table-striped\">%s</table>
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
<?php
|
||||
$randomId = Cake\Utility\Security::randomString(8);
|
||||
$accordionId = Cake\Utility\Security::randomString(8);
|
||||
?>
|
||||
<div id="accordion" class="<?= !empty($class) ? $class : '' ?>">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading-<?= $randomId ?>">
|
||||
<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 <?= !empty($class) ? $class : '' ?>" id="accordion-<?= $accordionId ?>">
|
||||
<?php foreach ($children as $child): ?>
|
||||
<?php $childId = Cake\Utility\Security::randomString(8); ?>
|
||||
<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 class="collapse collapsed" id="view-child-<?= $randomId ?>" data-parent="#accordion" labelledby="heading-<?= $randomId ?>">
|
||||
<div id="view-child-body-<?= $randomId ?>" class="card-body" data-load-on="ready"><?= $body ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</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-header">
|
||||
<h5 class="modal-title"><?= h($title) ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
@ -11,7 +10,7 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<?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; ?>
|
||||
<?= $actionButton ?>
|
||||
</div>
|
||||
|
|
|
@ -41,7 +41,7 @@ foreach ($data['menu'] as $name => $menuElement) {
|
|||
$navdata .= sprintf(
|
||||
'<li class="nav-item dropdown">%s%s</li>',
|
||||
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),
|
||||
h($name)
|
||||
),
|
||||
|
@ -58,7 +58,7 @@ $logoutButton = sprintf(
|
|||
__('Logout')
|
||||
);
|
||||
$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,
|
||||
$logoutButton
|
||||
);
|
||||
|
@ -73,6 +73,6 @@ echo sprintf(
|
|||
'<nav class="navbar navbar-expand-lg navbar-dark %s">%s%s%s</nav>',
|
||||
$darkMode ? 'bg-primary' : 'bg-dark',
|
||||
$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
|
||||
);
|
||||
|
|
|
@ -36,7 +36,7 @@ if (isset($menu[$metaGroup])) {
|
|||
echo sprintf(
|
||||
'<div class="dropdown show">%s%s</div>',
|
||||
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')
|
||||
),
|
||||
sprintf(
|
||||
|
|
|
@ -5,7 +5,7 @@ $backgroundColour = $darkMode ? 'bg-dark' : 'bg-light';
|
|||
if (isset($menu[$metaGroup])) {
|
||||
foreach ($menu[$metaGroup] as $scope => $scopeData) {
|
||||
$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['class']) ? '' : h($scopeData['class']),
|
||||
$backgroundColour,
|
||||
|
@ -36,9 +36,9 @@ if (isset($menu[$metaGroup])) {
|
|||
}
|
||||
$active = ($scope === $this->request->getParam('controller') && $action === $this->request->getParam('action'));
|
||||
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 {
|
||||
$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(
|
||||
$link_template,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<span class="app-icon w-100 h-100" title="<?= __('Cerebrate') ?>"></span>
|
||||
</div>
|
||||
</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>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
'wrapper' => sprintf(
|
||||
'<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}}',
|
||||
'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']), [
|
||||
'title' => h($entry['label']),
|
||||
'templateVars' => [
|
||||
'linkClass' => $i == 0 ? 'font-weight-light' : '',
|
||||
'linkClass' => $i == 0 ? 'fw-light' : '',
|
||||
'icon' => !empty($entry['icon']) ? $this->FontAwesome->getClass(h($entry['icon'])) : ''
|
||||
]
|
||||
]);
|
||||
|
@ -78,7 +78,7 @@
|
|||
|
||||
<?php if (!empty($breadcrumbAction)): ?>
|
||||
<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') ?>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuBreadcrumbAction">
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
use Cake\Routing\Router;
|
||||
?>
|
||||
<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>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<?php if (empty($notifications)): ?>
|
||||
<h6 class="dropdown-header"><?= __('- No notification -') ?></h6>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
use Cake\Routing\Router;
|
||||
?>
|
||||
<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>
|
||||
</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>
|
||||
<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') ?>
|
||||
</a>
|
||||
<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') ?>
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<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') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
<input type="text" class="form-control d-inline-block" id="globalSearch" placeholder="<?= __('Search in Cerebrate...') ?>">
|
||||
<i class="icon <?= $this->FontAwesome->getClass('search') ?>"></i>
|
||||
</span>
|
||||
<button type="button" class="dropdown-toggle d-none" id="dropdownMenuSearchAll" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-reference="parent"></button>
|
||||
<div class="global-search-result-container dropdown-menu dropdown-menu-right p-0 pt-2" aria-labelledby="dropdownMenuSearchAll">
|
||||
<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-end p-0 pt-2" aria-labelledby="dropdownMenuSearchAll">
|
||||
</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-profile') ?>
|
||||
</div>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
?>
|
||||
|
||||
<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>
|
||||
<span class="text"><?= h($label) ?></span>
|
||||
</a>
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><?= h($title) ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
@ -16,7 +15,7 @@
|
|||
['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>
|
||||
|
|
|
@ -85,11 +85,11 @@ echo $this->Bootstrap->modal([
|
|||
|
||||
function addControlRow($filteringTable) {
|
||||
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 => {
|
||||
$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([
|
||||
$('<option/>').text('=').val('='),
|
||||
$('<option/>').text('!=').val('!='),
|
||||
|
@ -111,7 +111,7 @@ echo $this->Bootstrap->modal([
|
|||
}
|
||||
|
||||
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([
|
||||
$('<option/>').text('=').val('='),
|
||||
$('<option/>').text('!=').val('!='),
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<?= $this->fetch('title') ?>
|
||||
</title>
|
||||
<?= $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('main.css') ?>
|
||||
<?= $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 {
|
||||
/* text-decoration: none; */
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.header-breadcrumb-children {
|
||||
|
@ -473,6 +473,6 @@ ul.sidebar-elements > li.category > span.category-divider > hr {
|
|||
}
|
||||
|
||||
.composed-app-icon-container > .app-icon:hover {
|
||||
mask-position: 0 0, 2.4px 23.5px;
|
||||
-webkit-mask-position: 0 0, 2.4px 23.5px;
|
||||
mask-position: 0 0, 2.4px 21px;
|
||||
-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 {
|
||||
width: 100%;
|
||||
max-width: 330px;
|
||||
padding: 15px;
|
||||
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)
|
||||
}
|
||||
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)
|
||||
}
|
||||
$toast.append($toastHeader)
|
||||
|
@ -510,13 +510,14 @@ class ModalFactory {
|
|||
'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 */
|
||||
makeModal() {
|
||||
if (this.isValid()) {
|
||||
this.$modal = this.buildModal()
|
||||
$('#mainModalContainer').append(this.$modal)
|
||||
this.modalInstance = new bootstrap.Modal(this.$modal[0], this.bsModalOptions)
|
||||
} else {
|
||||
console.log('Modal not valid')
|
||||
}
|
||||
|
@ -526,7 +527,8 @@ class ModalFactory {
|
|||
show() {
|
||||
if (this.isValid()) {
|
||||
var that = this
|
||||
this.$modal.modal(this.bsModalOptions)
|
||||
this.modalInstance.show()
|
||||
this.$modal
|
||||
.on('hidden.bs.modal', function () {
|
||||
that.removeModal()
|
||||
that.options.hiddenCallback(that)
|
||||
|
@ -537,6 +539,17 @@ class ModalFactory {
|
|||
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 {
|
||||
console.log('Modal not valid')
|
||||
}
|
||||
|
@ -544,7 +557,8 @@ class ModalFactory {
|
|||
|
||||
/** Hide the modal using the bootstrap modal's hide command */
|
||||
hide() {
|
||||
this.$modal.modal('hide')
|
||||
// this.$modal.modal('hide')
|
||||
this.modalInstance.hide()
|
||||
}
|
||||
|
||||
/** Remove the modal from the DOM */
|
||||
|
@ -567,7 +581,7 @@ class ModalFactory {
|
|||
* @return {jQuery} The modal jQuery object
|
||||
*/
|
||||
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) {
|
||||
$modal.attr('id', this.options.id)
|
||||
$modal.attr('aria-labelledby', this.options.id)
|
||||
|
@ -642,7 +656,7 @@ class ModalFactory {
|
|||
getFooterOkOnly() {
|
||||
return [
|
||||
$('<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() {
|
||||
let variant = this.options.type.split('-')[1]
|
||||
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)
|
||||
.click(
|
||||
(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>')
|
||||
.addClass('btn-' + variant)
|
||||
.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))
|
||||
return [$buttonCancel, $buttonConfirm]
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue