forked from pkp/pkp-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* pkp#5885 Review remainder update * pkp#5885 Review remainder update issues fixed * pkp#5885 typo fixed * pkp#5885 update remainder calculation * pkp#5885 removed unnecessary select from migration * pkp#5885 updated and added new from component to handle reminder * pkp#5885 removed unnecessary fields and controls with field range component enhancement * pkp#5885 updated using new slider component * pkp#5885 updated job class properties to public * pkp#5885 updated date validation rules to enum * pkp#5885 fixed displaying error on date comparison validation failure * pkp#5885 test added for queue job * pkp#5885 added mocked context service and context class for job testing * pkp#5885 added context checking first if available to resolve context path before resolving from request * pkp#5885 job test update * pkp#5885 job test update * pkp#5885 removed mistakenly pulled BaseInvitation during rebase * pkp#5885 updated job and test based on new inviation functionality implementation * pkp#5885 updated task * pkp#5885 translation update * pkp#5885 tests updated and removed reference of deprecated Services class * pkp#5885 test update * pkp#5885 test update
- Loading branch information
1 parent
a1f2666
commit 41b38eb
Showing
21 changed files
with
804 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
/** | ||
* @file classes/form/validation/FormValidatorDateCompare.php | ||
* | ||
* Copyright (c) 2014-2024 Simon Fraser University | ||
* Copyright (c) 2000-2024 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class FormValidatorDateCompare | ||
* | ||
* @ingroup form_validation | ||
* | ||
* @see FormValidator | ||
* | ||
* @brief Form validation to validation comparison rule for a date field | ||
*/ | ||
|
||
namespace PKP\form\validation; | ||
|
||
use PKP\form\Form; | ||
use PKP\validation\ValidatorDateComparison; | ||
use PKP\validation\enums\DateComparisonRule; | ||
use Carbon\Carbon; | ||
use DateTimeInterface; | ||
|
||
class FormValidatorDateCompare extends FormValidator | ||
{ | ||
/** | ||
* Constructor. | ||
* | ||
* @param Form $form the associated form | ||
* @param string $field the name of the associated field | ||
* @param DateTimeInterface|Carbon $comparingDate the comparing date | ||
* @param DateComparisonRule $comparingRule the comparing rule | ||
* @param string $type the type of check, either "required" or "optional" | ||
* @param string $message the error message for validation failures (i18n key) | ||
*/ | ||
public function __construct(&$form, $field, $comparingDate, $comparingRule, $type = 'optional', $message = 'validator.date.comparison') | ||
{ | ||
$validator = new ValidatorDateComparison($comparingDate, $comparingRule); | ||
parent::__construct($form, $field, $type, $message, $validator); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
classes/migration/upgrade/v3_5_0/I5885_RenameReviewReminderSettingsName.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
/** | ||
* @file classes/migration/upgrade/v3_5_0/I5885_RenameReviewReminderSettingsName.php | ||
* | ||
* Copyright (c) 2014-2024 Simon Fraser University | ||
* Copyright (c) 2000-2024 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class I5885_RenameReviewReminderSettingsName | ||
* | ||
* @brief Rename the review reminder settings name | ||
*/ | ||
|
||
namespace PKP\migration\upgrade\v3_5_0; | ||
|
||
use Illuminate\Support\Facades\DB; | ||
use PKP\migration\Migration; | ||
|
||
abstract class I5885_RenameReviewReminderSettingsName extends Migration | ||
{ | ||
abstract protected function getContextSettingsTable(): string; | ||
|
||
/** | ||
* Run the migration. | ||
*/ | ||
public function up(): void | ||
{ | ||
DB::table($this->getContextSettingsTable()) | ||
->where('setting_name', 'numDaysBeforeInviteReminder') | ||
->update([ | ||
'setting_name' => 'numDaysAfterReviewResponseReminderDue' | ||
]); | ||
|
||
DB::table($this->getContextSettingsTable()) | ||
->where('setting_name', 'numDaysBeforeSubmitReminder') | ||
->update([ | ||
'setting_name' => 'numDaysAfterReviewSubmitReminderDue' | ||
]); | ||
} | ||
|
||
/** | ||
* Reverse the migration | ||
*/ | ||
public function down(): void | ||
{ | ||
DB::table($this->getContextSettingsTable()) | ||
->where('setting_name', 'numDaysAfterReviewResponseReminderDue') | ||
->update([ | ||
'setting_name' => 'numDaysBeforeInviteReminder' | ||
]); | ||
|
||
DB::table($this->getContextSettingsTable()) | ||
->where('setting_name', 'numDaysAfterReviewSubmitReminderDue') | ||
->update([ | ||
'setting_name' => 'numDaysBeforeSubmitReminder' | ||
]); | ||
} | ||
} |
Oops, something went wrong.