This repository has been archived on 2025-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
Hisham Bin Ateya 66ad089088
Refactoring (#314)
* Refactoring

* Refactoring

* Check for a valid email.

* Fixed missing character.

* Moved logic to  the Utilities class.

* Rename template .sql file

* Modified null and empty string check.

* Check for a valid email.

* Fixed missing character.

* Moved logic to  the Utilities class.

* Added Favicon support, Progressive Web App support, page title and url support, and private/public user registration options

* Refactoring

* Refactoring

* Check for a valid email.

* Moved logic to  the Utilities class.

Co-authored-by: Aubrey <aubrey.b@treskcow.tech>
Co-authored-by: MIchael Atwood <matwood@dragonmastery.com>
Co-authored-by: Shaun Walker <shaun.walker@siliqon.com>
2020-03-31 10:21:05 -04:00

44 lines
1.3 KiB
Plaintext

@namespace Oqtane.Modules.Controls
@inherits ModuleBase
@if (!string.IsNullOrEmpty(HelpText))
{
<span class="app-tooltip" data-tip="@((MarkupString)HelpText)">@((MarkupString)_openLabel)@ChildContent@((MarkupString)_closeLabel) <img src="images/help.png" /></span>
}
else
{
@((MarkupString)_openLabel)@ChildContent@((MarkupString)_closeLabel)
}
@code {
private string _openLabel = string.Empty;
private string _closeLabel = "</label>";
[Parameter]
public RenderFragment ChildContent { get; set; } // required - the title of the label
[Parameter]
public string For { get; set; } // optional - the id of the associated input control for accessibility
[Parameter]
public string Class { get; set; } // optional - the class for the label ( ie. control-label )
[Parameter]
public string HelpText { get; set; } // optional - tooltip for this label
protected override void OnParametersSet()
{
_openLabel = "<label";
if (!string.IsNullOrEmpty(For))
{
_openLabel += " for=\string.Empty + For + "\string.Empty;
}
if (!string.IsNullOrEmpty(Class))
{
_openLabel += " class=\string.Empty + Class + "\string.Empty;
}
_openLabel += ">";
}
}