Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
MINOR Removed unnecessary "type" field from LeftAndMain->AddForm(), a…
…dded generic styles for buttons
  • Loading branch information
chillu committed Apr 23, 2011
1 parent d21dce0 commit a2b39e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 3 additions & 4 deletions admin/code/LeftAndMain.php
Expand Up @@ -850,18 +850,17 @@ function AddForm() {
$class = $this->stat('tree_class');

$typeMap = array($class => singleton($class)->i18n_singular_name());
$typeField = new DropdownField('Type', false, $typeMap, $class);
$form = new Form(
$this,
'AddForm',
new FieldSet(
new HiddenField('ParentID'),
$typeField->performReadonlyTransformation()
new HiddenField('ParentID')
),
new FieldSet(
new FormAction('doAdd', _t('AssetAdmin_left.ss.GO','Go'))
$addAction = new FormAction('doAdd', _t('AssetAdmin_left.ss.GO','Go'))
)
);
$addAction->addExtraClass('ss-ui-action-constructive');
$form->addExtraClass('actionparams');
$form->addExtraClass('add-form');

Expand Down
12 changes: 11 additions & 1 deletion admin/scss/_forms.scss
Expand Up @@ -15,8 +15,18 @@
background: #fff url(../../images/network-save.gif) no-repeat center left;
}

// Buttons

.ui-state-default.ss-ui-action-constructive {
@include linear-gradient(color-stops(#77b53f, #0c8a44));
color: white;
}

.ui-state-default.ss-ui-action-destructive {
color: red;
}

.edit-form {

padding-bottom: 20px;

// Hide first level tabs for CMS, see CMSEditForm.ss
Expand Down

0 comments on commit a2b39e5

Please sign in to comment.