add default account to frontend

This commit is contained in:
2015-10-26 07:49:10 +01:00
parent 0c92fdf167
commit 01da3c470c
45 changed files with 948 additions and 220 deletions

View File

@@ -17,9 +17,10 @@ class HtmlHelper{
* @see ReceptionCardNumberWidget
* @see ReceptionMenuWidget
* */
public static function mkReceptionCardBtn($card, $label,$route = null ){
public static function mkReceptionCardBtn($recptionForm, $label,$route = null ){
$url = null;
$card = $recptionForm->card;
$classes = 'btn btn-primary btn-reception';
if ( $card == null ){
$classes .= ' disabled';
@@ -29,10 +30,25 @@ class HtmlHelper{
}
return Html::a( $label , $url, ['class' => $classes ] );
}
public static function mkReceptionBtn($card, $label,$route = null ){
public static function mkReceptionCustomerBtn($recptionForm, $label,$route = null ){
$url = null;
$card = $recptionForm->card;
$customer = $recptionForm->customer;
$classes = 'btn btn-primary btn-reception';
if ( $card == null || $customer == null){
$classes .= ' disabled';
}
if ( isset($route)){
$url = [$route, 'number' => ( isset( $card ) ? $card->number : '' )];
}
return Html::a( $label , $url, ['class' => $classes ] );
}
public static function mkReceptionBtn($recptionForm, $label,$route = null ){
$url = null;
$card = $recptionForm->card;
$classes = 'btn btn-primary btn-reception';
if ( isset($route)){