mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
official additioin + zero bonus
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Filament\OptionsTrait;
|
||||
use App\Filament\Resources\System\SettingResource;
|
||||
use App\Models\HitAndRun;
|
||||
use App\Models\Setting;
|
||||
use App\Models\Tag;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Forms\ComponentContainer;
|
||||
use Filament\Forms\Concerns\InteractsWithForms;
|
||||
|
||||
+3
-1
@@ -211,7 +211,7 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
'id', 'username', 'email', 'class', 'status', 'added', 'avatar',
|
||||
'uploaded', 'downloaded', 'seedbonus', 'seedtime', 'leechtime',
|
||||
'invited_by', 'enabled', 'seed_points', 'last_access', 'invites',
|
||||
'lang', 'attendance_card', 'privacy', 'noad', 'downloadpos',
|
||||
'lang', 'attendance_card', 'privacy', 'noad', 'downloadpos', 'donoruntil', 'donor'
|
||||
];
|
||||
|
||||
public static function getDefaultUserAttributes(): array
|
||||
@@ -535,4 +535,6 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -154,5 +154,20 @@ class TagRepository extends BaseRepository
|
||||
return self::$allTags;
|
||||
}
|
||||
|
||||
public function buildSelect($name, $value): string
|
||||
{
|
||||
$list = $this->listAll();
|
||||
$select = sprintf('<select name="%s"><option value="">%s</option>', $name, nexus_trans('nexus.select_one_please'));
|
||||
foreach ($list as $item) {
|
||||
$selected = '';
|
||||
if ($item->id == $value) {
|
||||
$selected = ' selected';
|
||||
}
|
||||
$select .= sprintf('<option value="%s"%s>%s</option>', $item->id, $selected, $item->name);
|
||||
}
|
||||
$select .= '</select>';
|
||||
return $select;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user