Add registration workflow
Update unobtrusive Validation
This commit is contained in:
@@ -18,8 +18,8 @@ namespace LeafWeb.WebCms.App_Start
|
||||
HangfireBootstrapper.Instance.Start();
|
||||
BackloadBundles.RegisterBundles(BundleTable.Bundles);
|
||||
|
||||
// route for downloading results
|
||||
RouteTable.Routes.MapRoute(
|
||||
// route for downloading results, see also URL rewrite rules in web.config
|
||||
RouteTable.Routes.MapRoute(
|
||||
"ResultsDownload", // Route name
|
||||
"Results/Download", // URL with parameters
|
||||
new { controller = "Results", action = "Download" } // Parameter defaults
|
||||
@@ -27,5 +27,5 @@ namespace LeafWeb.WebCms.App_Start
|
||||
|
||||
base.ApplicationStarted(umbracoApplication, applicationContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
-275
@@ -7187,278 +7187,3 @@ a.text-dark:hover, a.text-dark:focus {
|
||||
@media (min-width: 992px) {
|
||||
.navbar-brand img {
|
||||
width: 205px; } }
|
||||
|
||||
/*
|
||||
|
||||
$bgDefault: $dark;
|
||||
$bgHighlight: $primary;
|
||||
$colDefault: #ecf0f1;
|
||||
$colHighlight: #b7f696;
|
||||
$dropDown: false;
|
||||
|
||||
.navbar {
|
||||
background-color: $bgDefault !important;
|
||||
|
||||
.navbar-brand {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: $colDefault;
|
||||
|
||||
a {
|
||||
color: $colHighlight;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-nav {
|
||||
.nav-link {
|
||||
color: $colDefault;
|
||||
border-radius: .25rem;
|
||||
margin: 0 0.25em;
|
||||
|
||||
&:not(.disabled) {
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@if ($dropDown) {
|
||||
.dropdown-menu {
|
||||
background-color: $bgDefault;
|
||||
border-color: $bgHighlight;
|
||||
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus, &.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-divider {
|
||||
border-top-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-item.active, .nav-item.show {
|
||||
.nav-link, .nav-link:hover, .nav-link:focus {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
border-color: $bgHighlight;
|
||||
|
||||
&:hover, &:focus {
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
|
||||
.navbar-toggler-icon {
|
||||
color: $colDefault;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-collapse,
|
||||
.navbar-form {
|
||||
border-color: $colDefault;
|
||||
}
|
||||
|
||||
.navbar-link {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 575px) {
|
||||
.navbar-expend-sm .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.navbar-expend-md .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.navbar-expend-lg .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
.navbar-expend-xl .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-expend .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
// Alternate buttons styles inverse and transparent
|
||||
// --------------------------------------------------
|
||||
.btn-default {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-secondary-bg, $btn-secondary-color, $btn-secondary-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-secondary-color, $btn-secondary-bg, $btn-secondary-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-secondary-bg, transparent, $btn-secondary-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-secondary-bg, darken($btn-secondary-bg, 25%), $btn-secondary-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-primary-bg, $btn-primary-color, $btn-primary-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-primary-bg, transparent, $btn-primary-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-primary-bg, darken($btn-primary-bg, 25%), $btn-primary-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-success-bg, $btn-success-color, $btn-success-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-success-bg, transparent, $btn-success-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-success-bg, darken($btn-success-bg, 25%), $btn-success-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-info-bg, $btn-info-color, $btn-info-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-info-bg, transparent, $btn-info-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-info-bg, darken($btn-info-bg, 25%), $btn-info-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-warning-bg, $btn-warning-color, $btn-warning-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-warning-bg, transparent, $btn-warning-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-warning-bg, darken($btn-warning-bg, 25%), $btn-warning-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-danger-bg, $btn-danger-color, $btn-danger-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-danger-bg, transparent, $btn-danger-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-danger-bg, darken($btn-danger-bg, 25%), $btn-danger-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
+1
-275
@@ -4,6 +4,7 @@
|
||||
.navbar-brand img {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.navbar-brand img {
|
||||
width: 175px;
|
||||
@@ -14,278 +15,3 @@
|
||||
width: 205px;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
$bgDefault: $dark;
|
||||
$bgHighlight: $primary;
|
||||
$colDefault: #ecf0f1;
|
||||
$colHighlight: #b7f696;
|
||||
$dropDown: false;
|
||||
|
||||
.navbar {
|
||||
background-color: $bgDefault !important;
|
||||
|
||||
.navbar-brand {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: $colDefault;
|
||||
|
||||
a {
|
||||
color: $colHighlight;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-nav {
|
||||
.nav-link {
|
||||
color: $colDefault;
|
||||
border-radius: .25rem;
|
||||
margin: 0 0.25em;
|
||||
|
||||
&:not(.disabled) {
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@if ($dropDown) {
|
||||
.dropdown-menu {
|
||||
background-color: $bgDefault;
|
||||
border-color: $bgHighlight;
|
||||
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus, &.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-divider {
|
||||
border-top-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-item.active, .nav-item.show {
|
||||
.nav-link, .nav-link:hover, .nav-link:focus {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
border-color: $bgHighlight;
|
||||
|
||||
&:hover, &:focus {
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
|
||||
.navbar-toggler-icon {
|
||||
color: $colDefault;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-collapse,
|
||||
.navbar-form {
|
||||
border-color: $colDefault;
|
||||
}
|
||||
|
||||
.navbar-link {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 575px) {
|
||||
.navbar-expend-sm .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.navbar-expend-md .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.navbar-expend-lg .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
.navbar-expend-xl .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-expend .navbar-nav .show .dropdown-menu {
|
||||
.dropdown-item {
|
||||
color: $colDefault;
|
||||
|
||||
&:hover, &:focus {
|
||||
color: $colHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item.active {
|
||||
color: $colHighlight;
|
||||
background-color: $bgHighlight;
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
// Alternate buttons styles inverse and transparent
|
||||
// --------------------------------------------------
|
||||
.btn-default {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-secondary-bg, $btn-secondary-color, $btn-secondary-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-secondary-color, $btn-secondary-bg, $btn-secondary-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-secondary-bg, transparent, $btn-secondary-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-secondary-bg, darken($btn-secondary-bg, 25%), $btn-secondary-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-primary-bg, $btn-primary-color, $btn-primary-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-primary-bg, transparent, $btn-primary-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-primary-bg, darken($btn-primary-bg, 25%), $btn-primary-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-success-bg, $btn-success-color, $btn-success-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-success-bg, transparent, $btn-success-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-success-bg, darken($btn-success-bg, 25%), $btn-success-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-info-bg, $btn-info-color, $btn-info-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-info-bg, transparent, $btn-info-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-info-bg, darken($btn-info-bg, 25%), $btn-info-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-warning-bg, $btn-warning-color, $btn-warning-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-warning-bg, transparent, $btn-warning-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-warning-bg, darken($btn-warning-bg, 25%), $btn-warning-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
&.btn-inverse {
|
||||
@include button-variant($btn-danger-bg, $btn-danger-color, $btn-danger-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
|
||||
}
|
||||
}
|
||||
&.btn-transparent {
|
||||
@include button-variant($btn-danger-bg, transparent, $btn-danger-bg);
|
||||
&:hover {
|
||||
@include button-variant($btn-danger-bg, darken($btn-danger-bg, 25%), $btn-danger-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -153,6 +153,8 @@ h1.headline {
|
||||
|
||||
form .validation-summary-errors ul {
|
||||
list-style-type: none; }
|
||||
form .validation-summary-errors ul li {
|
||||
color: #dc3545; }
|
||||
|
||||
.autocomplete-suggestions {
|
||||
border: 1px solid #999;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
body header{padding:15px 0;}body.debug header .navbar-brand{position:relative;}body.debug header .navbar-brand:before{content:"";font-family:FontAwesome;font-style:normal;font-weight:normal;text-decoration:inherit;color:#f00;font-size:60px;padding-right:.5em;position:absolute;top:10px;left:0;}h1{padding:24px 0 12px 0;}p{padding:12px 0;}i{cursor:default;}footer{margin-top:24px !important;}.row-no-padding [class*="col-"]{padding-left:0 !important;padding-right:0 !important;}.home .dark .row:first-child .column:first-child h1{padding-top:0;}.home .blogarchive{padding-top:20px;}.top-buffer{margin-top:20px;}.detail-actions>a,.detail-actions>form>button{margin-top:20px;float:left;clear:left;}.banner-link{white-space:normal;padding:20px;background:#000;background:rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;}.banner-link .glyphicon,.banner-link .fa{color:#8cc641;}a.banner-link:hover{text-decoration:none;background:rgba(0,0,0,.6);}a.banner-link:hover .glyphicon{color:#a8ed4f;}h1.headline{font-size:2.9em;text-align:center;text-shadow:-1px -1px 0 rgba(255,255,255,.8),1px 1px 0 rgba(0,0,0,.4),5px 5px 10px rgba(0,0,0,.4);}.headline-icon h1:after{color:rgba(172,214,118,.8);font-family:"FontAwesome";font-size:.8em;padding-left:10px;text-shadow:-1px -1px 0 rgba(255,255,255,.8),1px 1px 0 rgba(0,0,0,.4),5px 5px 10px rgba(0,0,0,.4);}.headline-icon.headline-icon-file h1:after{content:"";}.headline-icon.headline-icon-leaf h1:after{content:"";}.headline-icon.headline-icon-question h1:after{content:"";}.headline-icon.headline-icon-stats h1:after{content:"";}.headline-icon.headline-icon-user h1:after{content:"";}.headline-icon.headline-icon-list h1:after{content:"";}.status{white-space:nowrap;cursor:default;}.status:before{font-family:"FontAwesome";font-size:1em;padding-right:6px;}.status.status-pending{color:#f0ad4e;}.status.status-pending:before{content:"";}.status.status-complete{color:#337ab7;}.status.status-complete:before{content:"";}.status.status-exception{color:#a94442;}.status.status-exception:before{content:"";}.status.status-unresponsive{color:#66512c;}.status.status-unresponsive:before{content:"";}.status.status-running,.status.status-starting,.status.status-finishing{color:#3c763d;}.status.status-running:before{content:"";}.status.status-starting:before{content:"";}.status.status-finishing:before{content:"";}.status.status-cancelpending:before,.status.status-cancelling:before{content:"";}.status.status-cancelled{color:#ec971f;}.status.status-cancelled:before{content:"";}#chart{padding-top:20px;}.btn-file{position:relative;overflow:hidden;}.btn-file input[type=file]{position:absolute;top:0;right:0;min-width:100%;min-height:100%;font-size:100px;text-align:right;filter:alpha(opacity=0);opacity:0;outline:none;background:#fff;cursor:inherit;display:block;}form .validation-summary-errors ul{list-style-type:none;}.autocomplete-suggestions{border:1px solid #999;background:#fff;overflow:auto;}.autocomplete-suggestion{padding:2px 5px;white-space:nowrap;overflow:hidden;}.autocomplete-selected{background:#f0f0f0;}.autocomplete-suggestions strong{font-weight:normal;color:#39f;}.autocomplete-group{padding:2px 5px;}.autocomplete-group strong{display:block;border-bottom:1px solid #000;}.toggle{width:15px;}.dropdown-menu li form .btn-link{display:block;color:#333;clear:both;float:left;font-size:1rem;font-weight:normal;line-height:1.42857;min-width:160px;padding:3px 20px;text-align:left;white-space:nowrap;}.dropdown-menu li form .btn-link:focus,.dropdown-menu li form .btn-link:hover{text-decoration:none;color:#262626;background-color:#f5f5f5;}.divider-right{border-right:1px dashed #333;}.read{overflow:hidden;font-size:16px !important;transition:all .3s;margin-bottom:10px;}.read-less{height:90px !important;}code,pre{line-height:1;}.alert{position:absolute;left:30%;top:10em;width:40%;z-index:1;}.copyright{font-size:.8em;color:#777 !important;cursor:default;}.withshadow{text-shadow:2px 2px 4px #000;}.files td{vertical-align:middle;}
|
||||
body header{padding:15px 0;}body.debug header .navbar-brand{position:relative;}body.debug header .navbar-brand:before{content:"";font-family:FontAwesome;font-style:normal;font-weight:normal;text-decoration:inherit;color:#f00;font-size:60px;padding-right:.5em;position:absolute;top:10px;left:0;}h1{padding:24px 0 12px 0;}p{padding:12px 0;}i{cursor:default;}footer{margin-top:24px !important;}.row-no-padding [class*="col-"]{padding-left:0 !important;padding-right:0 !important;}.home .dark .row:first-child .column:first-child h1{padding-top:0;}.home .blogarchive{padding-top:20px;}.top-buffer{margin-top:20px;}.detail-actions>a,.detail-actions>form>button{margin-top:20px;float:left;clear:left;}.banner-link{white-space:normal;padding:20px;background:#000;background:rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;}.banner-link .glyphicon,.banner-link .fa{color:#8cc641;}a.banner-link:hover{text-decoration:none;background:rgba(0,0,0,.6);}a.banner-link:hover .glyphicon{color:#a8ed4f;}h1.headline{font-size:2.9em;text-align:center;text-shadow:-1px -1px 0 rgba(255,255,255,.8),1px 1px 0 rgba(0,0,0,.4),5px 5px 10px rgba(0,0,0,.4);}.headline-icon h1:after{color:rgba(172,214,118,.8);font-family:"FontAwesome";font-size:.8em;padding-left:10px;text-shadow:-1px -1px 0 rgba(255,255,255,.8),1px 1px 0 rgba(0,0,0,.4),5px 5px 10px rgba(0,0,0,.4);}.headline-icon.headline-icon-file h1:after{content:"";}.headline-icon.headline-icon-leaf h1:after{content:"";}.headline-icon.headline-icon-question h1:after{content:"";}.headline-icon.headline-icon-stats h1:after{content:"";}.headline-icon.headline-icon-user h1:after{content:"";}.headline-icon.headline-icon-list h1:after{content:"";}.status{white-space:nowrap;cursor:default;}.status:before{font-family:"FontAwesome";font-size:1em;padding-right:6px;}.status.status-pending{color:#f0ad4e;}.status.status-pending:before{content:"";}.status.status-complete{color:#337ab7;}.status.status-complete:before{content:"";}.status.status-exception{color:#a94442;}.status.status-exception:before{content:"";}.status.status-unresponsive{color:#66512c;}.status.status-unresponsive:before{content:"";}.status.status-running,.status.status-starting,.status.status-finishing{color:#3c763d;}.status.status-running:before{content:"";}.status.status-starting:before{content:"";}.status.status-finishing:before{content:"";}.status.status-cancelpending:before,.status.status-cancelling:before{content:"";}.status.status-cancelled{color:#ec971f;}.status.status-cancelled:before{content:"";}#chart{padding-top:20px;}.btn-file{position:relative;overflow:hidden;}.btn-file input[type=file]{position:absolute;top:0;right:0;min-width:100%;min-height:100%;font-size:100px;text-align:right;filter:alpha(opacity=0);opacity:0;outline:none;background:#fff;cursor:inherit;display:block;}form .validation-summary-errors ul{list-style-type:none;}form .validation-summary-errors ul li{color:#dc3545;}.autocomplete-suggestions{border:1px solid #999;background:#fff;overflow:auto;}.autocomplete-suggestion{padding:2px 5px;white-space:nowrap;overflow:hidden;}.autocomplete-selected{background:#f0f0f0;}.autocomplete-suggestions strong{font-weight:normal;color:#39f;}.autocomplete-group{padding:2px 5px;}.autocomplete-group strong{display:block;border-bottom:1px solid #000;}.toggle{width:15px;}.dropdown-menu li form .btn-link{display:block;color:#333;clear:both;float:left;font-size:1rem;font-weight:normal;line-height:1.42857;min-width:160px;padding:3px 20px;text-align:left;white-space:nowrap;}.dropdown-menu li form .btn-link:focus,.dropdown-menu li form .btn-link:hover{text-decoration:none;color:#262626;background-color:#f5f5f5;}.divider-right{border-right:1px dashed #333;}.read{overflow:hidden;font-size:16px !important;transition:all .3s;margin-bottom:10px;}.read-less{height:90px !important;}code,pre{line-height:1;}.alert{position:absolute;left:30%;top:10em;width:40%;z-index:1;}.copyright{font-size:.8em;color:#777 !important;cursor:default;}.withshadow{text-shadow:2px 2px 4px #000;}.files td{vertical-align:middle;}
|
||||
@@ -237,6 +237,9 @@ h1.headline {
|
||||
|
||||
form .validation-summary-errors ul {
|
||||
list-style-type: none;
|
||||
li {
|
||||
color: #dc3545
|
||||
}
|
||||
}
|
||||
|
||||
.autocomplete {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Web.Mvc;
|
||||
|
||||
@@ -21,8 +22,7 @@ namespace LeafWeb.WebCms.Utility
|
||||
: null;
|
||||
}
|
||||
|
||||
|
||||
private static bool HasError(this HtmlHelper htmlHelper, ModelMetadata modelMetadata, string expression)
|
||||
public static bool HasError(this HtmlHelper htmlHelper, ModelMetadata modelMetadata, string expression)
|
||||
{
|
||||
var modelName = htmlHelper.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(expression);
|
||||
var formContext = htmlHelper.ViewContext.FormContext;
|
||||
@@ -38,5 +38,12 @@ namespace LeafWeb.WebCms.Utility
|
||||
|
||||
return modelErrors?.Count > 0;
|
||||
}
|
||||
|
||||
public static bool HasError(this HtmlHelper htmlHelper)
|
||||
{
|
||||
var viewDataModelState = htmlHelper.ViewData.ModelState;
|
||||
return viewDataModelState.ContainsKey(htmlHelper.ViewData.TemplateInfo.HtmlFieldPrefix) &&
|
||||
viewDataModelState[htmlHelper.ViewData.TemplateInfo.HtmlFieldPrefix].Errors.Any();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
@{
|
||||
Html.RequiresJs("~/scripts/jquery.validate.min.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.min.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.bootstrap.min.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.bootstrap.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.custom.js", 2);
|
||||
}
|
||||
|
||||
<div class="container top-buffer">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-push-2 well">
|
||||
<div class="container mt-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 ">
|
||||
@Html.Partial("_ValidationSummary")
|
||||
|
||||
@using (Html.BeginUmbracoForm<ContactController>("Submit"))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Html.RequiresJs("~/scripts/jquery.autocomplete.min.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.min.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.min.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.bootstrap.min.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.bootstrap.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.custom.js", 2);
|
||||
Html.RequiresJs("~/scripts/LeafInputCreate.js", 3);
|
||||
|
||||
@@ -83,10 +83,12 @@
|
||||
@Html.EditorFor(m => m.TermsOfService)
|
||||
<input type="submit" id="submit-form" class="d-none" />
|
||||
}
|
||||
<div class="container"><div class="row">
|
||||
<label for="submit-form" class="btn btn-primary col-6 offset-6 col-sm-5 offset-sm-7 col-md-4 offset-md-8">Submit...</label>
|
||||
</div></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<label for="submit-form" class="btn btn-primary col-6 offset-6 col-sm-5 offset-sm-7 col-md-4 offset-md-8">Submit...</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,28 +7,22 @@
|
||||
var loginModel = new LoginModel { RedirectUrl = "/leaf-data/manage-queue/" };
|
||||
}
|
||||
|
||||
<div class="container mt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-4 card card-body bg-light">
|
||||
@using (Html.BeginUmbracoForm<UmbLoginController>("HandleLogin"))
|
||||
{
|
||||
<fieldset>
|
||||
@Html.ValidationSummary("loginModel", true)
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => loginModel.Username)
|
||||
@Html.TextBoxFor(m => loginModel.Username, new {@class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => loginModel.Username)
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => loginModel.Password)
|
||||
@Html.PasswordFor(m => loginModel.Password, new {@class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => loginModel.Password)
|
||||
</div>
|
||||
<div class="container mt-3">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-4 card card-body bg-light">
|
||||
@using (Html.BeginUmbracoForm<UmbLoginController>("HandleLogin"))
|
||||
{
|
||||
@Html.EditorFor(m => loginModel.Username)
|
||||
@Html.EditorFor(m => loginModel.Password, "Password")
|
||||
|
||||
<button class="btn btn-primary pull-right">Login</button>
|
||||
@Html.HiddenFor(m => loginModel.RedirectUrl)
|
||||
</fieldset>
|
||||
}
|
||||
@Html.ValidationSummary("loginModel", true)
|
||||
|
||||
<button class="btn btn-primary pull-right">Login</button>
|
||||
@Html.HiddenFor(m => loginModel.RedirectUrl)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center mt-lg-3">
|
||||
<p>Don't have an account? <a href="/membership/register">Register here</a> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -12,25 +12,23 @@
|
||||
Html.EnableClientValidation();
|
||||
Html.RequiresJs("~/scripts/jquery.validate.min.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.min.js", 2);
|
||||
Html.RequiresJs("~/scripts/jquery.validate.unobtrusive.bootstrap.js", 2);
|
||||
|
||||
Html.RequiresJs("~/scripts/Register.js");
|
||||
|
||||
var user = Membership.GetUser();
|
||||
if (user != null)
|
||||
{
|
||||
TempData["StatusMessage"] = "You are already logged in, " + user.UserName;
|
||||
TempData["StatusMessage-Type"] = "alert-danger";
|
||||
|
||||
// todo: redirect
|
||||
}
|
||||
}
|
||||
|
||||
<div class="container mt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-6 card card-body bg-light">
|
||||
@if (success)
|
||||
@if (success || (!user?.IsApproved ?? false))
|
||||
{
|
||||
<p>Registration succeeded.</p>
|
||||
<p><span class="fa fa-check text-primary"></span> Registration succeeded. Please check your email to verify your account.</p>
|
||||
}
|
||||
else if (user != null)
|
||||
{
|
||||
<p>No need to register - you are already logged withe email @user.Email</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -39,30 +37,33 @@ else
|
||||
null,
|
||||
new {id="register-member"}))
|
||||
{
|
||||
<div class="form-group">
|
||||
@Html.ValidationSummary("registerModel", true)
|
||||
@Html.ValidationSummary(true)
|
||||
|
||||
@Html.EditorFor(m => registerModel.Name)
|
||||
@Html.EditorFor(m => registerModel.Email, new { type = "email"})
|
||||
@Html.EditorFor(m => registerModel.Password, "Password")
|
||||
@*<div class="form-group">
|
||||
@Html.LabelFor(m => registerModel.Name)
|
||||
@Html.TextBoxFor(m => registerModel.Name, new { @class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => registerModel.Name)
|
||||
@Html.ValidationMessageFor(m => registerModel.Name, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => registerModel.Email)
|
||||
@Html.TextBoxFor(m => registerModel.Email, new { @class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => registerModel.Email)
|
||||
@Html.ValidationMessageFor(m => registerModel.Email, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => registerModel.Password)
|
||||
@Html.PasswordFor(m => registerModel.Password, new { @class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => registerModel.Password)
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.ValidationMessageFor(m => registerModel.Password, "", new { @class = "text-danger" })
|
||||
</div>*@
|
||||
<div class="form-group verifyPassword">
|
||||
@Html.Label("VerifyPassword")
|
||||
@Html.Password("VerifyPassword", null, new { @class = "form-control" })
|
||||
@Html.ValidationMessage("VerifyPassword")
|
||||
@Html.ValidationMessage("VerifyPassword", "", new { @class = "text-danger" })
|
||||
</div>
|
||||
|
||||
if (registerModel.MemberProperties != null)
|
||||
@*if (registerModel.MemberProperties != null)
|
||||
{
|
||||
for (var i = 0; i < registerModel.MemberProperties.Count; i++)
|
||||
{
|
||||
@@ -72,7 +73,7 @@ else
|
||||
@Html.HiddenFor(m => registerModel.MemberProperties[i].Alias)
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}*@
|
||||
|
||||
@Html.HiddenFor(m => registerModel.MemberTypeAlias)
|
||||
@Html.HiddenFor(m => registerModel.RedirectUrl)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model Boolean?
|
||||
|
||||
@{
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
|
||||
var htmlAttributes = new RouteValueDictionary();
|
||||
if (ViewBag.@class != null)
|
||||
{
|
||||
@@ -9,13 +10,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m, new { @class = "" })
|
||||
<div class="controls">
|
||||
@Html.CheckBox(
|
||||
"",
|
||||
Model.HasValue && Model.Value,
|
||||
htmlAttributes)
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class = "form-text" })
|
||||
</div>
|
||||
</div>
|
||||
@Html.CheckBox(
|
||||
"",
|
||||
Model.HasValue && Model.Value,
|
||||
htmlAttributes)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@using System.Threading
|
||||
@model DateTime?
|
||||
|
||||
@{
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
|
||||
DateTime dt;
|
||||
if (Model.HasValue)
|
||||
{
|
||||
@@ -13,8 +15,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " error has-error"))">
|
||||
@Html.LabelFor(m => m)
|
||||
@Html.TextBoxFor(m => m, new { @class="form-control datepicker", data_provide="datepicker", data_date_language="globalize", data_date=dt, data_date_format=System.Threading.Thread.CurrentThread.CurrentUICulture.DateTimeFormat.ShortDatePattern.Replace("M", "m"), data_date_today_highlight="true", data_date_today_btn="false" })
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class="form-text" })
|
||||
</div>
|
||||
@Html.TextBoxFor(m => m,
|
||||
new
|
||||
{
|
||||
@class="form-control datepicker",
|
||||
data_provide="datepicker",
|
||||
data_date_language="globalize",
|
||||
data_date=dt,
|
||||
data_date_format=Thread.CurrentThread.CurrentUICulture.DateTimeFormat.ShortDatePattern.Replace("M", "m"),
|
||||
data_date_today_highlight="true",
|
||||
data_date_today_btn="false"
|
||||
})
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@using System.Globalization
|
||||
@model decimal?
|
||||
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m)
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">€@Html.TextBox(
|
||||
"",
|
||||
Model == null ? "" : String.Format(System.Globalization.CultureInfo.CurrentCulture, "{0:F2}", ViewData.ModelMetadata.Model),
|
||||
ViewBag.ClearTextField == true ? new { @class = "form-control clear-text-field input-block-level" } : new { @class = "form-control input-block-level" })</span>
|
||||
</div>
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class = "form-text" })
|
||||
@{
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
}
|
||||
<div class="input-group">
|
||||
<span class="input-group-append">
|
||||
€@Html.TextBox(
|
||||
"",
|
||||
Model == null
|
||||
? ""
|
||||
: string.Format(CultureInfo.CurrentCulture, "{0:F2}", ViewData.ModelMetadata.Model))
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,30 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model object
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
}
|
||||
@{
|
||||
var htmlAttributes = new RouteValueDictionary();
|
||||
|
||||
htmlAttributes.Add("type", "email");
|
||||
|
||||
var controlClass = "form-control";
|
||||
|
||||
if (ViewBag.@class != null)
|
||||
{
|
||||
htmlAttributes.Add("class", "form-control " + ViewBag.@class);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmlAttributes.Add("class", "form-control");
|
||||
}
|
||||
if (ViewBag.@type != null)
|
||||
{
|
||||
htmlAttributes.Add("type", ViewBag.@type);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmlAttributes.Add("type", "email");
|
||||
controlClass = string.Concat(controlClass, " ", ViewBag.@class);
|
||||
}
|
||||
|
||||
if (ViewBag.placeholder != null)
|
||||
{
|
||||
htmlAttributes.Add("placeholder", ViewBag.placeholder);
|
||||
}
|
||||
|
||||
if (Html.HasError())
|
||||
{
|
||||
controlClass = string.Concat(controlClass, " ", "is-invalid");
|
||||
}
|
||||
htmlAttributes.Add("class", controlClass);
|
||||
}
|
||||
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)
|
||||
@@ -1,9 +1,6 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model object
|
||||
@{
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
}
|
||||
|
||||
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m)
|
||||
@Html.EnumDropDownListFor(m => m, new { @class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class = "form-text" })
|
||||
</div>
|
||||
@Html.EnumDropDownListFor(m => m, new { @class = "form-control" })
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@model HttpPostedFileBase
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
}
|
||||
|
||||
<span class="btn btn-outline-secondary btn-file">
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model int?
|
||||
|
||||
@{
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
|
||||
var htmlAttributes = new RouteValueDictionary();
|
||||
if (ViewBag.@class != null)
|
||||
{
|
||||
@@ -18,13 +19,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m)
|
||||
<div class="controls">
|
||||
@Html.TextBox(
|
||||
"",
|
||||
ViewData.TemplateInfo.FormattedModelValue,
|
||||
htmlAttributes)
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class = "form-text" })
|
||||
</div>
|
||||
</div>
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/Scripts/mdd_styles.css" />
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " is-invalid"))">
|
||||
@Html.LabelFor(m => m)
|
||||
<div class="mdd_toolbar"></div>
|
||||
@Html.TextAreaFor(
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model object
|
||||
@{
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
}
|
||||
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m)
|
||||
<div class="controls">
|
||||
@Html.TextAreaFor(
|
||||
m => m,
|
||||
8, 8,
|
||||
ViewBag.ClearTextField == true ? new { @class = "form-control input-block-level clear-text-field" } : new { @class = "form-control input-block-level" } )
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class = "form-text" })
|
||||
</div>
|
||||
<div class="">
|
||||
@Html.TextAreaFor(m => m, new{rows=8, @class="form-control"})
|
||||
</div>
|
||||
|
||||
@@ -1,26 +1,5 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model object
|
||||
|
||||
@{
|
||||
var htmlAttributes = new RouteValueDictionary();
|
||||
if (ViewBag.@class != null)
|
||||
{
|
||||
htmlAttributes.Add("class", "form-control " + ViewBag.@class);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmlAttributes.Add("class", "form-control");
|
||||
}
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
}
|
||||
|
||||
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m)
|
||||
<div class="controls">
|
||||
@Html.Password(
|
||||
"",
|
||||
ViewData.TemplateInfo.FormattedModelValue,
|
||||
htmlAttributes)
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class = "form-text" })
|
||||
</div>
|
||||
</div>
|
||||
@Html.Password("", ViewData.TemplateInfo.FormattedModelValue, new { @class = "form-control" })
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
@model SelectListViewModel
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
}
|
||||
@{
|
||||
var prefix = ViewData.TemplateInfo.HtmlFieldPrefix;
|
||||
ViewData.TemplateInfo.HtmlFieldPrefix = string.Empty;
|
||||
|
||||
var required = new { required = "true" };
|
||||
|
||||
foreach (var li in Model.ListItems)
|
||||
{
|
||||
<div class="radio">
|
||||
<label class="radio">
|
||||
@Html.RadioButton(prefix + ".Selected", li.Value, li.Selected, required) @li.Text
|
||||
var name = prefix + ".Selected";
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="@name" id="@li.Value" value="@li.Value" @(li.Selected ? " checked" : "")>
|
||||
<label class="form-check-label" for="@li.Value">
|
||||
@li.Text
|
||||
</label>
|
||||
</div>
|
||||
required = null;
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model float?
|
||||
|
||||
@{
|
||||
float f;
|
||||
f = !Model.HasValue ? 0.0f : Model.Value;
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
|
||||
var f = Model ?? 0.0f;
|
||||
}
|
||||
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m)
|
||||
<div class="input-group">
|
||||
@Html.TextBox(
|
||||
"", f,
|
||||
ViewBag.ClearTextField == true ? new { @class = "form-control clear-text-field input-block-level" } : new { @class = "form-control input-block-level" })<span class="input-group-addon">0,00</span>
|
||||
</div>
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class = "form-text" })
|
||||
</div>
|
||||
@Html.TextBox("", f)
|
||||
<span class="input-group-append">0,00</span>
|
||||
|
||||
@@ -1,25 +1,33 @@
|
||||
@model object
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
}
|
||||
@{
|
||||
var htmlAttributes = new RouteValueDictionary();
|
||||
|
||||
if (ViewData.ContainsKey("type"))
|
||||
{
|
||||
htmlAttributes.Add("type", ViewData["type"]);
|
||||
}
|
||||
|
||||
var controlClass = "form-control";
|
||||
|
||||
if (ViewBag.@class != null)
|
||||
{
|
||||
htmlAttributes.Add("class", "form-control " + ViewBag.@class);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmlAttributes.Add("class", "form-control");
|
||||
}
|
||||
if (ViewBag.@type != null)
|
||||
{
|
||||
htmlAttributes.Add("type", ViewBag.@type);
|
||||
controlClass = string.Concat(controlClass, " ", ViewBag.@class);
|
||||
}
|
||||
|
||||
if (ViewBag.placeholder != null)
|
||||
{
|
||||
htmlAttributes.Add("placeholder", ViewBag.placeholder);
|
||||
}
|
||||
|
||||
if (ViewData.ModelState.ContainsKey(ViewData.TemplateInfo.HtmlFieldPrefix) &&
|
||||
ViewData.ModelState[ViewData.TemplateInfo.HtmlFieldPrefix].Errors.Any())
|
||||
{
|
||||
controlClass = string.Concat(controlClass, " ", "is-invalid");
|
||||
}
|
||||
htmlAttributes.Add("class", controlClass);
|
||||
}
|
||||
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)
|
||||
@@ -6,14 +6,14 @@
|
||||
//var isChecked = Model.HasValue && Model.Value;
|
||||
}
|
||||
|
||||
<div class="@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
<div class="@(Html.ValidationErrorFor(m => m, " is-invalid"))">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
@Html.CheckBoxFor(m=> m)
|
||||
I agree to the
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1115)" target="_blank">
|
||||
Terms of Service
|
||||
<span class="fa fa-new-window" aria-hidden="true"></span>
|
||||
<span class="fa fa-window-restore" aria-hidden="true"></span>
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model object
|
||||
@{
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
}
|
||||
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m)
|
||||
<div class="controls">
|
||||
@Html.TextBox(
|
||||
"",
|
||||
ViewData.TemplateInfo.FormattedModelValue,
|
||||
ViewBag.ClearTextField == true ? new { @class = "form-control clear-text-field input-block-level" } : new { @class = "form-control input-block-level" } )
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class = "form-text" })
|
||||
</div>
|
||||
</div>
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
@using LeafWeb.WebCms.Utility
|
||||
@model TimeSpan?
|
||||
|
||||
@{
|
||||
TimeSpan ts;
|
||||
|
||||
if (Model == null)
|
||||
{
|
||||
ts = TimeSpan.FromMinutes(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
ts = Model.Value;
|
||||
}
|
||||
|
||||
Layout = "_FieldLayout.cshtml";
|
||||
|
||||
var ts = Model ?? TimeSpan.FromMinutes(10);
|
||||
}
|
||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||
@Html.LabelFor(m => m)
|
||||
<div class="controls">
|
||||
@Html.TextBoxFor(m => m, "hh\\:mm", new { @Value = ts.ToString("hh\\:mm"), @class="form-control timepicker", data_provide="timepicker", data_minute_step="5", data_show_meridian="false", data_disable_focus="true", data_template = "dropdown", data_default_time="value" })
|
||||
@Html.ValidationMessageFor(m => m, null, new { @class="form-text" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.TextBoxFor(m => m,
|
||||
"hh\\:mm",
|
||||
new
|
||||
{
|
||||
@Value = ts.ToString("hh\\:mm"),
|
||||
@class="form-control timepicker",
|
||||
data_provide="timepicker",
|
||||
data_minute_step="5",
|
||||
data_show_meridian="false",
|
||||
data_disable_focus="true",
|
||||
data_template = "dropdown",
|
||||
data_default_time="value"
|
||||
})
|
||||
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
@model object
|
||||
@using StringExtensions = LeafWeb.Core.Utility.StringExtensions
|
||||
@model object
|
||||
@{
|
||||
Layout = null;
|
||||
var propertyName = ViewData.ModelMetadata.PropertyName;
|
||||
var lowerPropertyName = @LeafWeb.Core.Utility.StringExtensions.LowercaseFirst(propertyName);
|
||||
var values = ViewData.ModelMetadata.AdditionalValues;
|
||||
var units = values.ContainsKey("Units") ? (string)values["Units"] : null;
|
||||
var currency = values.ContainsKey("Currency") ? (string)values["Currency"] : null;
|
||||
var formatHint = values.ContainsKey("FormatHint") ? (string)values["FormatHint"] : null;
|
||||
var editLabel = values.ContainsKey("EditLabel") ? (bool)values["EditLabel"] : true;
|
||||
var hasError = ViewData.ModelState[propertyName] != null && ViewData.ModelState[propertyName].Errors.Any();
|
||||
var hasErrorClass = hasError ? "has-error" : string.Empty;
|
||||
var lowerPropertyName = StringExtensions.LowercaseFirst(ViewData.ModelMetadata.PropertyName);
|
||||
}
|
||||
<div class="form-group @lowerPropertyName @hasErrorClass">
|
||||
<div class="form-group @lowerPropertyName">
|
||||
@Html.LabelForModel()
|
||||
@RenderBody()
|
||||
@Html.ValidationMessage("", new { @class = "form-text"})
|
||||
@Html.ValidationMessage(string.Empty, new { @class = "text-danger"})
|
||||
</div>
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
@{
|
||||
var fieldName = Model;
|
||||
}
|
||||
@if (ViewData.ModelState[fieldName] != null && ViewData.ModelState[fieldName].Errors.Any())
|
||||
@if (ViewData.ModelState[fieldName] != null
|
||||
&& ViewData.ModelState[fieldName].Errors.Any())
|
||||
{
|
||||
<span class="form-text field-validation-error">
|
||||
@foreach (var error in ViewData.ModelState[fieldName].Errors)
|
||||
foreach (var error in ViewData.ModelState[fieldName].Errors)
|
||||
{
|
||||
<span id="@fieldName-error" class="text-danger">@error.ErrorMessage</span>
|
||||
<div id="@fieldName-error" class="is-invalid invalid-feedback">@error.ErrorMessage</div>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
@@ -886,10 +886,9 @@
|
||||
<Content Include="scripts\jquery-3.4.1.min.map" />
|
||||
<Content Include="scripts\jquery.fancybox.min.js" />
|
||||
<None Include="scripts\jquery.validate-vsdoc.js" />
|
||||
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.js" />
|
||||
<Content Include="scripts\jquery.validate.js" />
|
||||
<Content Include="scripts\jquery.validate.min.js" />
|
||||
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.js" />
|
||||
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.min.js" />
|
||||
<Content Include="scripts\jquery.validate.custom.js" />
|
||||
<Content Include="scripts\jquery.validate.unobtrusive.js" />
|
||||
<Content Include="scripts\jquery.validate.unobtrusive.min.js" />
|
||||
@@ -985,7 +984,6 @@
|
||||
<Content Include="Views\Shared\EditorTemplates\Boolean.cshtml" />
|
||||
<Content Include="Views\Shared\EditorTemplates\DateTime.cshtml" />
|
||||
<Content Include="Views\Shared\EditorTemplates\Decimal.cshtml" />
|
||||
<Content Include="Views\Shared\EditorTemplates\EmailAddress.cshtml" />
|
||||
<Content Include="Views\Shared\EditorTemplates\Enum.cshtml" />
|
||||
<Content Include="Views\Shared\EditorTemplates\HttpPostedFileBase.cshtml" />
|
||||
<Content Include="Views\Shared\EditorTemplates\Int32.cshtml" />
|
||||
@@ -1013,7 +1011,6 @@
|
||||
<Content Include="Views\MacroPartials\BlogHighlights.cshtml" />
|
||||
<Content Include="Views\MacroPartials\Queue.cshtml" />
|
||||
<Content Include="Views\Partials\LoginStatus.cshtml" />
|
||||
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.min.js.map" />
|
||||
<Content Include="Views\MacroPartials\LeafInputQueueDetails.cshtml" />
|
||||
<Content Include="Views\Shared\DisplayTemplates\Boolean.cshtml" />
|
||||
<Content Include="Views\Shared\DisplayTemplates\Date.cshtml" />
|
||||
@@ -1065,6 +1062,7 @@
|
||||
<Content Include="scripts\popper-utils.min.js.map" />
|
||||
<Content Include="scripts\popper-utils.js.map" />
|
||||
<Content Include="Views\MacroPartials\Membership\Register.cshtml" />
|
||||
<Content Include="Views\Shared\EditorTemplates\EmailAddress.cshtml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<package id="ImageProcessor.Web.Config" version="2.5.0.100" targetFramework="net452" />
|
||||
<package id="jQuery" version="3.4.1" targetFramework="net452" />
|
||||
<package id="jQuery.UI.Combined" version="1.12.1" targetFramework="net452" />
|
||||
<package id="jquery.validate.unobtrusive.bootstrap" version="1.2.3" targetFramework="net452" />
|
||||
<package id="jQuery.Validation" version="1.19.1" targetFramework="net452" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net452" />
|
||||
<package id="Log4Net.Async" version="2.0.4" targetFramework="net452" />
|
||||
|
||||
@@ -1,115 +1,43 @@
|
||||
/*!
|
||||
* jQuery Validate Unobtrusive Bootstrap 1.2.3
|
||||
*
|
||||
* https://github.com/sandrocaseiro/jquery.validate.unobtrusive.bootstrap
|
||||
*
|
||||
* Copyright 2014 Sandro Caseiro
|
||||
* Released under the MIT license:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
(function ($) {
|
||||
if($.validator && $.validator.unobtrusive){
|
||||
var defaultOptions = {
|
||||
validClass: 'is-valid',
|
||||
errorClass: 'is-invalid',
|
||||
highlight: function (element, errorClass, validClass) {
|
||||
$(element)
|
||||
.removeClass(validClass)
|
||||
.addClass(errorClass);
|
||||
},
|
||||
unhighlight: function (element, errorClass, validClass) {
|
||||
$(element)
|
||||
.removeClass(errorClass)
|
||||
.addClass(validClass);
|
||||
}
|
||||
//,
|
||||
//errorElement: 'span',
|
||||
//errorPlacement: function(error, element) {
|
||||
// error.addClass('invalid-feedback');
|
||||
// var errElement =
|
||||
// $('field-validation-error[data-validation-for="' + element.id + '"]');
|
||||
// errElement.append(error);
|
||||
//}
|
||||
};
|
||||
|
||||
(function($)
|
||||
{
|
||||
function escapeAttributeValue(value)
|
||||
{
|
||||
// As mentioned on http://api.jquery.com/category/selectors/
|
||||
return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
|
||||
}
|
||||
$.validator.setDefaults(defaultOptions);
|
||||
|
||||
function addErrorClass(element)
|
||||
{
|
||||
var group = element.closest('.form-group');
|
||||
if (group && group.length > 0)
|
||||
{
|
||||
group.addClass('has-error').removeClass('has-success');
|
||||
}
|
||||
}
|
||||
|
||||
function addSuccessClass(element)
|
||||
{
|
||||
var group = element.closest('.form-group');
|
||||
if (group && group.length > 0)
|
||||
{
|
||||
group.addClass('has-success').removeClass('has-error');
|
||||
}
|
||||
}
|
||||
|
||||
function onError(formElement, errorPlacementBase, error, inputElement)
|
||||
{
|
||||
errorPlacementBase(error, inputElement);
|
||||
|
||||
if ($(inputElement).hasClass('input-validation-error'))
|
||||
{
|
||||
addErrorClass(inputElement)
|
||||
}
|
||||
}
|
||||
|
||||
function onSuccess(successBase, error)
|
||||
{
|
||||
var container = error.data("unobtrusiveContainer");
|
||||
|
||||
successBase(error);
|
||||
|
||||
if (container)
|
||||
{
|
||||
addSuccessClass(container);
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.validateBootstrap = function(refresh)
|
||||
{
|
||||
return this.each(function()
|
||||
{
|
||||
var $this = $(this);
|
||||
if (refresh)
|
||||
{
|
||||
$this.removeData('validator');
|
||||
$this.removeData('unobtrusiveValidation');
|
||||
$.validator.unobtrusive.parse($this);
|
||||
}
|
||||
|
||||
var validator = $this.data('validator');
|
||||
|
||||
if (validator)
|
||||
{
|
||||
validator.settings.errorClass += ' text-danger';
|
||||
var errorPlacementBase = validator.settings.errorPlacement;
|
||||
var successBase = validator.settings.success;
|
||||
|
||||
validator.settings.errorPlacement = function(error, inputElement)
|
||||
{
|
||||
onError($this, errorPlacementBase, error, inputElement);
|
||||
};
|
||||
|
||||
validator.settings.success = function(error)
|
||||
{
|
||||
onSuccess(successBase, error);
|
||||
}
|
||||
|
||||
$this.find('.input-validation-error').each(function()
|
||||
{
|
||||
var errorElement = $this.find("[data-valmsg-for='" + escapeAttributeValue($(this)[0].name) + "']");
|
||||
var newElement = $(document.createElement(validator.settings.errorElement))
|
||||
.addClass('text-danger')
|
||||
.attr('for', escapeAttributeValue($(this)[0].name))
|
||||
.text(errorElement.text());
|
||||
onError($this, errorPlacementBase, newElement, $(this));
|
||||
});
|
||||
}
|
||||
// if validation isn't enabled, but the form has the validation error message element, add error class to container
|
||||
else
|
||||
{
|
||||
$this.find('.input-validation-error').each(function()
|
||||
{
|
||||
addErrorClass($(this));
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$(function()
|
||||
{
|
||||
$('form').validateBootstrap();
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
$.validator.unobtrusive.options = {
|
||||
errorClass: defaultOptions.errorClass,
|
||||
validClass: defaultOptions.validClass,
|
||||
errorElement: 'span',
|
||||
errorPlacement: function (error, element) {
|
||||
error.addClass('invalid-feedback');
|
||||
var errElement =
|
||||
$('field-validation-error[data-validation-for="' + element.id + '"]');
|
||||
errElement.append(error);
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
console.warn('$.validator is not defined. Please load this library **after** loading jquery.validate.js and jquery.validate.unobtrusive.js');
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
(function(n){function t(n){return n.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function i(n){var t=n.closest(".form-group");t&&t.length>0&&t.addClass("has-error").removeClass("has-success")}function u(n){var t=n.closest(".form-group");t&&t.length>0&&t.addClass("has-success").removeClass("has-error")}function r(t,r,u,f){r(u,f);n(f).hasClass("input-validation-error")&&i(f)}function f(n,t){var i=t.data("unobtrusiveContainer");n(t);i&&u(i)}n.fn.validateBootstrap=function(u){return this.each(function(){var e=n(this),o,s,h;u&&(e.removeData("validator"),e.removeData("unobtrusiveValidation"),n.validator.unobtrusive.parse(e));o=e.data("validator");o?(o.settings.errorClass+=" text-danger",s=o.settings.errorPlacement,h=o.settings.success,o.settings.errorPlacement=function(n,t){r(e,s,n,t)},o.settings.success=function(n){f(h,n)},e.find(".input-validation-error").each(function(){var i=e.find("[data-valmsg-for='"+t(n(this)[0].name)+"']"),u=n(document.createElement(o.settings.errorElement)).addClass("text-danger").attr("for",t(n(this)[0].name)).text(i.text());r(e,s,u,n(this))})):e.find(".input-validation-error").each(function(){i(n(this))})})};n(function(){n("form").validateBootstrap()})})(jQuery);
|
||||
/*
|
||||
//# sourceMappingURL=jquery.validate.unobtrusive.bootstrap.min.js.map
|
||||
*/
|
||||
Binary file not shown.
Reference in New Issue
Block a user