File tree Expand file tree Collapse file tree
src/TypiCMS/BootForms/Elements Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ public function type($type)
3131 return $ this ;
3232 }
3333
34- protected function renderAddons ($ addons )
34+ protected function renderAddons ($ addons, $ class )
3535 {
3636 $ html = '' ;
3737
3838 foreach ($ addons as $ addon ) {
39- $ html .= '<span class="input-group-addon "> ' ;
39+ $ html .= sprintf ( '<span class="input-group-%s "> ' , $ class ) ;
4040 $ html .= $ addon ;
4141 $ html .= '</span> ' ;
4242 }
@@ -47,9 +47,9 @@ protected function renderAddons($addons)
4747 public function render ()
4848 {
4949 $ html = '<div class="input-group"> ' ;
50- $ html .= $ this ->renderAddons ($ this ->beforeAddon );
50+ $ html .= $ this ->renderAddons ($ this ->beforeAddon , ' prepend ' );
5151 $ html .= parent ::render ();
52- $ html .= $ this ->renderAddons ($ this ->afterAddon );
52+ $ html .= $ this ->renderAddons ($ this ->afterAddon , ' append ' );
5353 $ html .= '</div> ' ;
5454
5555 return $ html ;
You can’t perform that action at this time.
0 commit comments