mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-14 04:14:36 +02:00
Added a very basic modal on part info page for changing part instock
Related to issue #201
This commit is contained in:
parent
0e020dab74
commit
ba4085d882
7 changed files with 488 additions and 4 deletions
|
@ -38,21 +38,21 @@ class StorelocationAdminForm extends BaseEntityAdminForm
|
|||
'required' => false,
|
||||
'label' => 'storelocation.edit.is_full.label',
|
||||
'help' => 'storelocation.edit.is_full.help',
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||
]);
|
||||
|
||||
$builder->add('limit_to_existing_parts', CheckboxType::class, [
|
||||
'required' => false,
|
||||
'label' => 'storelocation.limit_to_existing.label',
|
||||
'help' => 'storelocation.limit_to_existing.help',
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||
]);
|
||||
|
||||
$builder->add('only_single_part', CheckboxType::class, [
|
||||
'required' => false,
|
||||
'label' => 'storelocation.only_single_part.label',
|
||||
'help' => 'storelocation.only_single_part.help',
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||
]);
|
||||
|
||||
$builder->add('storage_type', StructuralEntityType::class, [
|
||||
|
@ -61,7 +61,7 @@ class StorelocationAdminForm extends BaseEntityAdminForm
|
|||
'help' => 'storelocation.storage_type.help',
|
||||
'class' => MeasurementUnit::class,
|
||||
'disable_not_selectable' => true,
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue