parent
4fb2b621ee
commit
3b190d7d81
|
@ -83,17 +83,17 @@ class ComponentForm extends Form
|
||||||
((isset($formData['create_new_pane']) && $formData['create_new_pane'] != false) &&
|
((isset($formData['create_new_pane']) && $formData['create_new_pane'] != false) &&
|
||||||
(false === isset($formData['use_existing_dashboard']) || $formData['use_existing_dashboard'] != true))
|
(false === isset($formData['use_existing_dashboard']) || $formData['use_existing_dashboard'] != true))
|
||||||
) {
|
) {
|
||||||
$groupElements[] = $this->createElement(
|
$this->addElement(
|
||||||
'text',
|
'text',
|
||||||
'pane',
|
'pane',
|
||||||
array(
|
array(
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'label' => t("New Pane Title"),
|
'label' => t("New Dashboard Title"),
|
||||||
'description' =>
|
'description' =>
|
||||||
t('Enter a title for the new pane.')
|
t('Enter a title for the new pane.')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$groupElements[] = $this->createElement( // Prevent the button from being displayed again on validation errors
|
$this->addElement( // Prevent the button from being displayed again on validation errors
|
||||||
'hidden',
|
'hidden',
|
||||||
'create_new_pane',
|
'create_new_pane',
|
||||||
array(
|
array(
|
||||||
|
@ -106,21 +106,20 @@ class ComponentForm extends Form
|
||||||
'use_existing_dashboard',
|
'use_existing_dashboard',
|
||||||
array(
|
array(
|
||||||
'ignore' => true,
|
'ignore' => true,
|
||||||
'label' => t('Use An Existing Pane'),
|
'label' => t('Use An Existing Dashboard'),
|
||||||
'description' =>
|
'class' => 'link-like'
|
||||||
t('Click on the button to add the dashlet to an existing pane on your dashboard.')
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$buttonExistingPane->removeDecorator('Label');
|
$buttonExistingPane->removeDecorator('Label');
|
||||||
$groupElements[] = $buttonExistingPane;
|
$this->addElement($buttonExistingPane);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$groupElements[] = $this->createElement(
|
$this->addElement(
|
||||||
'select',
|
'select',
|
||||||
'pane',
|
'pane',
|
||||||
array(
|
array(
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'label' => t('Pane'),
|
'label' => t('Dashboard'),
|
||||||
'multiOptions' => $panes,
|
'multiOptions' => $panes,
|
||||||
'description' =>
|
'description' =>
|
||||||
t('Select a pane you want to add the dashlet.')
|
t('Select a pane you want to add the dashlet.')
|
||||||
|
@ -131,34 +130,13 @@ class ComponentForm extends Form
|
||||||
'create_new_pane',
|
'create_new_pane',
|
||||||
array(
|
array(
|
||||||
'ignore' => true,
|
'ignore' => true,
|
||||||
'label' => t('Create A New Pane'),
|
'label' => t('Create A New Dashboard'),
|
||||||
'description' =>
|
'class' => 'link-like',
|
||||||
t('Click on the button if you want to add the dashlet to a new pane on the dashboard.')
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$buttonNewPane->removeDecorator('Label');
|
$buttonNewPane->removeDecorator('Label');
|
||||||
$groupElements[] = $buttonNewPane;
|
$this->addElement($buttonNewPane);
|
||||||
}
|
}
|
||||||
$this->addDisplayGroup(
|
|
||||||
$groupElements,
|
|
||||||
'pane_group',
|
|
||||||
array(
|
|
||||||
'legend' => t('Pane'),
|
|
||||||
'description' => t(
|
|
||||||
'Decide if you want add the dashlet to an existing pane'
|
|
||||||
. ' or create a new pane. Have a look on the button below.'
|
|
||||||
),
|
|
||||||
'decorators' => array(
|
|
||||||
'FormElements',
|
|
||||||
array('HtmlTag', array('tag' => 'div', 'class' => 'control-group')),
|
|
||||||
array(
|
|
||||||
'Description',
|
|
||||||
array('tag' => 'span', 'class' => 'description', 'placement' => 'prepend')
|
|
||||||
),
|
|
||||||
'Fieldset'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -104,7 +104,7 @@ form.inline {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.link-like input[type="submit"], form.link-like button[type="submit"] {
|
form.link-like input[type="submit"], form.link-like button[type="submit"], input.link-like, button.link-like {
|
||||||
color: @colorLinkDefault;
|
color: @colorLinkDefault;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -114,7 +114,11 @@ form.link-like input[type="submit"], form.link-like button[type="submit"] {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.link-like input[type="submit"]:hover, form.link-like input[type="submit"]:focus, form.link-like button[type="submit"]:hover, orm.link-like button[type="submit"]:focus {
|
form.link-like input[type="submit"]:hover,
|
||||||
|
form.link-like input[type="submit"]:focus,
|
||||||
|
form.link-like button[type="submit"]:hover,
|
||||||
|
form.link-like button[type="submit"]:focus,
|
||||||
|
input.link-like:hover, button.link-like:focus {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
background: none;
|
background: none;
|
||||||
color: @colorLinkDefault;
|
color: @colorLinkDefault;
|
||||||
|
|
Loading…
Reference in New Issue