mirror of https://github.com/portainer/portainer
fix(app/account): create access token button (#7014)
* fix(api): remove unused leftover imports * fix(app/account): create access token button * fix(app/formcontrol): error message overlapping input on smaller screenspull/7089/head^2
parent
97a880e6c1
commit
8ed41de815
|
@ -29,26 +29,29 @@ export function FormControl({
|
|||
required,
|
||||
}: PropsWithChildren<Props>) {
|
||||
return (
|
||||
<div className={clsx('form-group', styles.container)}>
|
||||
<label
|
||||
htmlFor={inputId}
|
||||
className={clsx(sizeClassLabel(size), 'control-label', 'text-left')}
|
||||
>
|
||||
{label}
|
||||
<>
|
||||
<div className={clsx('form-group', styles.container)}>
|
||||
<label
|
||||
htmlFor={inputId}
|
||||
className={clsx(sizeClassLabel(size), 'control-label', 'text-left')}
|
||||
>
|
||||
{label}
|
||||
|
||||
{required && <span className="text-danger">*</span>}
|
||||
{required && <span className="text-danger">*</span>}
|
||||
|
||||
{tooltip && <Tooltip message={tooltip} />}
|
||||
</label>
|
||||
|
||||
<div className={sizeClassChildren(size)}>{children}</div>
|
||||
{tooltip && <Tooltip message={tooltip} />}
|
||||
</label>
|
||||
|
||||
<div className={sizeClassChildren(size)}>{children}</div>
|
||||
</div>
|
||||
{errors && (
|
||||
<div className="col-md-12">
|
||||
<FormError>{errors}</FormError>
|
||||
<div className="form-group">
|
||||
<div className="col-md-12">
|
||||
<FormError>{errors}</FormError>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ export function CreateAccessToken({
|
|||
return (
|
||||
<Widget>
|
||||
<WidgetBody>
|
||||
<div>
|
||||
<div className="form-horizontal">
|
||||
<FormControl
|
||||
inputId="input"
|
||||
label={t('Description')}
|
||||
|
|
|
@ -48,7 +48,7 @@ angular.module('portainer.app').controller('AccountController', [
|
|||
};
|
||||
|
||||
this.uiCanExit = (newTransition) => {
|
||||
if ($scope.userRole === 1 && newTransition.to().name === 'portainer.settings.authentication') {
|
||||
if ($scope.userRole === 1 && newTransition && newTransition.to().name === 'portainer.settings.authentication') {
|
||||
return true;
|
||||
}
|
||||
if (newTransition.to().name === 'portainer.logout') {
|
||||
|
|
Loading…
Reference in New Issue