register form now has optional field role
This commit is contained in:
@@ -39,7 +39,7 @@ pub fn render_register(
|
||||
let chunks = Layout::default()
|
||||
.direction(Direction::Vertical)
|
||||
.constraints([
|
||||
Constraint::Length(6), // Form (4 fields + padding)
|
||||
Constraint::Length(7), // Form (5 fields + padding)
|
||||
Constraint::Length(1), // Error message
|
||||
Constraint::Length(3), // Buttons
|
||||
])
|
||||
@@ -55,6 +55,7 @@ pub fn render_register(
|
||||
"Email (Optional)",
|
||||
"Password (Optional)",
|
||||
"Confirm Password",
|
||||
"Role (Optional)",
|
||||
],
|
||||
&state.current_field,
|
||||
&[ // Update values from RegisterState
|
||||
@@ -62,6 +63,7 @@ pub fn render_register(
|
||||
&state.email,
|
||||
&state.password,
|
||||
&state.password_confirmation,
|
||||
&state.role,
|
||||
],
|
||||
theme,
|
||||
is_edit_mode,
|
||||
|
||||
Reference in New Issue
Block a user