added state to lincesed roles display in user edit form
This commit is contained in:
parent
45379fd988
commit
dc4c763d99
|
@ -65,7 +65,7 @@ function materio_commerce_form_role_delegation_role_assign_form_alter(&$form, &$
|
|||
|
||||
$granted = $license->getGrantedTime();
|
||||
$expires = $license->getExpiresTime();
|
||||
|
||||
$license_state = $license->getState()->getValue()['value'];
|
||||
$license_edit_url = $license->toUrl();
|
||||
$license_link = Link::fromTextAndUrl(t('edit license'), $license_edit_url);
|
||||
|
||||
|
@ -80,9 +80,10 @@ function materio_commerce_form_role_delegation_role_assign_form_alter(&$form, &$
|
|||
)), $order_url);
|
||||
}
|
||||
|
||||
$description .= t("<br/>-- @product: @variation | granted: @granted | expires: @expires | @license_link | @order_link", array(
|
||||
$description .= t("<br/>-- @product: @variation | license state: @license_state | granted: @granted | expires: @expires | @license_link | @order_link", array(
|
||||
'@product' => $product ? $product->getTitle() : t('no product'),
|
||||
'@variation' => $product_variation ? $product_variation->getTitle() : t('no variation'),
|
||||
'@license_state' => $license_state,
|
||||
'@granted' => date('d-m-Y', $granted),
|
||||
'@expires' => $expires === "0" ? 'never' : date('d-m-Y', $expires),
|
||||
'@license_link' => $license_link->toString(),
|
||||
|
@ -139,7 +140,7 @@ function materio_commerce_form_user_form_alter(&$form, &$form_state, $form_id) {
|
|||
|
||||
$granted = $license->getGrantedTime();
|
||||
$expires = $license->getExpiresTime();
|
||||
|
||||
$license_state = $license->getState()->getValue()['value'];
|
||||
$license_edit_url = $license->toUrl();
|
||||
$license_link = Link::fromTextAndUrl(t('edit license'), $license_edit_url);
|
||||
|
||||
|
@ -154,9 +155,10 @@ function materio_commerce_form_user_form_alter(&$form, &$form_state, $form_id) {
|
|||
)), $order_url);
|
||||
}
|
||||
|
||||
$description .= t("<br/>-- @product: @variation | granted: @granted | expires: @expires | @license_link | @order_link", array(
|
||||
$description .= t("<br/>-- @product: @variation | license state: @license_state | granted: @granted | expires: @expires | @license_link | @order_link", array(
|
||||
'@product' => $product ? $product->getTitle() : t('no product'),
|
||||
'@variation' => $product_variation ? $product_variation->getTitle() : t('no variation'),
|
||||
'@license_state' => $license_state,
|
||||
'@granted' => date('d-m-Y', $granted),
|
||||
'@expires' => $expires === "0" ? 'never' : date('d-m-Y', $expires),
|
||||
'@license_link' => $license_link->toString(),
|
||||
|
|
Loading…
Reference in New Issue