-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented more permission controls on components
- Loading branch information
Showing
16 changed files
with
407 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
<div class="relative flex items-{{or @alignItems 'start'}} {{if @disabled 'disabled opacity-75'}}" ...attributes> | ||
<div class="flex items-center h-4"> | ||
<Input | ||
@type="checkbox" | ||
id={{this.id}} | ||
data-value={{@value}} | ||
@checked={{@value}} | ||
data-checked={{@value}} | ||
disabled={{@disabled}} | ||
class="fleetbase-checkbox form-checkbox {{this.colorClass}} {{@inputClass}}" | ||
{{on "change" this.toggle}} | ||
/> | ||
{{#if @helpText}} | ||
<Attach::Tooltip @class="clean" @animation="scale" @placement={{or @tooltipPlacement "top"}}> | ||
<InputInfo @text={{@helpText}} @exampleText={{@exampleText}} /> | ||
</Attach::Tooltip> | ||
{{/if}} | ||
</div> | ||
{{#if (has-block)}} | ||
<div class="ml-2 text-sm leading-5"> | ||
<label for={{this.id}} aria-disabled={{@disabled}} class="font-medium text-gray-700 dark:text-gray-100 {{@labelClass}}"> | ||
{{yield}} | ||
</label> | ||
</div> | ||
{{else if @label}} | ||
<div class="ml-2 text-sm leading-5"> | ||
<label for={{this.id}} aria-disabled={{@disabled}} class="font-medium text-gray-700 dark:text-gray-100 {{@labelClass}}"> | ||
{{@label}} | ||
</label> | ||
{{#if this.visible}} | ||
<div class="relative flex items-{{or @alignItems 'start'}} {{if @disabled 'disabled opacity-75'}} {{@wrapperClass}}"> | ||
<div class="flex items-center h-4"> | ||
<Input | ||
@type="checkbox" | ||
@checked={{this.checked}} | ||
id={{this.id}} | ||
data-value={{this.checked}} | ||
data-checked={{this.checked}} | ||
disabled={{this.disabled}} | ||
class="fleetbase-checkbox form-checkbox {{this.colorClass}} {{@inputClass}}" | ||
{{on "change" this.toggle}} | ||
...attributes | ||
/> | ||
{{#if (has-block)}} | ||
<div class="ml-2 text-sm leading-5"> | ||
<label for={{this.id}} aria-disabled={{@disabled}} class="mb-0i font-medium text-gray-700 dark:text-gray-100 {{@labelClass}}"> | ||
{{yield}} | ||
</label> | ||
</div> | ||
{{else if @label}} | ||
<div class="ml-2 text-sm leading-5"> | ||
<label for={{this.id}} aria-disabled={{@disabled}} class="mb-0i font-medium text-gray-700 dark:text-gray-100 {{@labelClass}}"> | ||
{{@label}} | ||
</label> | ||
</div> | ||
{{/if}} | ||
{{#if this.disabledByPermission}} | ||
<Attach::Tooltip @class="clean" @animation="scale" @placement={{or @tooltipPlacement "top"}}> | ||
<InputInfo @text={{t "common.unauthorized"}} /> | ||
</Attach::Tooltip> | ||
{{else if @helpText}} | ||
<Attach::Tooltip @class="clean" @animation="scale" @placement={{or @tooltipPlacement "top"}}> | ||
<InputInfo @text={{@helpText}} @exampleText={{@exampleText}} /> | ||
</Attach::Tooltip> | ||
{{/if}} | ||
</div> | ||
{{/if}} | ||
</div> | ||
|
||
</div> | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.