New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] Abilty to change the flash html template #13445

Closed
JABirchall opened this Issue Jul 17, 2018 · 2 comments

Comments

Projects
3 participants
@JABirchall
Copy link

JABirchall commented Jul 17, 2018

I recently ran into this. unless you pure bootstrap template the flash service is pretty useless and you need to write a custom flash class if you dont use bootstrap or have different template for errors and stuff like that.

Should add another method, setHtmlTemplate

$di->set('flash', function () {
    $flash = new Flash();
    $flash->setCssClasses([
        'error'   => 'alert alert-danger',
        'success' => 'alert alert-success',
        'notice'  => 'alert alert-info',
        'warning' => 'alert alert-warning'
    ]);
    $flash->setHtmlTemplate("<div class='{{ css }} alert-dismissible fade show m-alert m-alert--air' role='alert'>
	<button type='button' class='close' data-dismiss='alert' aria-label='Close'></button>
	{{ message }}
    </div>");
    retrun $flash;
});

Proposed version: 4.0 / 3.4.1?

@JABirchall JABirchall changed the title [NFR] Abilty to change the flash message template [NFR] Abilty to change the flash html template Jul 17, 2018

@stale

This comment has been minimized.

Copy link

stale bot commented Oct 15, 2018

Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues

@stale stale bot added the stale label Oct 15, 2018

@niden niden self-assigned this Oct 15, 2018

@stale stale bot removed the stale label Oct 15, 2018

@niden niden referenced this issue Oct 16, 2018

Merged

T13445 ability to change the flash html template #13530

3 of 3 tasks complete

@niden niden added this to the 4.0.0 milestone Oct 16, 2018

@niden

This comment has been minimized.

Copy link
Member

niden commented Oct 18, 2018

This has been implemented

@niden niden closed this Oct 18, 2018

@niden niden referenced this issue Oct 19, 2018

Open

Update 4.x Documents #1935

0 of 10 tasks complete

@niden niden added this to Done in 4.0 Release Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment