mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
Removed AdminName and AdminEmail fields from subsite creation
This commit is contained in:
parent
8b40cf3726
commit
0b85efb117
@ -67,9 +67,9 @@ class SubsiteAdmin extends GenericDataAdmin {
|
|||||||
'subsite' => 'New site',
|
'subsite' => 'New site',
|
||||||
'template' => 'New template',
|
'template' => 'New template',
|
||||||
)),
|
)),
|
||||||
new DropdownField('TemplateID', 'Use template:', $templateArray),
|
new DropdownField('TemplateID', 'Use template:', $templateArray)//,
|
||||||
new TextField('AdminName', 'Admin name:'),
|
/*new TextField('AdminName', 'Admin name:'),
|
||||||
new EmailField('AdminEmail', 'Admin email:')
|
new EmailField('AdminEmail', 'Admin email:')*/
|
||||||
),
|
),
|
||||||
new FieldSet(
|
new FieldSet(
|
||||||
new FormAction('addintranet', 'Add')
|
new FormAction('addintranet', 'Add')
|
||||||
@ -82,6 +82,7 @@ class SubsiteAdmin extends GenericDataAdmin {
|
|||||||
|
|
||||||
function addintranet($data, $form) {
|
function addintranet($data, $form) {
|
||||||
if($data['Name'] && $data['Subdomain']) {
|
if($data['Name'] && $data['Subdomain']) {
|
||||||
|
/*
|
||||||
$SQL_email = Convert::raw2sql($data['AdminEmail']);
|
$SQL_email = Convert::raw2sql($data['AdminEmail']);
|
||||||
$member = DataObject::get_one('Member', "`Email`='$SQL_email'");
|
$member = DataObject::get_one('Member', "`Email`='$SQL_email'");
|
||||||
|
|
||||||
@ -93,6 +94,7 @@ class SubsiteAdmin extends GenericDataAdmin {
|
|||||||
$member->Email = $data['AdminEmail'];
|
$member->Email = $data['AdminEmail'];
|
||||||
$member->write();
|
$member->write();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
$template = DataObject::get_by_id('Subsite_Template', $data['TemplateID']);
|
$template = DataObject::get_by_id('Subsite_Template', $data['TemplateID']);
|
||||||
|
|
||||||
@ -132,7 +134,9 @@ class SubsiteAdmin extends GenericDataAdmin {
|
|||||||
$groupObjects[$name] = $group;
|
$groupObjects[$name] = $group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
$member->Groups()->add($groupObjects['Administrators']);
|
$member->Groups()->add($groupObjects['Administrators']);
|
||||||
|
*/
|
||||||
|
|
||||||
Director::redirect('admin/subsites/show/' . $intranet->ID);
|
Director::redirect('admin/subsites/show/' . $intranet->ID);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user