Skip to content

Commit

Permalink
improvements of style (#427)
Browse files Browse the repository at this point in the history
- discard line before save button
- move row/column formatting from main view to meta view (gives more uniform look)
  • Loading branch information
dgvirtual authored Mar 11, 2024
1 parent af26c60 commit bd1b1bf
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/Users/Views/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<input type="hidden" name="id" value="<?= $user->id ?>">
<?php endif ?>

<fieldset>
<fieldset class="first">
<legend>Basic Info</legend>

<div class="row">
Expand Down Expand Up @@ -153,9 +153,7 @@ class="form-control form-control-sm x-cloak"
</fieldset>

<!-- User Meta Fields -->
<div class="row">
<?= view_cell('\Bonfire\Users\Libraries\UserCells::metaFormFields') ?>
</div>

<div class="text-end py-3">
<input type="submit" value="Save User" class="btn btn-primary btn-lg">
Expand Down
4 changes: 4 additions & 0 deletions src/Users/Views/meta/list.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php if (isset($fieldGroups) && count($fieldGroups)) : ?>
<?php foreach ($fieldGroups as $group => $fields) : ?>
<fieldset>
<div class="row">
<div class="col">
<legend><?= esc($group) ?></legend>

<?php foreach ($fields as $field => $info) : ?>
Expand Down Expand Up @@ -44,6 +46,8 @@ class="form-check-label"><?= esc(ucwords(strtolower(str_replace(['-', '_'], ' ',
</div>
<?php endif ?>
<?php endforeach ?>
</div>
</div>
</fieldset>
<?php endforeach ?>
<?php endif ?>
2 changes: 1 addition & 1 deletion src/Users/Views/permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<form action="<?= current_url() ?>" method="post">
<?= csrf_field() ?>

<fieldset>
<fieldset class="first">
<legend>User Permissions</legend>

<p>These permissions are applied in addition to any allowed by the user's groups.
Expand Down
2 changes: 1 addition & 1 deletion src/Users/Views/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<x-admin-box>

<fieldset>
<fieldset class="first">

<legend>Change password</legend>
<?= view('Bonfire\Users\Views\password_change', ['user' => $user ?? null]) ?>
Expand Down
2 changes: 1 addition & 1 deletion src/Users/Views/user_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<form action="<?= site_url(ADMIN_AREA . '/settings/users') ?>" method="post">
<?= csrf_field() ?>

<fieldset>
<fieldset class="first">
<legend>Registration</legend>

<div class="row">
Expand Down
18 changes: 15 additions & 3 deletions themes/Admin/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,17 @@ label.form-label {
}

fieldset {
border-bottom: solid 1px var(--bf-light-grey);
padding-bottom: 2rem;
border-top: solid 1px var(--bf-light-grey);
padding-bottom: 1rem;
padding-top:0.5rem;
margin-bottom: 1rem;
}

fieldset.first {
border-top: solid 0px;
padding-top: 0;
}

input[type="checkbox"]:indeterminate {
opacity: 0.3;
}
Expand Down Expand Up @@ -462,6 +468,7 @@ input[type="checkbox"]:indeterminate {
align-items: center;
justify-content: center;
}

/*
* --------------------------------------------------------------------------
* DASHBOARD
Expand All @@ -476,6 +483,7 @@ input[type="checkbox"]:indeterminate {
display: inline-block;
height: 100px;
}

.quick-link a {
color: var(--bf-black);
text-decoration: none;
Expand All @@ -489,10 +497,12 @@ input[type="checkbox"]:indeterminate {
display: inline-block;
opacity: 0.5;
}

.quick-link a:hover {
opacity: 1.0;
box-shadow: 0 0 0.5rem rgba(0, 0, 0, .1) ;
box-shadow: 0 0 0.5rem rgba(0, 0, 0, .1);
}

.quick-link a i {
display: block;
}
Expand All @@ -509,9 +519,11 @@ input[type="checkbox"]:indeterminate {
text-align: center;
opacity: 0.7;
}

.alert-offline:hover {
opacity: 1.0;
}

.main.offline {
top: 37px;
}
Expand Down

0 comments on commit bd1b1bf

Please sign in to comment.