Browse Source

backports murph-skeleton

develop
Simon Vieille 1 month ago
parent
commit
af4dbaa570
  1. 7
      assets/css/admin.scss
  2. 8
      core/Command/UserCreateCommand.php
  3. 4
      core/Resources/views/form/bootstrap_4_form_theme.html.twig

7
assets/css/admin.scss

@ -258,6 +258,13 @@ th {
}
}
.bg-tiles {
background-color: #c1c1c1;
background-image: linear-gradient(45deg, #646464 25%, transparent 25%, transparent 75%, #646464 75%), linear-gradient(45deg, #646464 25%, transparent 25%, transparent 75%, #646464 75%);
background-size: 20px 20px;
background-position: 0 0, 10px 10px;
}
.tab-form {
padding: 15px;
}

8
core/Command/UserCreateCommand.php

@ -42,7 +42,13 @@ class UserCreateCommand extends Command
$emailQuestion = new Question('E-mail: ');
$emailQuestion->setValidator(function ($value) {
return !empty($value);
if (empty($value)) {
throw new \RuntimeException(
'The email must not be empty.'
);
}
return $value;
});
$passwordQuestion = new Question('Password (leave empty to generate a random password): ');

4
core/Resources/views/form/bootstrap_4_form_theme.html.twig

@ -6,9 +6,9 @@
{% set value = form.vars.data %}
{% if value %}
{% if value and value.extension in ['jpeg', 'jpg', 'gif', 'png'] %}
{% if value and value.extension in ['jpeg', 'jpg', 'gif', 'png', 'svg'] %}
<div class="card">
<div class="card-img-top bg-dark text-center">
<div class="card-img-top bg-tiles text-center">
<a href="{{ asset(value.pathname) }}" target="_blank">
<img src="{{ asset(value.pathname) }}" class="img-fluid">
</a>

Loading…
Cancel
Save