Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2017-12-28 02:45:16 +01:00
commit 75daa449c1
2 changed files with 7 additions and 8 deletions

View File

@ -2916,14 +2916,9 @@ class Util
*/
public static function getFKCheckbox()
{
$checked = self::isForeignKeyCheck();
$html = '<input type="hidden" name="fk_checks" value="0" />';
$html .= '<input type="checkbox" name="fk_checks"'
. ' id="fk_checks" value="1"'
. ($checked ? ' checked="checked"' : '') . '/>';
$html .= '<label for="fk_checks">' . __('Enable foreign key checks')
. '</label>';
return $html;
return Template::get('fk_checkbox')->render([
'checked' => self::isForeignKeyCheck(),
]);
}
/**

View File

@ -0,0 +1,4 @@
<input type="hidden" name="fk_checks" value="0">
<input type="checkbox" name="fk_checks" id="fk_checks" value="1"
{{- checked ? ' checked' }}>
<label for="fk_checks">{% trans 'Enable foreign key checks' %}</label>