Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Commit 475a645

Browse files
author
Stefan Cullmann
committed
Description
1 parent 974d98f commit 475a645

File tree

6 files changed

+50
-29
lines changed

6 files changed

+50
-29
lines changed

Components/PortalGroupAdapter.cs

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public IEnumerable<PortalGroupInfo> SiteGroups()
2222
{
2323
AuthenticationDomain = g.AuthenticationDomain,
2424
PortalGroupId = g.PortalGroupId,
25+
Description = g.PortalGroupDescription,
2526
MasterPortal = new PortalInfo
2627
{
2728
PortalName = g.MasterPortalName,
@@ -76,6 +77,7 @@ int UpdatePortalGroup(PortalGroupInfo portalGroup)
7677
var @group = PortalGroupController.GetPortalGroups().Single(g => g.PortalGroupId == portalGroup.PortalGroupId);
7778
@group.PortalGroupName = portalGroup.PortalGroupName;
7879
@group.AuthenticationDomain = portalGroup.AuthenticationDomain;
80+
@group.PortalGroupDescription = portalGroup.Description;
7981
PortalGroupController.UpdatePortalGroup(@group);
8082
var currentPortals = PortalsOfGroup(portalGroup.PortalGroupId, portalGroup.MasterPortal.PortalId).ToList();
8183
foreach (var portal in currentPortals)

DTOs/PortalGroupInfo.cs

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ public class PortalGroupInfo
99
public string AuthenticationDomain { get; set; }
1010
public PortalInfo MasterPortal { get; set; }
1111
public IEnumerable<PortalInfo> Portals { get; set; }
12+
public string Description { get; set; }
1213
}
1314
}

SiteGroups.Web/src/components/Editor.jsx

+26-13
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,28 @@ import Button from "dnn-button";
66
import AssignedSelector from "./AssignedSelector";
77
//import Label from "dnn-label";
88
import SingleLineInputWithError from "dnn-single-line-input-with-error";
9+
import MultiLineInputWithError from "dnn-multi-line-input-with-error";
910
import "./Editor.less";
1011

1112
export default class SiteGroupEditor extends React.Component {
1213
constructor(props) {
1314
super(props);
1415
}
15-
16+
1617
render() {
1718
return <div className="sitegroup-details-editor">
1819
<GridCell>
1920
<Grid numberOfColums={2}>
2021
<div className="editor-container">
22+
<div className="editor-row divider">
23+
<SingleLineInputWithError
24+
value={this.props.group.MasterPortal.PortalName}
25+
enabled={false}
26+
label={Resx.get("MasterSite.Label")}
27+
tooltipMessage={Resx.get("MasterSite.Help")}
28+
inputStyle={{ marginBottom: 15 }}
29+
tabIndex={1} />
30+
</div>
2131
<div className="editor-row divider">
2232
<SingleLineInputWithError
2333
value={this.props.portalGroupName}
@@ -30,33 +40,34 @@ export default class SiteGroupEditor extends React.Component {
3040
errorMessage={Resx.get("GroupName.Required")}
3141
autoComplete="off"
3242
inputStyle={{ marginBottom: 15 }}
33-
tabIndex={1} />
43+
tabIndex={2} />
3444
</div>
3545
</div>
3646
<div className="editor-container right-column">
37-
<div className="editor-row divider">
38-
<SingleLineInputWithError
39-
value={this.props.group.MasterPortal.PortalName}
40-
enabled={false}
41-
label={Resx.get("MasterSite.Label")}
42-
tooltipMessage={Resx.get("MasterSite.Help")}
43-
inputStyle={{ marginBottom: 15 }}
44-
tabIndex={2} />
45-
</div>
4647
<div className="editor-row divider">
4748
<SingleLineInputWithError
4849
value={this.props.authenticationDomain}
4950
enabled={true}
5051
onChange={(e) => this.props.onAuthenticationDomainChanged(e.target.value)}
5152
maxLength={50}
52-
error={this.props.errors.authenticationDomain}
5353
label={Resx.get("AuthenticationDomain.Label")}
5454
tooltipMessage={Resx.get("AuthenticationDomain.Help")}
55-
errorMessage={Resx.get("AuthenticationDomain.Required")}
5655
autoComplete="off"
5756
inputStyle={{ marginBottom: 15 }}
5857
tabIndex={3} />
5958
</div>
59+
<div className="editor-row divider">
60+
<MultiLineInputWithError
61+
value={this.props.description}
62+
enabled={true}
63+
onChange={(e) => this.props.onDescriptionChanged(e.target.value)}
64+
maxLength={50}
65+
label={Resx.get("Description.Label")}
66+
tooltipMessage={Resx.get("Description.Help")}
67+
autoComplete="off"
68+
inputStyle={{ marginBottom: 15 }}
69+
tabIndex={4} />
70+
</div>
6071
</div>
6172
</Grid>
6273
<div className="selector-container">
@@ -83,13 +94,15 @@ SiteGroupEditor.propTypes = {
8394
portalGroupName: React.PropTypes.string,
8495
errors: React.PropTypes.object,
8596
authenticationDomain: React.PropTypes.string,
97+
description: React.PropTypes.string,
8698
portals: React.PropTypes.array,
8799
group: React.PropTypes.object,
88100
unassignedSites: React.PropTypes.array,
89101
onCancel: React.PropTypes.func,
90102
onDeleteGroup: React.PropTypes.func,
91103
onSave: React.PropTypes.func,
92104
onGroupNameChanged: React.PropTypes.func,
105+
onDescriptionChanged: React.PropTypes.func,
93106
onAuthenticationDomainChanged: React.PropTypes.func,
94107
onClickOnPortal: React.PropTypes.func,
95108
onMoveItemsLeft: React.PropTypes.func,

SiteGroups.Web/src/components/Editor.less

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,12 @@
6969
vertical-align: middle;
7070
margin-top: 9px;
7171
}
72-
.dnn-single-line-input-with-error, input {
72+
.dnn-single-line-input-with-error,.dnn-multi-line-input-with-error, input {
7373
width: 100%;
7474
}
75+
.dnn-multi-line-input-with-error textarea {
76+
min-height:0;
77+
}
7578
&.divider {
7679
padding-bottom: 15px;
7780
.dnn-uicommon-select, .dnn-ui-common-single-line-input {

SiteGroups.Web/src/components/Row.jsx

+7-8
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export default class SiteGroupRow extends React.Component {
1212
this.state = {
1313
PortalGroupName: props.group.PortalGroupName || "",
1414
AuthenticationDomain: props.group.AuthenticationDomain,
15+
Description: props.group.Description,
1516
Portals: JSON.parse(JSON.stringify(props.group.Portals)) || [],
1617
UnassignedSites: JSON.parse(JSON.stringify(props.unassignedSites || []))
1718
.filter((site) => site.PortalId !== this.props.group.MasterPortal.PortalId),
1819
errors: {
1920
groupName: false,
20-
authenticationDomain: false,
2121
},
2222
};
2323
this.submitted = false;
@@ -129,6 +129,7 @@ export default class SiteGroupRow extends React.Component {
129129
this.setState({
130130
PortalGroupName: props.group.PortalGroupName || "",
131131
AuthenticationDomain: props.group.AuthenticationDomain,
132+
Description: props.group.Description,
132133
Portals: JSON.parse(JSON.stringify(props.group.Portals)),
133134
UnassignedSites: JSON.parse(JSON.stringify(props.unassignedSites)),
134135
errors: {
@@ -142,18 +143,12 @@ export default class SiteGroupRow extends React.Component {
142143
let valid = true;
143144
if (this.submitted) {
144145
let {PortalGroupName} = this.state;
145-
let {AuthenticationDomain} = this.state;
146146
let {errors} = this.state;
147147
errors.groupName = false;
148-
errors.authenticationDomain = false;
149148
if (PortalGroupName === "") {
150149
errors.groupName = true;
151150
valid = false;
152151
}
153-
if (AuthenticationDomain === "") {
154-
errors.authenticationDomain = true;
155-
valid = false;
156-
}
157152
this.setState({ errors });
158153
}
159154
return valid;
@@ -167,6 +162,7 @@ export default class SiteGroupRow extends React.Component {
167162
PortalGroupName: this.state.PortalGroupName,
168163
MasterPortal: this.props.group.MasterPortal,
169164
Portals: this.state.Portals,
165+
Description: this.state.Description,
170166
},
171167
UnassignedSites: this.state.UnassignedSites,
172168
};
@@ -193,6 +189,7 @@ export default class SiteGroupRow extends React.Component {
193189
group={this.props.group}
194190
portalGroupName={this.state.PortalGroupName}
195191
authenticationDomain={this.state.AuthenticationDomain}
192+
description={this.state.Description}
196193
errors={this.state.errors}
197194
unassignedSites={this.state.UnassignedSites}
198195
portals={this.state.Portals}
@@ -202,7 +199,9 @@ export default class SiteGroupRow extends React.Component {
202199
onSave={() => this.save()}
203200
onAuthenticationDomainChanged={(value) => {
204201
this.setState({ AuthenticationDomain: value });
205-
this.isValid();
202+
}}
203+
onDescriptionChanged={(value) => {
204+
this.setState({ Description: value });
206205
}}
207206
onGroupNameChanged={(value) => {
208207
this.setState({ PortalGroupName: value });

admin/personaBar/App_LocalResources/SiteGroups.resx

+10-7
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,8 @@
132132
<data name="AuthenticationDomain.Label" xml:space="preserve">
133133
<value>Authentication Domain:</value>
134134
</data>
135-
<data name="AuthenticationDomain.Description" xml:space="preserve">
136-
<value>All sites with the same auth.domain share the auth cookie.</value>
137-
</data>
138-
<data name="AuthenticationDomain.Required" xml:space="preserve">
139-
<value>An authentication domain is required</value>
135+
<data name="AuthenticationDomain.Help" xml:space="preserve">
136+
<value>Typically not required.</value>
140137
</data>
141138
<data name="EditModule_Unassigned.Label" xml:space="preserve">
142139
<value>Unassigned</value>
@@ -150,11 +147,17 @@
150147
<data name="GroupName.Label" xml:space="preserve">
151148
<value>Group Name:</value>
152149
</data>
153-
<data name="GroupName.Description" xml:space="preserve">
150+
<data name="GroupName.Help" xml:space="preserve">
154151
<value>The name helps to identifier the group.</value>
155152
</data>
156153
<data name="GroupName.Required" xml:space="preserve">
157154
<value>A group name is required</value>
155+
</data>
156+
<data name="Description.Label" xml:space="preserve">
157+
<value>Description:</value>
158+
</data>
159+
<data name="Description.Help" xml:space="preserve">
160+
<value>Describe your site group</value>
158161
</data>
159162
<data name="Edit.Button" xml:space="preserve">
160163
<value>Edit</value>
@@ -165,7 +168,7 @@
165168
<data name="MasterSite.Label" xml:space="preserve">
166169
<value>Master Site:</value>
167170
</data>
168-
<data name="MasterSite.Description" xml:space="preserve">
171+
<data name="MasterSite.Help" xml:space="preserve">
169172
<value>Master Site</value>
170173
</data>
171174
<data name="ChooseASite.Label" xml:space="preserve">

0 commit comments

Comments
 (0)