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,
|
required,
|
||||||
}: PropsWithChildren<Props>) {
|
}: PropsWithChildren<Props>) {
|
||||||
return (
|
return (
|
||||||
<div className={clsx('form-group', styles.container)}>
|
<>
|
||||||
<label
|
<div className={clsx('form-group', styles.container)}>
|
||||||
htmlFor={inputId}
|
<label
|
||||||
className={clsx(sizeClassLabel(size), 'control-label', 'text-left')}
|
htmlFor={inputId}
|
||||||
>
|
className={clsx(sizeClassLabel(size), 'control-label', 'text-left')}
|
||||||
{label}
|
>
|
||||||
|
{label}
|
||||||
|
|
||||||
{required && <span className="text-danger">*</span>}
|
{required && <span className="text-danger">*</span>}
|
||||||
|
|
||||||
{tooltip && <Tooltip message={tooltip} />}
|
{tooltip && <Tooltip message={tooltip} />}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div className={sizeClassChildren(size)}>{children}</div>
|
|
||||||
|
|
||||||
|
<div className={sizeClassChildren(size)}>{children}</div>
|
||||||
|
</div>
|
||||||
{errors && (
|
{errors && (
|
||||||
<div className="col-md-12">
|
<div className="form-group">
|
||||||
<FormError>{errors}</FormError>
|
<div className="col-md-12">
|
||||||
|
<FormError>{errors}</FormError>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ export function CreateAccessToken({
|
||||||
return (
|
return (
|
||||||
<Widget>
|
<Widget>
|
||||||
<WidgetBody>
|
<WidgetBody>
|
||||||
<div>
|
<div className="form-horizontal">
|
||||||
<FormControl
|
<FormControl
|
||||||
inputId="input"
|
inputId="input"
|
||||||
label={t('Description')}
|
label={t('Description')}
|
||||||
|
|
|
@ -48,7 +48,7 @@ angular.module('portainer.app').controller('AccountController', [
|
||||||
};
|
};
|
||||||
|
|
||||||
this.uiCanExit = (newTransition) => {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
if (newTransition.to().name === 'portainer.logout') {
|
if (newTransition.to().name === 'portainer.logout') {
|
||||||
|
|
Loading…
Reference in New Issue