Skip to content

Commit

Permalink
Fix #173: Styling for FileInput additional line feed
Browse files Browse the repository at this point in the history
Fix #173: Styling for FileInput additional line feed
  • Loading branch information
kartik-v committed Oct 15, 2014
1 parent c5438db commit 8a90b70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version 3.1.0

1. enh #169: Enhancement for ICU format conversion for DatePicker and DateTimePicker (enrica, kartik-v).
2. bug #172: More correct InputWidget name field parsing.
3. enh #173: Fix styling for FileInput additional line feed.

version 3.0.0
=============
Expand Down
7 changes: 3 additions & 4 deletions FileInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
* @see https://github.com/kartik-v/bootstrap-fileinput
*
* @author Kartik Visweswaran <[email protected]>
* @since 2.0: C
*
* @since 2.0
* @see http://twitter.github.com/typeahead.js/examples
*/
class FileInput extends InputWidget
Expand Down Expand Up @@ -72,7 +71,7 @@ public function init()
$validation = ArrayHelper::getValue($this->pluginOptions, 'showPreview', true) ? 'file preview and multiple file upload' : 'multiple file upload';
$message = '<strong>' . Yii::t('fileinput', 'Note:') . '</strong> ' . Yii::t('fileinput', 'Your browser does not support {validation}. Try an alternative or more recent browser to access these features.', ['validation' => $validation]);
$content = Html::tag('div', $message, $this->messageOptions) . "<script>{$id}.removeClass('file-loading');</script>";
$input .= "\n<br>" . $this->validateIE($content);
$input .= "\n" . $this->validateIE($content);
}
echo $input;
}
Expand All @@ -86,7 +85,7 @@ public function init()
*/
protected function validateIE($content, $validation = 'lt IE 10')
{
return "<!--[if {$validation}]>{$content}<![endif]-->";
return "<!--[if {$validation}]><br>{$content}<![endif]-->";
}

/**
Expand Down

0 comments on commit 8a90b70

Please sign in to comment.