This commit is contained in:
Joey Kimsey
2025-01-01 22:17:38 -05:00
parent ccc134d1b2
commit 1ef85c6c2c
65 changed files with 1200 additions and 215 deletions

View File

@ -25,6 +25,7 @@ class ReviewForms extends Forms {
self::addHandler( 'editReview', __CLASS__, 'editReview' );
self::addHandler( 'categoryCreate', __CLASS__, 'categoryCreate' );
self::addHandler( 'categoryEdit', __CLASS__, 'categoryEdit' );
self::addHandler( 'reviewEditPublic', __CLASS__, 'reviewEditPublic' );
}
/**
@ -88,6 +89,21 @@ class ReviewForms extends Forms {
}
return true;
}
public static function reviewEditPublic() {
if ( ! Input::exists( 'review' ) ) {
Check::addUserError( 'You must provide a review.' );
return false;
}
if ( ! Input::exists( 'title' ) ) {
Check::addUserError( 'You must provide a title.' );
return false;
}
if ( ! Input::exists( 'rating' ) ) {
Check::addUserError( 'You must provide a rating.' );
return false;
}
return true;
}
}
new ReviewForms;