You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
151 lines
4.9 KiB
151 lines
4.9 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage
|
|
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="YOUserbase.CreateUserPage"
|
|
x:DataType="ContentPage"
|
|
x:Name="contentPage"
|
|
Title="Create a new user">
|
|
<ContentPage.Resources>
|
|
<Style
|
|
x:Key="InvalidEntryStyle"
|
|
TargetType="Entry">
|
|
<Setter
|
|
Property="BackgroundColor"
|
|
Value="Red" />
|
|
</Style>
|
|
<Style
|
|
x:Key="ValidEntryStyle"
|
|
TargetType="Entry">
|
|
<!--<Setter Property="TextColor" Value="Green" />-->
|
|
</Style>
|
|
</ContentPage.Resources>
|
|
|
|
<ScrollView>
|
|
<VerticalStackLayout
|
|
Spacing="25"
|
|
Padding="300,60">
|
|
<Label
|
|
x:Name="lblFirstname"
|
|
Text="First name:" />
|
|
<Entry
|
|
x:Name="FirstnameEntry"
|
|
HorizontalOptions="FillAndExpand" />
|
|
<Label
|
|
x:Name="errFirstname"
|
|
TextColor="Red" />
|
|
|
|
<Label
|
|
x:Name="lblLastname"
|
|
Text="Family name:" />
|
|
<Entry
|
|
x:Name="LastnameEntry"
|
|
HorizontalOptions="FillAndExpand" />
|
|
<Label
|
|
x:Name="errLastname"
|
|
TextColor="Red" />
|
|
|
|
<Label
|
|
x:Name="lblBirthDate"
|
|
Text="Birth date:" />
|
|
<DatePicker
|
|
x:Name="birthdatePicker"
|
|
MaximumDate="1/1/2023" />
|
|
<Label
|
|
x:Name="errBirthDate"
|
|
TextColor="Red" />
|
|
|
|
<Picker
|
|
x:Name="groupPicker"
|
|
Title="Select working group" />
|
|
<Label
|
|
x:Name="errGroup"
|
|
TextColor="Red" />
|
|
|
|
<HorizontalStackLayout
|
|
Spacing="10">
|
|
<Switch
|
|
x:Name="FullTimeSwitch"
|
|
IsToggled="True"
|
|
VerticalOptions="Center" />
|
|
<Label
|
|
x:Name="lblSwitch"
|
|
Text="Full employment"
|
|
VerticalOptions="Center">
|
|
<Label.Triggers>
|
|
<DataTrigger
|
|
TargetType="Label"
|
|
Binding="{Binding Source={x:Reference FullTimeSwitch}, Path=IsToggled}"
|
|
Value="true">
|
|
<Setter
|
|
Property="Text"
|
|
Value="Partial employment" />
|
|
</DataTrigger>
|
|
</Label.Triggers>
|
|
</Label>
|
|
</HorizontalStackLayout>
|
|
|
|
<Label
|
|
x:Name="lblDetails"
|
|
Text="Additional details:" />
|
|
<Entry
|
|
x:Name="DetailsEntry"
|
|
Text="" />
|
|
<Label
|
|
x:Name="errDetails"
|
|
TextColor="Red" />
|
|
|
|
<Label
|
|
x:Name="lblCheckbox"
|
|
Text="Check the correct information for this user" />
|
|
<HorizontalStackLayout
|
|
Spacing="10">
|
|
<CheckBox
|
|
x:Name="IsExternalCheck"
|
|
IsChecked="False"
|
|
VerticalOptions="Center" />
|
|
<Label
|
|
x:Name="lblExternal"
|
|
Text="Works external"
|
|
VerticalOptions="Center" />
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout
|
|
Spacing="10">
|
|
<CheckBox
|
|
x:Name="IsRemoteCheck"
|
|
IsChecked="False"
|
|
VerticalOptions="Center" />
|
|
<Label
|
|
x:Name="lblRemote"
|
|
Text="Works remotely"
|
|
VerticalOptions="Center" />
|
|
</HorizontalStackLayout>
|
|
|
|
<Label
|
|
x:Name="lblNbProjects"
|
|
Text="This user is currently working in how many projects" />
|
|
<HorizontalStackLayout
|
|
Spacing="10">
|
|
<Stepper
|
|
x:Name="NbProjectsStepper"
|
|
Maximum="10"
|
|
Minimum="0"
|
|
Increment="1"
|
|
Value="1"
|
|
ValueChanged="OnStepperChanged"
|
|
VerticalOptions="Center" />
|
|
<Label
|
|
x:Name="lblNbProj"
|
|
Text="1"
|
|
VerticalOptions="Center" />
|
|
</HorizontalStackLayout>
|
|
|
|
<Button
|
|
x:Name="btnCreate"
|
|
Text="Create"
|
|
Clicked="OnCreateClicked" />
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
|
|
</ContentPage>
|