How to create a InputWidget that set a ActiveField's template propery?

I have the following codes:

$form->field($model, 'username', [

    'template' => '<div class=\"input-group\">{input}<span class=\"input-group-addon\">Select Files</span></div>',


which generates the following HTML:

<div class="form-group field-newslanguage-username required">

    <div class="input-group">

        <input type="text" id="newslanguage-username" class="form-control" name="NewsLanguage[username]">

        <span class="input-group-addon">Select Files</span>



Any idea I could create a InputWidget class so that I don’t have to set the template every time, something like this: