getAuthPassword());
});
/*
* Some macros and blade extensions
*/
Form::macro('rawLabel', function($name, $value = null, $options = array()) {
$label = Form::label($name, '%s', $options);
return sprintf($label, $value);
});
Form::macro('labelWithHelp', function($name, $value = null, $options = array(), $help_text) {
$label = Form::label($name, '%s', $options);
return sprintf($label, $value)
.''
. ''
. '';
});
Form::macro('customCheckbox', function($name, $value, $checked=FALSE, $label = FALSE, $options= []) {
// $checkbox = Form::checkbox($name, $value = null, $checked, $options);
// $label = Form::rawLabel();
//
// $out = '
//
//
//
';
//
// return $out;
});
Form::macro('styledFile', function($name, $multiple = FALSE) {
$out = '';
return $out;
});
HTML::macro('sortable_link', function($title, $active_sort, $sort_by, $sort_order, $url_params = [], $class = '', $extra = '') {
$sort_order = $sort_order == 'asc' ? 'desc' : 'asc';
$url_params = http_build_query([
'sort_by' => $sort_by,
'sort_order' => $sort_order
] + $url_params);
$html = "";
$html .= ($active_sort == $sort_by) ? "$title" : $title;
$html .= ($sort_order == 'desc') ? '' : '';
$html .= '';
return $html;
});
Blade::directive('money', function($expression) {
return "";
});