Skip to content

Commit

Permalink
FIX Move nested form template to FQCN location. Port CMS save/publish…
Browse files Browse the repository at this point in the history
… styles from core.
  • Loading branch information
robbieaverill committed Jan 30, 2017
1 parent 1a38a70 commit c0b4242
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Buttons/BetterButton_Publish.php
Expand Up @@ -40,8 +40,8 @@ public function baseTransform()
{
parent::baseTransform();
return $this
->setAttribute('data-icon', 'accept')
->setAttribute('data-icon-alternate', 'disk')
->addExtraClass('btn-secondary-outline font-icon-check-mark')
->setAttribute('data-btn-alternate', 'btn action btn-primary font-icon-rocket')
->setAttribute('data-text-alternate', _t('SiteTree.BUTTONSAVEPUBLISH', 'Save & publish'));
}

Expand Down
4 changes: 2 additions & 2 deletions src/Buttons/BetterButton_SaveDraft.php
Expand Up @@ -41,8 +41,8 @@ public function baseTransform()
parent::baseTransform();

return $this
->setAttribute('data-icon', 'accept')
->setAttribute('data-icon-alternate', 'addpage')
->addExtraClass('btn-secondary-outline font-icon-check-mark')
->setAttribute('data-btn-alternate', 'btn action btn-primary font-icon-save')
->setAttribute('data-text-alternate', _t('CMSMain.SAVEDRAFT', 'Save draft'));
}

Expand Down
8 changes: 4 additions & 4 deletions src/FormFields/DropdownFormAction.php
Expand Up @@ -61,9 +61,9 @@ public function __construct($title = null, $children = array ())
*/
public function Field($properties = array ())
{
Requirements::css(BETTER_BUTTONS_DIR.'/css/dropdown_form_action.css');
Requirements::javascript(BETTER_BUTTONS_DIR.'/javascript/dropdown_form_action.js');
$this->setAttribute('data-form-action-dropdown', '#'.$this->DropdownID());
Requirements::css(BETTER_BUTTONS_DIR . '/css/dropdown_form_action.css');
Requirements::javascript(BETTER_BUTTONS_DIR . '/javascript/dropdown_form_action.js');
$this->setAttribute('data-form-action-dropdown', '#' . $this->DropdownID());

return parent::Field();
}
Expand All @@ -75,7 +75,7 @@ public function Field($properties = array ())
*/
public function DropdownID()
{
return 'form-action-dropdown-'.$this->identifier;
return 'form-action-dropdown-' . $this->identifier;
}

/**
Expand Down

0 comments on commit c0b4242

Please sign in to comment.