0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-03-26 17:58:43 +00:00

add account number to user edit form

This commit is contained in:
Kevin Papst 2021-07-18 22:16:58 +02:00
parent 4d3bd1da64
commit ce529ee393
3 changed files with 15 additions and 3 deletions

View file

@ -234,7 +234,7 @@ class User implements UserInterface, EquatableInterface, \Serializable
*
* @var string|null
* @ORM\Column(name="account", type="string", length=30, nullable=true)
* @Assert\Length(allowEmptyString=true, max="30")
* @Assert\Length(allowEmptyString=true, max="30", groups={"Registration", "UserCreate", "Profile"})
*/
private $accountNumber;
/**

View file

@ -49,6 +49,10 @@ class UserEditType extends AbstractType
'label' => 'label.title',
'required' => false,
])
->add('accountNumber', TextType::class, [
'label' => 'label.account_number',
'required' => false,
])
;
if ($this->configuration->isThemeAllowAvatarUrls()) {

View file

@ -8,13 +8,21 @@
{% block box_body %}
{{ form_start(form) }}
<div class="row">
<div class="col-md-10">
<div class="col-md-9">
{{ form_row(form.alias) }}
</div>
<div class="col-md-2">
<div class="col-md-3">
{{ form_row(form.color) }}
</div>
</div>
<div class="row">
<div class="col-md-9">
{{ form_row(form.title) }}
</div>
<div class="col-md-3">
{{ form_row(form.accountNumber) }}
</div>
</div>
{{ form_widget(form) }}
<input type="submit" value="{{ 'action.save'|trans }}" class="btn btn-primary" />
{{ form_end(form) }}