Skip to content

Commit

Permalink
Dev Added support for link setting type.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Jul 26, 2014
1 parent fbb7ae7 commit 0d8d2b4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions application/extensions/SettingsWidget/SettingsWidget.php
Expand Up @@ -431,6 +431,24 @@ public function renderPassword($name, array $metaData, $form = null)
return $out;
}

public function renderLink($name, array $metaData, $form = null)
{
$out = '';
$id = $name;
if (isset($metaData['label']))
{
$out .= CHtml::label($metaData['label'], $id);
}

$metaData['class'][] = 'btn';
$out .= CHtml::link($metaData['label'], $metaData['link'], array(

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Aug 18, 2014

Collaborator

Can we support different label an link text ?

Something like :

     $metaData['text'] = isset($metaData['text'])?$metaData['text']:$metaData['label'];

This comment has been minimized.

Copy link
@SamMousa

SamMousa Aug 18, 2014

Author Contributor

Yes we could; feel free to add it!

'id' => $id,
'style' => $metaData['style'],
'class' => implode(' ', $metaData['class'])
));
return $out;
}

public function renderList($name, array $metaData, $form = null)
{
$id = $name;
Expand Down

0 comments on commit 0d8d2b4

Please sign in to comment.