@@ -311,6 +311,9 @@ class="fb-cta cta--yellow"
311311 ' bases_cycle' => Configuration :: gen(' bases_cycle' ),
312312 ' start_ts' => Configuration :: gen(' start_ts' ),
313313 ' end_ts' => Configuration :: gen(' end_ts' ),
314+ ' custom_logo' => Configuration :: gen(' custom_logo' ),
315+ ' custom_text' => Configuration :: gen(' custom_text' ),
316+ ' custom_logo_image' => Configuration :: gen(' custom_logo_image' ),
314317 };
315318
316319 $results = await \HH \Asio \ m ($awaitables );
@@ -335,6 +338,9 @@ class="fb-cta cta--yellow"
335338 $bases_cycle = $results [' bases_cycle' ];
336339 $start_ts = $results [' start_ts' ];
337340 $end_ts = $results [' end_ts' ];
341+ $custom_logo = $results [' custom_logo' ];
342+ $custom_text = $results [' custom_text' ];
343+ $custom_logo_image = $results [' custom_logo_image' ];
338344
339345 $registration_on = $registration -> getValue() === ' 1' ;
340346 $registration_off = $registration -> getValue() === ' 0' ;
@@ -354,6 +360,8 @@ class="fb-cta cta--yellow"
354360 $gameboard_off = $gameboard -> getValue() === ' 0' ;
355361 $timer_on = $timer -> getValue() === ' 1' ;
356362 $timer_off = $timer -> getValue() === ' 0' ;
363+ $custom_logo_on = $custom_logo -> getValue() === ' 1' ;
364+ $custom_logo_off = $custom_logo -> getValue() === ' 0' ;
357365
358366 $game_start_array = array ();
359367 if ($start_ts -> getValue() !== ' 0' && $start_ts -> getValue() !== ' NaN' ) {
@@ -437,7 +445,6 @@ class="fb-cta cta--yellow"
437445 $language_select = $results [' language_select' ];
438446 $password_types_select = $results [' password_types_select' ];
439447
440- $login_strongpasswords = await Configuration :: gen(' login_strongpasswords' );
441448 if ($login_strongpasswords -> getValue() === ' 0' ) { // Strong passwords are not enforced
442449 $strong_passwords = <div ></div > ;
443450 } else {
@@ -448,6 +455,33 @@ class="fb-cta cta--yellow"
448455 </div > ;
449456 }
450457
458+ if ($custom_logo -> getValue() === ' 0' ) { // Custom branding is not enabled
459+ $custom_logo_xhp = <div ></div > ;
460+ } else {
461+ $custom_logo_xhp =
462+ <div class = " form-el el--block-label el--full-text" >
463+ <label for = " " >{ tr (' Logo' )} </label >
464+ <img
465+ id = " custom-logo-image"
466+ class = " icon--badge"
467+ src = { $custom_logo_image -> getValue()}
468+ />
469+ <br />
470+ <h6 >
471+ <a class = " icon-text" href = " #" id = " custom-logo-link" >
472+ { tr (' Change' )}
473+ </a >
474+ </h6 >
475+ <input
476+ autocomplete = " off"
477+ name = " custom-logo-input"
478+ id = " custom-logo-input"
479+ type = " file"
480+ accept = " image/*"
481+ />
482+ </div > ;
483+ }
484+
451485 return
452486 <div >
453487 <header class = " admin-page-header" >
@@ -914,11 +948,59 @@ class="fb-cta cta--yellow"
914948 </section >
915949 <section class = " admin-box" >
916950 <header class = " admin-box-header" >
917- <h3 >{ tr (' Language' )} </h3 >
951+ <h3 >{ tr (' Internationalization' )} </h3 >
952+ </header >
953+ <div class = " fb-column-container" >
954+ <div class = " col col-pad col-2-4" >
955+ <div class = " form-el el--block-label" >
956+ <label for = " " >{ tr (' Language' )} </label >
957+ { $language_select }
958+ </div >
959+ </div >
960+ </div >
961+ </section >
962+ <section class = " admin-box" >
963+ <header class = " admin-box-header" >
964+ <h3 >{ tr (' Branding' )} </h3 >
918965 </header >
919- <div class = " col col-pad col-1-2" >
920- <div class = " form-el el--block-label el--full-text" >
921- { $language_select }
966+ <div class = " fb-column-container" >
967+ <div class = " col col-pad col-1-3" >
968+ <div class = " form-el el--block-label" >
969+ <label >{ tr (' Custom Logo' )} </label >
970+ <div class = " admin-section-toggle radio-inline" >
971+ <input
972+ type = " radio"
973+ name = " fb--conf--custom_logo"
974+ id = " fb--conf--custom_logo--on"
975+ checked = { $custom_logo_on }
976+ />
977+ <label for = " fb--conf--custom_logo--on" >
978+ { tr (' On' )}
979+ </label >
980+ <input
981+ type = " radio"
982+ name = " fb--conf--custom_logo"
983+ id = " fb--conf--custom_logo--off"
984+ checked = { $custom_logo_off }
985+ />
986+ <label for = " fb--conf--custom_logo--off" >
987+ { tr (' Off' )}
988+ </label >
989+ </div >
990+ </div >
991+ </div >
992+ <div class = " col col-pad col-1-3" >
993+ { $custom_logo_xhp }
994+ </div >
995+ <div class = " col col-pad col-1-3" >
996+ <div class = " form-el el--block-label el--full-text" >
997+ <label for = " " >{ tr (' Custom Text' )} </label >
998+ <input
999+ type = " text"
1000+ name = " fb--conf--custom_text"
1001+ value = { $custom_text -> getValue()}
1002+ />
1003+ </div >
9221004 </div >
9231005 </div >
9241006 </section >
@@ -3718,6 +3800,7 @@ public function renderMainContent(): :xhp {
37183800 { tr (' Begin Game' )}
37193801 </a > ;
37203802 }
3803+ $branding_xhp = await $this -> genRenderBranding();
37213804 return
37223805 <div id = " fb-admin-nav" class = " admin-nav-bar fb-row-container" >
37233806 <header class = " admin-nav-header row-fixed" >
@@ -3790,7 +3873,7 @@ public function renderMainContent(): :xhp {
37903873 <a href = " /index.php?p=game" >{ tr (' Gameboard' )} </a >
37913874 <a href = " " class = " js-prompt-logout" >{ tr (' Logout' )} </a >
37923875 <a ></a >
3793- < fbbranding />
3876+ { $branding_xhp }
37943877 </div >
37953878 </div > ;
37963879 }
0 commit comments