Skip to content

Commit dfc0243

Browse files
committed
Created modal UI by copying from Angular site.
1 parent e328388 commit dfc0243

File tree

3 files changed

+61
-3
lines changed

3 files changed

+61
-3
lines changed

src/AbpCompanyName.AbpProjectName.WebMpa/AbpCompanyName.AbpProjectName.WebMpa.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@
379379
<Content Include="Views\Account\Login.min.css">
380380
<DependentUpon>Login.css</DependentUpon>
381381
</Content>
382+
<Content Include="Views\Tenants\Index.js" />
382383
<Content Include="Web.config">
383384
<SubType>Designer</SubType>
384385
</Content>

src/AbpCompanyName.AbpProjectName.WebMpa/Views/Tenants/Index.cshtml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
@model Abp.Application.Services.Dto.ListResultOutput<AbpCompanyName.AbpProjectName.MultiTenancy.Dto.TenantListDto>
1+
@using Abp.Web.Mvc.Extensions
2+
@using AbpCompanyName.AbpProjectName.MultiTenancy
3+
@model Abp.Application.Services.Dto.ListResultOutput<AbpCompanyName.AbpProjectName.MultiTenancy.Dto.TenantListDto>
24
@{
35
ViewBag.ActiveMenu = "Tenants"; //The menu item will be active for this page.
46
}
7+
@section scripts
8+
{
9+
@Html.IncludeScript("~/Views/Tenants/Index.js")
10+
}
511
<div>
612
<h1>@L("Tenants")</h1>
713
<div class="row">
814
<div class="col-md-12">
9-
<button ng-click="vm.openTenantCreationModal()" class="btn btn-primary pull-right"><i class="fa fa-plus"></i> @L("CreateNewTenant")</button>
15+
<button data-toggle="modal" data-target="#TenantCreateModal" class="btn btn-primary pull-right"><i class="fa fa-plus"></i> @L("CreateNewTenant")</button>
1016
<table class="table">
1117
<thead>
1218
<tr>
@@ -26,4 +32,45 @@
2632
</table>
2733
</div>
2834
</div>
29-
</div>
35+
</div>
36+
37+
<div class="modal fade" id="TenantCreateModal" tabindex="-1" role="dialog" aria-labelledby="TenantCreateModalLabel">
38+
<div class="modal-dialog" role="document">
39+
<div class="modal-content">
40+
<form name="tenantCreateForm" role="form" novalidate class="form-validation">
41+
<div class="modal-header">
42+
<h4 class="modal-title">
43+
<span>@L("CreateNewTenant")</span>
44+
</h4>
45+
</div>
46+
<div class="modal-body">
47+
48+
<div class="form-group form-md-line-input form-md-floating-label no-hint">
49+
<label>@L("TenancyName")</label>
50+
<input auto-focus class="form-control" type="text" name="TenancyName" ng-model="vm.tenant.tenancyName" required maxlength="@Tenant.MaxTenancyNameLength" ng-pattern="/@Tenant.TenancyNameRegex/">
51+
</div>
52+
<div>
53+
<span class="help-block text-danger" ng-show="!tenantCreateForm.TenancyName.$valid && tenantCreateForm.TenancyName.$dirty">@L("TenantName_Regex_Description")</span>
54+
</div>
55+
56+
<div class="form-group form-md-line-input form-md-floating-label no-hint">
57+
<label>@L("Name")</label>
58+
<input type="text" name="Name" class="form-control" ng-model="vm.tenant.name" required maxlength="@Tenant.MaxNameLength">
59+
</div>
60+
61+
<div class="form-group form-md-line-input form-md-floating-label no-hint">
62+
<label>@L("AdminEmailAddress")</label>
63+
<input type="email" name="AdminEmailAddress" class="form-control" ng-model="vm.tenant.adminEmailAddress" required maxlength="@AbpCompanyName.AbpProjectName.Users.User.MaxEmailAddressLength">
64+
</div>
65+
66+
<p>@L("DefaultPasswordIs", AbpCompanyName.AbpProjectName.Users.User.DefaultPassword)</p>
67+
68+
</div>
69+
<div class="modal-footer">
70+
<button type="button" class="btn btn-default" data-dismiss="modal">@L("Cancel")</button>
71+
<button id="TenantCreateModalSaveButton" type="submit" class="btn btn-primary blue" ng-disabled="tenantCreateForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
72+
</div>
73+
</form>
74+
</div>
75+
</div>
76+
</div>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(function() {
2+
$(function() {
3+
4+
$('#TenantCreateModalSaveButton').click(function(e) {
5+
e.preventDefault();
6+
alert('saving...');
7+
});
8+
9+
});
10+
})();

0 commit comments

Comments
 (0)