diff --git a/admin/code/SecurityAdmin.php b/admin/code/SecurityAdmin.php index 4019bcd7b..60f954d8f 100644 --- a/admin/code/SecurityAdmin.php +++ b/admin/code/SecurityAdmin.php @@ -95,6 +95,10 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { } else { $form = $this->RootForm(); } + + $form->setTemplate($this->getTemplatesWithSuffix('_EditForm')); + if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet'); + $form->addExtraClass('center ss-tabset ' . $this->BaseCSSClasses()); return $form; } @@ -176,16 +180,14 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { function AddForm() { $form = parent::AddForm(); - $form->Actions()->fieldByName('action_doAdd')->setTitle(_t('AssetAdmin.ActionAdd', 'Add folder')); + $form->Actions()->fieldByName('action_doAdd')->setTitle(_t('SecurityAdmin.ActionAdd', 'Add group')); return $form; } public function memberimport() { Requirements::clear(); - Requirements::css(SAPPHIRE_DIR . '/css/Form.css'); - Requirements::css(CMS_DIR . '/css/typography.css'); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/cms_right.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/screen.css'); Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/jquery_improvements.js'); @@ -194,7 +196,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberImportForm.js'); return $this->renderWith('BlankPage', array( - 'Form' => $this->MemberImportForm() + 'Form' => $this->MemberImportForm(), + 'Content' => ' ' )); } @@ -216,9 +219,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { public function groupimport() { Requirements::clear(); - Requirements::css(SAPPHIRE_DIR . '/css/Form.css'); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/typography.css'); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/cms_right.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/screen.css'); Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/jquery_improvements.js'); diff --git a/admin/css/screen.css b/admin/css/screen.css index 5b9cc1e2b..11dfb4468 100755 --- a/admin/css/screen.css +++ b/admin/css/screen.css @@ -559,3 +559,6 @@ li.class-ErrorPage > a .jstree-pageicon { background-position: 0 -112px; } .ModelAdmin .cms-content-tools #SearchForm_holder div.tab form input { margin: 0px; } .ModelAdmin .cms-content-tools #SearchForm_holder div.tab form .field { border-bottom: 0px; margin-bottom: 6px; } .ModelAdmin .cms-content-tools #SearchForm_holder div.tab form .Actions button.ss-ui-action-minor { display: none; } + +.SecurityAdmin .cms-edit-form .cms-content-header h2 { display: none; } +.SecurityAdmin .permissioncheckboxset .optionset li { float: none; width: auto; } diff --git a/admin/scss/_SecurityAdmin.scss b/admin/scss/_SecurityAdmin.scss new file mode 100644 index 000000000..fcce6e34e --- /dev/null +++ b/admin/scss/_SecurityAdmin.scss @@ -0,0 +1,15 @@ +.SecurityAdmin { + .cms-edit-form .cms-content-header h2 { + display: none; + } + + // Same rules in .member-profile-form + .permissioncheckboxset { + .optionset { + li { + float: none; + width: auto; + } + } + } +} \ No newline at end of file diff --git a/admin/scss/screen.scss b/admin/scss/screen.scss index a899dee06..055d4908f 100644 --- a/admin/scss/screen.scss +++ b/admin/scss/screen.scss @@ -47,3 +47,4 @@ @import "tree.scss"; @import "menu.scss"; @import "ModelAdmin.scss"; +@import "SecurityAdmin.scss"; diff --git a/admin/templates/Includes/SecurityAdmin_Content.ss b/admin/templates/Includes/SecurityAdmin_Content.ss index 399ca517c..1c8547fd7 100644 --- a/admin/templates/Includes/SecurityAdmin_Content.ss +++ b/admin/templates/Includes/SecurityAdmin_Content.ss @@ -14,56 +14,6 @@ - <% with EditForm %> -
- <% end_with %> \ No newline at end of file diff --git a/javascript/PermissionCheckboxSetField.js b/javascript/PermissionCheckboxSetField.js index 5fdcb210f..8a40111f4 100644 --- a/javascript/PermissionCheckboxSetField.js +++ b/javascript/PermissionCheckboxSetField.js @@ -42,7 +42,8 @@ $('.permissioncheckboxset .valCMS_ACCESS_LeftAndMain input').entwine({ getCheckboxesExceptThisOne: function() { return $(this).parents('.field:eq(0)').find('li').filter(function(i) { - return ($(this).attr('class').match(/CMS_ACCESS_/)); + var klass = $(this).attr('class'); + return (klass ? klass.match(/CMS_ACCESS_/) : false); }).find('.checkbox').not(this); }, onmatch: function() { diff --git a/security/Security.php b/security/Security.php index 3a186d92c..dbcf72a04 100644 --- a/security/Security.php +++ b/security/Security.php @@ -366,8 +366,6 @@ class Security extends Controller { // only display tabs when more than one authenticator is provided // to save bandwidth and reduce the amount of custom styling needed if(count($forms) > 1) { - Requirements::css(SAPPHIRE_DIR . "/css/Form.css"); - // Needed because the