Skip to content

Custom headers #226

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

Merged
merged 2 commits into from
Apr 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions src/client/js/directives/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ module fng.directives {
/* Array footer */
if (info.noAdd !== true || typeof info.customFooter == 'string' || info.noneIndicator) {
let footer: string = '';
if (typeof info.customFooter == 'string') {
const hasCustomFooter = typeof info.customFooter == 'string';
if (hasCustomFooter) {
footer = info.customFooter;
}
let hideCond = '';
Expand All @@ -605,12 +606,14 @@ module fng.directives {
}
if (info.noneIndicator) {
footer += `<span ${indicatorShowCond} class="none_indicator" id="no_${info.id}_indicator">None</span>`;
// hideCond for the schema-foot is if there's no add button and no indicator
hideCond = `${model}.length > 0`;
if (info.noAdd === true) {
hideCond = `ng-hide="${hideCond}"`;
} else {
hideCond = info.noAdd ? `ng-hide="${info.noAdd} && ${hideCond}"` : '';
// hideCond for the schema-foot is if there's no add button, no custom footer and no indicator
if (!hasCustomFooter) {
hideCond = `${model}.length > 0`;
if (info.noAdd === true) {
hideCond = `ng-hide="${hideCond}"`;
} else {
hideCond = info.noAdd ? `ng-hide="${info.noAdd} && ${hideCond}"` : '';
}
}
}
if (footer !== '') {
Expand Down
Loading