This commit is contained in:
James Cole
2016-04-24 07:18:39 +02:00
parent 8883d185fe
commit b8e1944d20
12 changed files with 298 additions and 16 deletions

View File

@@ -20,6 +20,31 @@ use Session;
class ExpandedForm
{
/**
* @param $name
* @param null $value
* @param array $options
*
* @return string
*/
public function amountSmall(string $name, $value = null, array $options = []): string
{
$label = $this->label($name, $options);
$options = $this->expandOptionArray($name, $label, $options);
$classes = $this->getHolderClasses($name);
$value = $this->fillFieldValue($name, $value);
$options['step'] = 'any';
$options['min'] = '0.01';
$defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency();
$currencies = Amt::getAllCurrencies();
unset($options['currency']);
unset($options['placeholder']);
$html = view('form.amount-small', compact('defaultCurrency', 'currencies', 'classes', 'name', 'value', 'options'))->render();
return $html;
}
/**
* @param $name
* @param null $value
@@ -261,6 +286,7 @@ class ExpandedForm
return $html;
}
/**
* @param $name