diff --git a/Controller/ManageController.php b/Controller/ManageController.php index f61abb9..f51028c 100644 --- a/Controller/ManageController.php +++ b/Controller/ManageController.php @@ -133,7 +133,9 @@ public function update(Request $request) $this->flashError($this->translator->trans('shared_project_timesheets.manage.persist.error')); } } else if ( !$form->isSubmitted() ) { - $form->get('password')->setData(ManageService::PASSWORD_DO_NOT_CHANGE_VALUE); + if ( !empty($sharedProject->getPassword()) ) { + $form->get('password')->setData(ManageService::PASSWORD_DO_NOT_CHANGE_VALUE); + } } return $this->render( diff --git a/Migrations/Version2020120600000.php b/Migrations/Version2020120600000.php index 90b176b..23445ac 100644 --- a/Migrations/Version2020120600000.php +++ b/Migrations/Version2020120600000.php @@ -24,7 +24,7 @@ public function up(Schema $schema): void $table->addColumn('id', Types::INTEGER, ['autoincrement' => true, 'notnull' => true]); $table->addColumn('project_id', Types::INTEGER, ['notnull' => true]); $table->addColumn('share_key', Types::STRING, ['length' => 20, 'notnull' => true]); - $table->addColumn('password', Types::STRING, ['length' => 50, 'default' => null, 'notnull' => false]); + $table->addColumn('password', Types::STRING, ['length' => 255, 'default' => null, 'notnull' => false]); $table->addColumn('entry_user_visible', Types::BOOLEAN, ['default' => false, 'notnull' => true]); $table->addColumn('entry_rate_visible', Types::BOOLEAN, ['default' => false, 'notnull' => true]);