-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split KratosUiNodeInput view into multiple views
- Loading branch information
Showing
11 changed files
with
225 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/Anchor.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@model KratosUiNode | ||
|
||
@{ | ||
var attributes = Model.Attributes.GetKratosUiNodeAnchorAttributes(); | ||
} | ||
|
||
<div class="field"> | ||
<div class="is-fullwidth has-text-centered"> | ||
<a href="@attributes.Href" id="@attributes.Id">@attributes.Title.Text</a> | ||
</div> | ||
@foreach (var message in Model.Messages) | ||
{ | ||
<KratosUiTextMessage Message="@message"/> | ||
} | ||
</div> |
101 changes: 1 addition & 100 deletions
101
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/Default.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/Img.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@model KratosUiNode | ||
|
||
@{ | ||
var attributes = Model.Attributes.GetKratosUiNodeImageAttributes(); | ||
} | ||
|
||
<div class="field"> | ||
<img src="@attributes.Src" class="image" height="@attributes.Height" width="@attributes.Width" | ||
id="@attributes.Id" alt="image"/> | ||
@foreach (var message in Model.Messages) | ||
{ | ||
<KratosUiTextMessage Message="@message"/> | ||
} | ||
</div> |
22 changes: 22 additions & 0 deletions
22
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/InputButton.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@model KratosUiNode | ||
|
||
@{ | ||
var attributes = Model.Attributes.GetKratosUiNodeInputAttributes(); | ||
var label = attributes.Label ?? Model.Meta.Label; | ||
} | ||
|
||
<div class="field"> | ||
<div class="control mt-5"> | ||
<button type="button" class="button is-light is-fullwidth" | ||
required="@attributes.Required" | ||
value="@attributes.Value" autocomplete="@attributes.Autocomplete" | ||
disabled="@attributes.Disabled" name="@attributes.Name" | ||
onclick="@attributes.Onclick" pattern="@attributes.Pattern"> | ||
@label?.Text | ||
</button> | ||
</div> | ||
@foreach (var message in Model.Messages) | ||
{ | ||
<KratosUiTextMessage Message="@message"/> | ||
} | ||
</div> |
26 changes: 26 additions & 0 deletions
26
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/InputCheckbox.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@model KratosUiNode | ||
|
||
@{ | ||
var attributes = Model.Attributes.GetKratosUiNodeInputAttributes(); | ||
var label = attributes.Label ?? Model.Meta.Label; | ||
} | ||
|
||
<div class="field"> | ||
<input type="checkbox" class="input" | ||
required="@attributes.Required" | ||
value="@attributes.Value" autocomplete="@attributes.Autocomplete.ToString()?.ToLower()" | ||
disabled="@attributes.Disabled" name="@attributes.Name" | ||
onclick="@attributes.Onclick" pattern="@attributes.Pattern"/> | ||
@switch (attributes.Type) | ||
{ | ||
case KratosUiNodeInputAttributes.TypeEnum.Checkbox: | ||
break; | ||
default: | ||
<p>Unsupported Input Type: @attributes.Type</p> | ||
break; | ||
} | ||
@foreach (var message in Model.Messages) | ||
{ | ||
<KratosUiTextMessage Message="@message"/> | ||
} | ||
</div> |
14 changes: 14 additions & 0 deletions
14
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/InputDefault.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@model KratosUiNode | ||
|
||
@{ | ||
var attributes = Model.Attributes.GetKratosUiNodeInputAttributes(); | ||
var label = attributes.Label ?? Model.Meta.Label; | ||
} | ||
|
||
<div class="field"> | ||
<p>Unsupported Input Type: "@attributes.Type, Label: "@label"</p> | ||
@foreach (var message in Model.Messages) | ||
{ | ||
<KratosUiTextMessage Message="@message"/> | ||
} | ||
</div> |
45 changes: 45 additions & 0 deletions
45
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/InputField.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@model KratosUiNode | ||
|
||
@{ | ||
var attributes = Model.Attributes.GetKratosUiNodeInputAttributes(); | ||
var label = attributes.Label ?? Model.Meta.Label; | ||
} | ||
|
||
<div class="field"> | ||
<label class="label" id="@label?.Id"> | ||
@(attributes.Label?.Text ?? Model.Meta.Label?.Text) | ||
<div class="control"> | ||
<input type="@attributes.Type.ToString().ToLower()" class="input" | ||
required="@attributes.Required" | ||
value="@attributes.Value" autocomplete="@attributes.Autocomplete.ToString()?.ToLower()" | ||
disabled="@attributes.Disabled" name="@attributes.Name" | ||
onclick="@attributes.Onclick" pattern="@attributes.Pattern"/> | ||
</div> | ||
</label> | ||
@if (attributes.Type == KratosUiNodeInputAttributes.TypeEnum.Password | ||
&& Model.Group == KratosUiNode.GroupEnum.Password) | ||
{ | ||
<!--<div class="field"> | ||
<div class="control"> | ||
<div class="is-flex is-justify-content-space-between is-mobile"> | ||
<div> | ||
-<label for="rememberMeCheck" class="checkbox"> | ||
<input type="checkbox" id="rememberMeCheck"> | ||
Remember me | ||
</label> | ||
</div> | ||
<p> | ||
<a href="recovery"> | ||
@OryTranslator.Get("login.forgot-password") | ||
</a> | ||
</p> | ||
</div> | ||
</div> | ||
</div>--> | ||
} | ||
|
||
@foreach (var message in Model.Messages) | ||
{ | ||
<KratosUiTextMessage Message="@message"/> | ||
} | ||
</div> |
23 changes: 23 additions & 0 deletions
23
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/InputSubmit.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@model KratosUiNode | ||
|
||
@{ | ||
var attributes = Model.Attributes.GetKratosUiNodeInputAttributes(); | ||
var label = attributes.Label ?? Model.Meta.Label; | ||
} | ||
|
||
<div class="field"> | ||
<div class="control mt-5"> | ||
<button type="submit" class="button is-success is-fullwidth" | ||
required="@attributes.Required" | ||
disabled="@attributes.Disabled" | ||
value="@attributes.Value" | ||
name="@attributes.Name" | ||
onclick="@attributes.Onclick"> | ||
@label?.Text | ||
</button> | ||
</div> | ||
@foreach (var message in Model.Messages) | ||
{ | ||
<KratosUiTextMessage Message="@message"/> | ||
} | ||
</div> |
16 changes: 16 additions & 0 deletions
16
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/Script.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@model KratosUiNode | ||
|
||
@{ | ||
var attributes = Model.Attributes.GetKratosUiNodeScriptAttributes(); | ||
} | ||
|
||
<div class="field"> | ||
<script src="@attributes.Src" async="@attributes.Async" | ||
crossorigin="@attributes.Crossorigin" referrerpolicy="@attributes.Referrerpolicy" | ||
nonce="@attributes.Nonce" integrity="@attributes.Integrity" | ||
id="@attributes.Id"></script> | ||
@foreach (var message in Model.Messages) | ||
{ | ||
<KratosUiTextMessage Message="@message"/> | ||
} | ||
</div> |
13 changes: 13 additions & 0 deletions
13
KratosSelfService/Views/Shared/Components/KratosUiNodeInput/Text.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@model KratosUiNode | ||
|
||
@{ | ||
var attributes = Model.Attributes.GetKratosUiNodeTextAttributes(); | ||
} | ||
|
||
<div class="field"> | ||
<p id="@attributes.Id">@attributes.Text.Text</p> | ||
@foreach (var message in Model.Messages) | ||
{ | ||
<KratosUiTextMessage Message="@message"/> | ||
} | ||
</div> |