if ( $this -> phrase ):?>
= \Html::input(
array(
'name' => 'phrase',
'class' => 'require',
'value' => $this -> phrase['phrase'],
'label' => 'Fraza'
)
);?>
else:?>
= \Html::textarea(
array(
'name' => 'phrase',
'class' => 'require',
'label' => 'Fraza'
)
);?>
endif;?>
= \Html::input(
array(
'name' => 'localization',
'value' => $this -> phrase['localization'],
'label' => 'Lokalizacja'
)
);?>
= \Html::input(
array(
'name' => 'discount',
'value' => $this -> phrase['discount'],
'label' => 'Rabat w %',
'class' => 'number-format'
)
);?>
= \Html::input(
array(
'name' => 'date_start',
'value' => $this -> phrase['date_start'] != '0000-00-00' ? $this -> phrase['date_start'] : null,
'label' => 'Początek',
'class' => 'date'
)
);?>
= \Html::input(
array(
'name' => 'date_end',
'value' => $this -> phrase['date_end'] != '0000-00-00' ? $this -> phrase['date_end'] : null,
'label' => 'Koniec',
'class' => 'date'
)
);?>
if ( is_array( $this -> sites ) ) foreach ( $this -> sites as $site )
$sites[ $site['id'] ] = $site['name'];
?>
= \Html::select(
array(
'name' => 'site_id',
'label' => 'Strona',
'value' => $this -> site_id,
'values' => $sites
)
);?>
= \Html::input( [
'name' => 'days_offset',
'value' => $this -> phrase['days_offset'],
'label' => 'Sprawdza co X dni'
] );?>
= \Html::input_switch( [
'name' => 'to_all',
'label' => 'Zastosuj do wszystkich',
'checked' => false,
'values' => [
'0' => 'nie',
'1' => 'tak'
]
] );?>