mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
This commit is contained in:
parent
29ae064c7a
commit
f7bf2a2fe7
11 changed files with 296 additions and 62 deletions
|
@ -24,10 +24,9 @@
|
|||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
using System.Reflection;
|
||||
|
||||
using System.Text;
|
||||
using Nancy.ViewEngines.Razor;
|
||||
|
||||
using PlexRequests.Helpers;
|
||||
|
||||
namespace PlexRequests.UI.Helpers
|
||||
|
@ -41,5 +40,17 @@ namespace PlexRequests.UI.Helpers
|
|||
|
||||
return helper.Raw(htmlString);
|
||||
}
|
||||
|
||||
public static IHtmlString Checkbox(this HtmlHelpers helper, bool check, string name, string display)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine("<div class=\"form-group\">");
|
||||
sb.AppendLine("<div class=\"checkbox\">");
|
||||
sb.AppendFormat("<input type=\"checkbox\" id=\"{0}\" name=\"{0}\" {2}><label for=\"{0}\">{1}</label>", name, display, check ? "checked=\"checked\"" : string.Empty);
|
||||
sb.AppendLine("</div>");
|
||||
sb.AppendLine("</div>");
|
||||
return helper.Raw(sb.ToString());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue