Changeset 3694342
- Timestamp:
- 09/14/2026 01:38:09 AM (2 months ago)
- Location:
- paintops/trunk
- Files:
-
- 1 added
- 1 deleted
- 28 edited
-
assets/css/app-nav.css (modified) (1 diff)
-
assets/css/app-shell.css (modified) (9 diffs)
-
assets/css/customers-list.css (modified) (1 diff)
-
assets/css/paintops-app.css (modified) (25 diffs)
-
assets/img/paintclarity-mark.png (added)
-
assets/js/app-fin-table-labels.js (modified) (1 diff)
-
assets/js/app-nav.js (modified) (1 diff)
-
assets/js/customers-address-edit.js (deleted)
-
assets/js/po-toggles.js (modified) (2 diffs)
-
changelog.txt (modified) (1 diff)
-
includes/app-themes.php (modified) (2 diffs)
-
includes/business-notes.php (modified) (2 diffs)
-
includes/calendar.php (modified) (2 diffs)
-
includes/customer-payments.php (modified) (2 diffs)
-
includes/customers.php (modified) (11 diffs)
-
includes/dashboard-alerts.php (modified) (2 diffs)
-
includes/estimates.php (modified) (7 diffs)
-
includes/file-receipt.php (modified) (1 diff)
-
includes/job-checkin.php (modified) (2 diffs)
-
includes/job-financials-addon.php (modified) (5 diffs)
-
includes/job-invoices.php (modified) (3 diffs)
-
includes/job-photos.php (modified) (21 diffs)
-
includes/job-pipeline.php (modified) (4 diffs)
-
includes/job-rows.php (modified) (3 diffs)
-
includes/job-view.php (modified) (9 diffs)
-
includes/manage-jobs.php (modified) (17 diffs)
-
includes/resource-links.php (modified) (4 diffs)
-
includes/timeoff.php (modified) (2 diffs)
-
paintops.php (modified) (31 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
paintops/trunk/assets/css/app-nav.css
r3690636 r3694342 188 188 .paintops-bottomnav .pbn-item.is-active { color: var(--po-accent, #4682B4) !important; } 189 189 .paintops-bottomnav .pbn-center { 190 /* Renders as an <a> for workers and as a <button> for staff, 191 * where it opens the + New chooser sheet (Mike 2026-09-13), so 192 * the button chrome has to be reset here the way .pbn-item 193 * already does for the More button. */ 194 border: 0; background: transparent; padding: 0; cursor: pointer; 195 font-family: inherit; line-height: 1; 190 196 flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; 191 197 /* Muted label like its siblings (2026-07-19, was permanent -
paintops/trunk/assets/css/app-shell.css
r3693322 r3694342 15 15 .paintops-shell .pbn-sheet-backdrop { display: none !important; } 16 16 17 .paintops-shell { --po-shell-w: 240px; background: #f4f5f7; } 17 /* (2026-09-13 visual pass) STRUCTURE IS NAVY. The rail was white-on-white 18 * with hairline greys, which is the default look of every SaaS starter 19 * template and gave the app no spine. It now takes --po-nav-bg, which all 20 * eight themes already define as a dark structural color, so this is one 21 * change that themes each answer in their own palette. Content stays on 22 * white; the chrome carries the weight. */ 23 .paintops-shell { --po-shell-w: 240px; background: var(--po-app-bg, #eef1f5); } 18 24 .paintops-shell .po-shell { 19 25 display: grid; … … 25 31 /* Sidebar ------------------------------------------------------------------ */ 26 32 .paintops-shell .po-side { 27 background: #fff;28 border-right: 1px solid #e3e6ea;33 background: var(--po-nav-bg, #293241); 34 border-right: 0; 29 35 display: flex; 30 36 flex-direction: column; … … 35 41 z-index: 40; 36 42 } 37 .paintops-shell .po-side-brand { padding: 15px 16px 8px; } 38 .paintops-shell .po-side-logo { max-width: 190px; max-height: 60px; height: auto; width: auto; display: block; } 39 .paintops-shell .po-side-word { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--po-accent, #20374f); } 40 .paintops-shell .po-side-biz { color: #6b7480; font-size: 11.5px; font-weight: 600; margin-top: 4px; padding-bottom: 10px; border-bottom: 1px solid #e3e6ea; } 41 .paintops-shell .po-side-nav { padding: 6px 10px; overflow-y: auto; flex: 1 1 auto; } 42 .paintops-shell .po-side-grp { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: #9aa2ad; text-transform: uppercase; padding: 14px 8px 5px; } 43 /* Brand block: the PaintClarity mark and wordmark, always, on every theme 44 * (Mike 2026-09-13). The company's own logo is a DOCUMENT mark and stays 45 * on quotes, invoices and expense reports; the menu identifies the product. 46 * The mark sits on a small white chip because its brush handle is dark navy 47 * and would disappear straight onto the rail. */ 48 .paintops-shell .po-side-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 16px 14px; border-bottom: 1px solid var(--po-on-nav-line, rgba(255,255,255,.13)); } 49 .paintops-shell .po-side-mark { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 6px; background: #fff; padding: 3px; box-sizing: border-box; display: block; } 50 .paintops-shell .po-side-logo { max-width: 150px; max-height: 34px; height: auto; width: auto; display: block; } 51 .paintops-shell .po-side-word { font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--po-on-nav-strong, #fff); line-height: 1.1; } 52 /* The business name still belongs here: it says WHOSE books these are. 53 * It is subordinate to the product mark, on its own line, quiet. */ 54 .paintops-shell .po-side-biz { flex: 1 1 100%; color: var(--po-on-nav-muted, rgba(255,255,255,.56)); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin: 0; padding: 0; border-bottom: 0; } 55 .paintops-shell .po-side-nav { padding: 8px 8px 16px; overflow-y: auto; flex: 1 1 auto; } 56 .paintops-shell .po-side-grp { font-size: var(--po-fs-label, 11px); font-weight: 700; letter-spacing: .09em; color: var(--po-on-nav-muted, rgba(255,255,255,.56)); text-transform: uppercase; padding: 18px 10px 6px; } 43 57 .paintops-shell .po-side-nav a { 44 58 display: flex; align-items: center; gap: 10px; 45 padding: 9px 10px; margin: 1px 0; 46 border-radius: 8px; 47 color: #3a424e !important; 48 font-weight: 500; font-size: 14px; text-decoration: none; 49 line-height: 1.2; 50 } 51 .paintops-shell .po-side-nav a:hover { background: #f3f5f8; } 52 .paintops-shell .po-side-nav a.is-active { background: #eaf1f8; color: var(--po-accent, #20374f) !important; font-weight: 700; } 59 padding: 8px 10px; margin: 1px 0; 60 border-radius: var(--po-radius-xs, 4px); 61 color: var(--po-on-nav, rgba(255,255,255,.80)) !important; 62 font-weight: 500; font-size: var(--po-fs-body, 14px); text-decoration: none; 63 line-height: 1.3; 64 box-shadow: inset 3px 0 0 transparent; 65 transition: background-color .12s ease; 66 } 67 .paintops-shell .po-side-nav a:hover { background: var(--po-on-nav-hover, rgba(255,255,255,.07)); color: var(--po-on-nav-strong, #fff) !important; } 68 /* Active: a lifted wash plus a 3px marker in PaintClarity sky blue. A bar is 69 * the business-software convention for "you are here" and, unlike a filled 70 * pill, it does not read as a button you can press. This is the one place 71 * the interactive blue appears on the rail. */ 72 .paintops-shell .po-side-nav a.is-active { 73 background: var(--po-on-nav-active, rgba(255,255,255,.12)); 74 color: var(--po-on-nav-strong, #fff) !important; 75 font-weight: 600; 76 box-shadow: inset 3px 0 0 var(--po-nav-marker, #98C1D9); 77 } 53 78 .paintops-shell .po-side-ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .9; } 54 79 .paintops-shell .po-side-nav a.is-active .po-side-ic { opacity: 1; } 55 80 .paintops-shell .po-side-label { flex: 1 1 auto; min-width: 0; } 56 .paintops-shell .po-side-pro { margin-left: auto; font-size: 9.5px; font-weight: 700; color: var(--po-accent, #4682B4); border: 1px solid #cdddf0; border-radius: 999px; padding: 0 6px; }57 .paintops-shell .po-side-foot { border-top: 1px solid #e3e6ea; padding: 10px 16px; color: #8a929c; font-size: 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }81 .paintops-shell .po-side-pro { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--po-on-nav-muted, rgba(255,255,255,.56)); border: 1px solid var(--po-on-nav-line, rgba(255,255,255,.22)); border-radius: 3px; padding: 1px 5px; } 82 .paintops-shell .po-side-foot { border-top: 1px solid var(--po-on-nav-line, rgba(255,255,255,.13)); padding: 10px 16px; color: var(--po-on-nav-muted, rgba(255,255,255,.56)); font-size: 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; } 58 83 59 84 /* Main column -------------------------------------------------------------- */ 60 85 .paintops-shell .po-shell-main { display: flex; flex-direction: column; min-width: 0; } 86 /* The top bar stays white ON PURPOSE. White content column against a navy 87 * rail is the whole layout idea; a second dark band would close the page in. */ 61 88 .paintops-shell .po-topbar { 62 background: #fff;63 border-bottom: 1px solid #e3e6ea;64 display: flex; align-items: center; gap: 12px;65 padding: 9px 20px;89 background: var(--po-card-bg, #fff); 90 border-bottom: 1px solid var(--po-card-border, #dde4ea); 91 display: flex; align-items: center; gap: var(--po-s3, 12px); 92 padding: 10px var(--po-s5, 24px); 66 93 position: sticky; top: 0; z-index: 30; 67 94 } 68 95 .paintops-shell .po-topbar-spacer { flex: 1 1 auto; } 69 .paintops-shell .po-topbar-who { color: #6b7480; font-size: 12.5px; }70 .paintops-shell .po-topbar-who strong { color: #1f2733; }96 .paintops-shell .po-topbar-who { color: var(--po-text-muted, #5b6673); font-size: var(--po-fs-meta, 13px); } 97 .paintops-shell .po-topbar-who strong { color: var(--po-text, #2b3440); font-weight: 600; } 71 98 72 99 /* App-wide job search box living in the top bar next to + New (Mike … … 74 101 * suggestions dropdown overhangs below the sticky header. */ 75 102 .paintops-shell .po-topbar .po-jobs-search { flex: 0 1 300px; min-width: 150px; } 76 .paintops-shell .po-topbar .po-jobs-search-input { height: 3 6px; }103 .paintops-shell .po-topbar .po-jobs-search-input { height: 34px; border-radius: var(--po-radius-xs, 4px); font-size: var(--po-fs-body, 14px); } 77 104 @media (max-width: 620px) { 78 105 .paintops-shell .po-topbar-who { display: none; } 79 106 .paintops-shell .po-topbar .po-jobs-search { flex: 1 1 auto; min-width: 0; } 80 107 } 81 .paintops-shell .po-side-toggle { display: none; border: 1px solid #e3e6ea; background: #fff; border-radius: 8px; padding: 5px 8px; cursor: pointer; line-height: 1; color: #1f2733; }108 .paintops-shell .po-side-toggle { display: none; border: 1px solid var(--po-input-border, #ccd6de); background: var(--po-card-bg, #fff); border-radius: var(--po-radius-xs, 4px); padding: 5px 8px; cursor: pointer; line-height: 1; color: var(--po-text, #2b3440); } 82 109 /* SVG hamburger (font-independent, always high-contrast) */ 83 110 .paintops-shell .po-side-toggle .po-side-ic { width: 22px; height: 22px; opacity: 1; } … … 85 112 /* + New button + menu (top bar) */ 86 113 .paintops-shell .po-new { position: relative; } 114 /* The one primary action in the chrome, so it is the one solid accent fill. */ 87 115 .paintops-shell .po-new-btn { 88 116 display: inline-flex; align-items: center; gap: 6px; 89 background: var(--po-accent, # 20374f); color: #fff !important;90 border: 1px solid var(--po-accent, # 20374f);91 border-radius: 8px; padding: 7px 12px; font-weight: 600; font-size: 13px;117 background: var(--po-accent, #3D5A80); color: #fff !important; 118 border: 1px solid var(--po-accent, #3D5A80); 119 border-radius: var(--po-radius-xs, 4px); padding: 8px 13px; font-weight: 600; font-size: var(--po-fs-body, 14px); 92 120 cursor: pointer; text-decoration: none; list-style: none; 93 121 } 94 122 .paintops-shell .po-new-btn::-webkit-details-marker { display: none; } 95 123 .paintops-shell .po-new-btn .po-side-ic { width: 18px; height: 18px; opacity: 1; } 96 .paintops-shell .po-new-btn:hover { filter: brightness(1.08); } 124 .paintops-shell .po-new-btn:hover { filter: brightness(1.07); } 125 .paintops-shell .po-new-btn:focus-visible { outline: 2px solid var(--po-accent, #3D5A80); outline-offset: 2px; } 126 /* A menu genuinely floats, so this keeps its shadow. */ 97 127 .paintops-shell .po-new-menu { 98 128 position: absolute; right: 0; top: calc(100% + 6px); 99 background: #fff; border: 1px solid #e3e6ea; border-radius: 12px;100 box-shadow: 0 10px 30px rgba(16,24,40,.14);101 min-width: 240px; padding: 6px; z-index: 50;129 background: var(--po-menu-bg, #fff); border: 1px solid var(--po-menu-border, #dde4ea); border-radius: var(--po-radius-sm, 5px); 130 box-shadow: 0 8px 24px rgba(16,24,40,.13); 131 min-width: 240px; padding: var(--po-s1, 4px); z-index: 50; 102 132 } 103 133 .paintops-shell .po-new-menu a { 104 134 display: flex; align-items: center; gap: 10px; 105 padding: 10px; border-radius: 9px; color: #1f2733!important;106 text-decoration: none; font-weight: 600; font-size: 13.5px;107 } 108 .paintops-shell .po-new-menu a:hover { background: #f3f5f8; }109 .paintops-shell .po-new-menu .po-side-ic { width: 18px; height: 18px; color: var(--po-accent, # 20374f); }135 padding: 9px 10px; border-radius: var(--po-radius-xs, 4px); color: var(--po-menu-text, #2b3440) !important; 136 text-decoration: none; font-weight: 500; font-size: var(--po-fs-body, 14px); 137 } 138 .paintops-shell .po-new-menu a:hover { background: var(--po-menu-hover, #f1f5f9); } 139 .paintops-shell .po-new-menu .po-side-ic { width: 18px; height: 18px; color: var(--po-accent, #3D5A80); } 110 140 111 141 /* Content area: a comfortable capped column (Mike 2026-09-10), left-aligned … … 113 143 * read busier than the approved mockup. Wide content (big tables) still 114 144 * scrolls inside its own overflow container, so the cap never clips it. */ 115 .paintops-shell .paintops-app-canvas-inner { max-width: 1080px !important; margin: 0 !important; padding: 22px 24px 44px !important; } 145 /* (2026-09-13 visual pass) Responsive use of space: the column was capped at 146 * 1080px on every monitor, so a 27in screen showed the same narrow strip as a 147 * 15in laptop with a third of the width empty. The cap now steps up once, at 148 * 1500px of viewport, which is enough for the wide financial tables to stop 149 * scrolling inside themselves without letting body text run to an unreadable 150 * measure. */ 151 .paintops-shell .paintops-app-canvas-inner { max-width: 1080px !important; margin: 0 !important; padding: var(--po-s5, 24px) var(--po-s6, 32px) 48px !important; } 152 @media (min-width: 1500px) { 153 .paintops-shell .paintops-app-canvas-inner { max-width: 1320px !important; padding-left: 40px !important; padding-right: 40px !important; } 154 } 116 155 117 156 .paintops-shell .po-shell-backdrop { display: none; } … … 123 162 position: fixed; left: 0; top: 0; width: 260px; height: 100vh; height: 100dvh; 124 163 transform: translateX(-100%); transition: transform .22s ease; 125 box-shadow: 0 0 40px rgba(0,0,0,.18);164 box-shadow: 0 0 32px rgba(0,0,0,.22); 126 165 } 127 166 .paintops-shell .po-shell.is-open .po-side { transform: none; } … … 130 169 display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; 131 170 } 132 .paintops-shell .paintops-app-canvas-inner { padding: 16px 16px40px !important; }133 } 134 135 .po-side-foot .po-side-wpadmin{color:var(--po- accent,#4682B4);text-decoration:none;font-weight:600;}171 .paintops-shell .paintops-app-canvas-inner { padding: var(--po-s4, 16px) var(--po-s4, 16px) 40px !important; } 172 } 173 174 .po-side-foot .po-side-wpadmin{color:var(--po-on-nav,rgba(255,255,255,.80));text-decoration:none;font-weight:600;} 136 175 .po-side-foot .po-side-wpadmin:hover{text-decoration:underline;} 137 176 … … 165 204 padding-bottom: calc(16px + var(--pbn-clear, 100px)) !important; 166 205 } 167 } 206 /* And hide the top bar's "+ New" here (Mike 2026-09-13). Once the bottom 207 * bar is back, its raised "+" is the New control on a phone and opens the 208 * same chooser, so two "+ New" buttons were competing on one small screen. 209 * Safe to hide unconditionally: both controls are gated on the same 210 * permission expression ($is_staff || paintops_user_can_create_job), so a 211 * user with no "+" in the bottom bar has no "+ New" up here either, and 212 * nothing is lost. The classic (non-shell) app bar needs no equivalent: 213 * app-nav.css already hides it whole below 782px. */ 214 .paintops-shell .po-topbar .po-new, 215 .paintops-shell .po-topbar .po-new-btn { display: none !important; } 216 } -
paintops/trunk/assets/css/customers-list.css
r3627427 r3694342 23 23 * inputs are sized to fit the cell and only wrap when the 24 24 * viewport forces it). */ 25 /* (Mike 2026-09-14) The inline row editor is gone; the pencil is now a 26 link straight to the full Edit Customer form. What is left is the 27 address line and that one link, so everything the editor needed 28 (the hidden form, its four sized inputs, the is-editing state) went 29 with it. Sized as a 28px target so it is comfortable on a phone. */ 25 30 .po-cust-addr { display:flex; align-items:center; gap:6px; flex-wrap:wrap; } 26 .po-cust-addr-edit { background:none; border:none; padding:2px; cursor:pointer; color:var(--po-text-muted,#999); line-height:1; border-radius:4px; }27 .po-cust-addr-edit:hover { color:var(--po-accent,#4682B4); background:var(--po-hover,#f0f4f8); }31 .po-cust-addr-edit { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; padding:0; color:var(--po-text-muted,#999); line-height:1; border-radius:var(--po-radius-xs,4px); text-decoration:none; flex:none; } 32 .po-cust-addr-edit:hover, .po-cust-addr-edit:focus-visible { color:var(--po-accent,#4682B4); background:var(--po-hover,#f0f4f8); } 28 33 .po-cust-addr-edit .dashicons { font-size:16px; width:16px; height:16px; } 29 .po-cust-addr-form { display:none; align-items:center; gap:6px; flex-wrap:wrap; }30 .po-cust-addr-form input[type="text"] { padding:6px 8px; border:1px solid var(--po-input-border,#ccc); border-radius:4px; font-size:13px; }31 .po-cust-addr-form .po-ca-street { flex:1 1 150px; min-width:130px; }32 .po-cust-addr-form .po-ca-city { width:100px; }33 .po-cust-addr-form .po-ca-state { width:48px; }34 .po-cust-addr-form .po-ca-zip { width:74px; }35 .po-cust-addr-form .paintops-btn { padding:6px 10px; font-size:13px; }36 .po-cust-addr.is-editing .po-cust-addr-line, .po-cust-addr.is-editing .po-cust-addr-edit { display:none; }37 .po-cust-addr.is-editing .po-cust-addr-form { display:flex; }38 34 39 35 /* Below 768px, this is a list of records (one row per customer), -
paintops/trunk/assets/css/paintops-app.css
r3693322 r3694342 56 56 } 57 57 58 /* ===================================================================== 59 * BASE TEXT SIZE (2026-09-13, second look) 60 * 61 * The app set a font FAMILY but never a font SIZE, so every piece of 62 * app text without an explicit rule inherited whatever the host theme 63 * puts on <body>. On a current block theme that is 22px. The result was 64 * hierarchy upside down: a card title sat at 15px while the helper 65 * sentence under it rendered at 22px, and the same sentence changed size 66 * from one customer's site to the next. That, more than any color, is 67 * what made screens read as unfinished. 68 * 69 * This sets the app's own body copy and is placed HIGH IN THIS FILE on 70 * purpose: every component rule further down is at least as specific, so 71 * anything with its own size (titles, labels, table cells, stat figures) 72 * keeps it and only the unstyled remainder is caught. 73 * 74 * Scoped to the app's own containers, never to the theme's pages. The 75 * canvas covers the sidebar-shell and header/footer-off layouts (the 76 * default on every install since 1.0.281); the component containers 77 * carry it through the classic layout too, where there is no canvas. 78 * th/td are deliberately NOT listed: tables set their own. 79 * ===================================================================== */ 80 .paintops-app-canvas-inner, 81 .paintops-app-canvas-inner p, 82 .paintops-app-canvas-inner li, 83 .paintops-app-canvas-inner label, 84 .paintops-app-canvas-inner dt, 85 .paintops-app-canvas-inner dd, 86 .paintops-app-canvas-inner blockquote, 87 .job-form, .job-form p, .job-form li, .job-form label, 88 .cs-financial-box, .cs-financial-box p, .cs-financial-box li, 89 .job-card, .job-card p, 90 .paintops-notice, .paintops-notice p { 91 font-size: var(--po-fs-body, 14px); 92 line-height: 1.55; 93 } 94 /* Slightly larger on a phone, where this gets read at arm's length in 95 * daylight, and where there is no dense desktop layout to keep compact. */ 96 @media (max-width: 782px) { 97 .paintops-app-canvas-inner, 98 .paintops-app-canvas-inner p, 99 .paintops-app-canvas-inner li, 100 .paintops-app-canvas-inner label, 101 .job-form, .job-form p, .job-form li, .job-form label, 102 .cs-financial-box, .cs-financial-box p, .cs-financial-box li { 103 font-size: 15px; 104 } 105 } 106 107 /* Sub-headings inside a screen (2026-09-13, second look). 26 bare <h3> and 108 * 6 bare <h4> across the app carried no size at all, so like the body copy 109 * above they rendered at whatever the host theme puts on a heading, which 110 * on the test theme is ~22px: bigger than the card titles they sat inside 111 * and, on Time Off, bigger than anything else on the screen. Any heading 112 * that already carries an inline size keeps it (inline always wins), so 113 * this only catches the ones that were never styled. 114 * 115 * #printableArea and #estimateArea are excluded: those are the customer's 116 * quote and invoice documents, which set their own print-oriented type. */ 117 .paintops-app-canvas-inner h3:not(#printableArea h3), 118 .job-form h3, 119 .cs-financial-box h3 { 120 font-size: var(--po-fs-card, 15px); 121 font-weight: 600; 122 line-height: 1.35; 123 color: var(--po-heading, #293241); 124 margin: var(--po-s5, 24px) 0 var(--po-s3, 12px); 125 } 126 .paintops-app-canvas-inner h4:not(#printableArea h4), 127 .job-form h4, 128 .cs-financial-box h4 { 129 font-size: var(--po-fs-meta, 13px); 130 font-weight: 700; 131 line-height: 1.4; 132 color: var(--po-heading, #293241); 133 margin: var(--po-s4, 16px) 0 var(--po-s2, 8px); 134 } 135 #printableArea h3, #printableArea h4, 136 #estimateArea h3, #estimateArea h4 { font-size: revert; font-weight: revert; margin: revert; } 137 138 /* ===================================================================== 139 * DESIGN SYSTEM TOKENS (2026-09-13 visual pass) 140 * 141 * The app already had a --po-* COLOR set, one per theme (app-themes.php). 142 * What it did not have was a scale for the things that actually make 143 * software read as mature: type sizes, spacing, and the ink used on a 144 * colored structural surface. Those were typed in by hand at each call 145 * site, which is why the same idea rendered at 10px, 10.5px and 11px on 146 * three different screens, and why panels carried 14px, 18px and 20px 147 * padding for no reason. 148 * 149 * These live in :root in THIS file, and the active theme's :root block 150 * is injected AFTER it (paintops_app_theme_css()), so a theme can 151 * override any of them without touching this file. No theme defines 152 * these today, so nothing conflicts. 153 * 154 * Two deliberate positions, both from Mike's brief: 155 * STRUCTURE IS NAVY. The sidebar, the phone bar and the classic app 156 * bar all read --po-nav-bg, which every one of the eight themes 157 * already defines as a dark structural color. Chrome carries the 158 * weight; content sits on white. 159 * ACCENT IS FOR INTERACTION, SPARINGLY. --po-accent means "you can 160 * act on this": links, the primary button, the active nav marker. 161 * It is deliberately NOT used for section headers, table headers, 162 * secondary buttons or card chrome any more, which is what made 163 * everything shout at once. 164 * ===================================================================== */ 165 :root { 166 /* Spacing: a 4px grid. Everything from here down uses these. */ 167 --po-s1: 4px; 168 --po-s2: 8px; 169 --po-s3: 12px; 170 --po-s4: 16px; 171 --po-s5: 24px; 172 --po-s6: 32px; 173 174 /* Type ramp. One step per job, no in-between sizes. */ 175 --po-fs-page: 21px; /* screen title */ 176 --po-fs-hero: 30px; /* the one number a financial screen leads with */ 177 --po-fs-card: 15px; /* card / panel title */ 178 --po-fs-body: 14px; /* body copy, table cells, form fields */ 179 --po-fs-meta: 13px; /* secondary line under a title */ 180 --po-fs-label: 11px; /* uppercase eyebrow / column head / stat key */ 181 182 /* Ink on a dark structural surface (the sidebar, the phone bar). */ 183 --po-on-nav: rgba(255,255,255,.80); 184 --po-on-nav-strong: #ffffff; 185 --po-on-nav-muted: rgba(255,255,255,.56); 186 --po-on-nav-line: rgba(255,255,255,.13); 187 --po-on-nav-hover: rgba(255,255,255,.07); 188 --po-on-nav-active: rgba(255,255,255,.12); 189 /* PaintClarity sky blue: the one interactive accent that reads on navy. 190 * Used ONLY as the 3px active marker, nowhere else on the rail. */ 191 --po-nav-marker: #98C1D9; 192 } 193 194 /* Tabular figures everywhere a number is compared against another number. 195 * Proportional digits make a column of money impossible to scan; this is 196 * the single cheapest thing that makes a financial screen look correct. */ 197 .cs-fin-table, .veh-table, .po-profit-year, .po-rank-strip, 198 .cs-fin-gross-box, .po-jrow-cell, .po-stat, .po-biz-sum { 199 font-variant-numeric: tabular-nums; 200 font-feature-settings: "tnum" 1; 201 } 202 203 /* Menu toggles are <button>, not <a href="#"> (2026-09-13 audit, B5). 204 * These three controls do nothing but drive JavaScript, so they were 205 * anchors wearing a button's clothes: they announced as links, and a 206 * middle-click or "open in new tab" did nothing. They are now real 207 * <button type="button"> elements. This reset strips the native button 208 * chrome so they inherit the typography and box the anchors had, and 209 * every existing .pv-more-toggle / .po-jrow-actions-toggle / .pv-dir-gear 210 * rule further down this file then applies unchanged. It must stay ABOVE 211 * those rules: all of these are single-class selectors, so source order, 212 * not specificity, decides, and .pv-dir-gear's own margin-left has to win 213 * over the margin:0 here. */ 214 .pv-more-toggle, 215 .po-jrow-actions-toggle, 216 .pv-dir-gear { 217 -webkit-appearance: none; 218 appearance: none; 219 margin: 0; 220 padding: 0; 221 border: 0; 222 background: none; 223 font: inherit; 224 color: inherit; 225 line-height: inherit; 226 text-align: inherit; 227 text-decoration: none; 228 cursor: pointer; 229 } 230 58 231 /* System-wide link color (Mike 2026-09-10): plain in-content links were 59 232 * rendering in the theme's default (often black), so links looked … … 66 239 .paintops-app-canvas-inner a:not([class]) { color: var(--po-accent, #4682B4); } 67 240 .paintops-app-canvas-inner a:not([class]):hover { color: var(--po-accent, #4682B4); text-decoration: underline; } 241 242 /* Controls that live OUTSIDE a .job-form (2026-09-13, second look): the 243 * filter bars and search rows above dashboards and lists. These were 244 * whatever the host theme drew, or inline `border:1px solid #ccc` typed at 245 * the call site, so the Profits year picker, the Jobs search and the 246 * Pipeline search each looked like they came from a different product. 247 * .job-form fields are excluded: they keep the 16px / 44px treatment that 248 * stops iOS zooming when the crew taps a field on a phone. */ 249 .paintops-app-canvas-inner select:not(.job-form select), 250 .paintops-app-canvas-inner input[type="text"]:not(.job-form input):not(.po-jobs-search-input), 251 .paintops-app-canvas-inner input[type="search"]:not(.job-form input):not(.po-jobs-search-input), 252 .paintops-app-canvas-inner input[type="date"]:not(.job-form input), 253 .paintops-app-canvas-inner input[type="url"]:not(.job-form input), 254 .paintops-app-canvas-inner input[type="email"]:not(.job-form input) { 255 min-height: 34px; 256 padding: 6px 10px; 257 border: 1px solid var(--po-input-border, #ccd6de); 258 border-radius: var(--po-radius-xs, 4px); 259 background: var(--po-card-bg, #fff); 260 color: var(--po-text, #2b3440); 261 font-family: inherit; 262 font-size: var(--po-fs-body, 14px); 263 line-height: 1.4; 264 } 265 @media (max-width: 782px) { 266 /* 16px on a phone, same reason as the .job-form rule further down: 267 * below it, iOS zooms the page the moment a field takes focus. */ 268 .paintops-app-canvas-inner select:not(.job-form select), 269 .paintops-app-canvas-inner input[type="text"]:not(.job-form input):not(.po-jobs-search-input), 270 .paintops-app-canvas-inner input[type="search"]:not(.job-form input):not(.po-jobs-search-input), 271 .paintops-app-canvas-inner input[type="date"]:not(.job-form input) { 272 font-size: 16px; 273 min-height: 42px; 274 } 275 } 276 277 /* A filter bar: label, control, action, on one baseline. Used above the 278 * dashboards that switch period. The label is an eyebrow, not a sentence, 279 * because the control next to it already says what it does. */ 280 .po-filterbar { 281 display: flex; 282 align-items: center; 283 gap: var(--po-s2, 8px); 284 flex-wrap: wrap; 285 margin: 0 0 var(--po-s4, 16px); 286 } 287 .po-filterbar label { 288 font-size: var(--po-fs-label, 11px); 289 font-weight: 700; 290 letter-spacing: .07em; 291 text-transform: uppercase; 292 color: var(--po-text-muted, #5b6673); 293 margin: 0; 294 } 295 .po-filterbar .paintops-btn, 296 .po-filterbar .button { min-height: 34px; padding: 6px 14px !important; } 297 @media (max-width: 782px) { 298 .po-filterbar .paintops-btn, 299 .po-filterbar .button { min-height: 42px; padding: 9px 16px !important; } 300 } 68 301 69 302 /* Form-submission notice banners, a full-width mint-green row on success and … … 93 326 * entirely). Deliberately h2 (Mike's call). */ 94 327 .po-screen-title { 95 font-size: 24px;96 font-weight: 800;97 letter-spacing: -0.0 2em;328 font-size: var(--po-fs-page, 21px); 329 font-weight: 600; 330 letter-spacing: -0.01em; 98 331 color: var(--po-heading, #2f5aae); 99 margin: 6px 0 16px;100 line-height: 1. 25;332 margin: 0 0 var(--po-s3, 12px); 333 line-height: 1.3; 101 334 } 102 335 @media (max-width: 782px) { 103 .po-screen-title { font-size: 21px; } 336 .po-screen-title { font-size: 19px; } 337 } 338 339 /* Page masthead (2026-09-13 visual pass). The title, an optional one-line 340 * context string, and a rule that closes the header off from the content. 341 * The rule is what makes a screen read as a DOCUMENT with a header rather 342 * than a title floating above a pile of boxes, and it costs one border. 343 * The context line is rendered by paintops_screen_title($title, $context) 344 * only where the page already holds the data; it is never invented. */ 345 /* `body ` prefix on purpose (0,1,1): block themes ship a global 346 * `:root :where(.is-layout-flow) > * { margin-block-end: 0 }` at the same 347 * 0,1,0 specificity as a bare class, printed after the plugin's stylesheet, 348 * which silently zeroed the masthead's bottom margin in the classic layout. 349 * The extra element in the selector settles it without reaching for 350 * !important. */ 351 body .po-page-head { 352 margin: 0 0 var(--po-s5, 24px); 353 padding-bottom: var(--po-s3, 12px); 354 border-bottom: 1px solid var(--po-card-border, #d7e3ec); 355 } 356 .po-page-head .po-screen-title { margin-bottom: 0; } 357 .po-page-context { 358 margin: var(--po-s1, 4px) 0 0; 359 font-size: var(--po-fs-meta, 13px); 360 line-height: 1.45; 361 color: var(--po-text-muted, #5b6673); 362 } 363 .po-page-context strong { color: var(--po-text, #2b3440); font-weight: 600; } 364 /* Separators inside the context line, so it reads as one sentence of facts 365 * rather than a stack. */ 366 .po-page-context .po-ctx-sep { color: var(--po-text-soft, #97a2ae); margin: 0 var(--po-s2, 8px); } 367 368 /* A screen title NOT wrapped in a masthead still gets the rule, so the 369 * treatment is consistent on pages that build their own header markup. */ 370 .paintops-app-canvas-inner > .po-screen-title, 371 .paintops-app-canvas-inner > .job-form > .po-screen-title { 372 padding-bottom: var(--po-s3, 12px); 373 border-bottom: 1px solid var(--po-card-border, #d7e3ec); 374 margin-bottom: var(--po-s5, 24px); 375 } 376 /* Screen titles became <h1> wherever the plugin renders the whole document 377 * (2026-09-13 audit, B4 - see paintops_screen_title_tag() in 378 * manage-jobs.php). A bare `h1 {}` rule in a host theme loses to the 379 * single-class rule above, but a descendant rule like `.entry-content h1` 380 * would win, so pin the app's own canvas explicitly and keep h1 and h2 381 * looking identical. */ 382 .paintops-app-canvas-inner h1.po-screen-title, 383 .paintops-app-canvas-inner h2.po-screen-title { 384 font-size: var(--po-fs-page, 21px); 385 font-weight: 600; 386 letter-spacing: -0.01em; 387 color: var(--po-heading, #2f5aae); 388 line-height: 1.3; 389 text-transform: none; 390 } 391 @media (max-width: 782px) { 392 .paintops-app-canvas-inner h1.po-screen-title, 393 .paintops-app-canvas-inner h2.po-screen-title { font-size: 19px; } 104 394 } 105 395 … … 145 435 * now just a clean bold uppercase heading. Used across the app's forms and 146 436 * dashboard section titles, so this restyles all of them at once. */ 437 /* (2026-09-13 visual pass) These were 105% bold in the HEADING color, which 438 * put them in competition with the screen title for the top of the page. 439 * A section label's job is to divide, not to announce, so it is now a small 440 * letterspaced eyebrow in the muted ink. Hierarchy comes from size and 441 * color, not from making everything bold. */ 147 442 .job-form-section { 148 443 display: flex; 149 444 align-items: center; 150 gap: 10px; 151 margin: 30px 0 14px; 152 padding: 0; 153 color: var(--po-heading, #2f5aae); 154 font-size: 105%; 445 gap: var(--po-s2, 8px); 446 margin: var(--po-s6, 32px) 0 var(--po-s3, 12px); 447 padding: 0 0 var(--po-s2, 8px); 448 border-bottom: 1px solid var(--po-line, #e6eaef); 449 color: var(--po-text-muted, #5b6673); 450 font-size: var(--po-fs-label, 11px); 155 451 font-weight: 700; 156 letter-spacing: 0. 3px;452 letter-spacing: 0.07em; 157 453 text-transform: uppercase; 158 454 } … … 167 463 * row of at-a-glance stat tiles (profit colored green/red), and 168 464 * branded table headers. */ 465 /* (2026-09-13 visual pass) Panels are defined by a hairline border, not by 466 * a shadow. A shadow says "this floats above the page", which is true of a 467 * menu and false of a table of expenses; using it for both is what makes an 468 * app read as a pile of widgets. Shadows are now reserved for things that 469 * genuinely overlay (menus, sheets, the row Actions panel). */ 169 470 .cs-financial-box { 170 471 border: 1px solid var(--po-card-border, #ddd); 171 border-radius: var(--po-radius, 8px);172 padding: 18px 20px 22px;173 margin: 20px0;472 border-radius: var(--po-radius, 6px); 473 padding: var(--po-s4, 16px) var(--po-s4, 16px) var(--po-s5, 24px); 474 margin: var(--po-s4, 16px) 0; 174 475 background: var(--po-card-bg, #fff); 175 box-shadow: var(--po-card-shadow, 0 1px 2px rgba(0,0,0,.04));476 box-shadow: none; 176 477 } 177 478 178 479 .cs-financial-box > h3:first-child { 179 margin -top: 0;480 margin: 0 0 var(--po-s3, 12px); 180 481 color: var(--po-heading, #2f5aae); 181 font-size: 130%; 482 font-size: var(--po-fs-card, 15px); 483 font-weight: 600; 484 letter-spacing: -0.005em; 182 485 } 183 486 … … 210 513 } 211 514 515 /* (2026-09-13, second look) The job stat tiles were tinted panels with 516 * centered figures, and the PRIMARY one (Profit, the whole point of the 517 * screen) was marked by washing it in --po-accent-soft. On a theme whose 518 * tile background is already tinted, that wash read GREY next to its 519 * siblings, so the most important number on the page looked like the 520 * disabled one. Emphasis is inverted by a tint and carried properly by 521 * type and a rule, so: every tile is now a flat white panel with its label 522 * as an eyebrow and its figure left-aligned (centered numbers cannot be 523 * scanned down a row), and the primary is marked with a 2px accent rule 524 * across its top. Drawn as an inset shadow rather than a border so the 525 * marked tile stays exactly the same height as the others. */ 212 526 .cs-fin-stat { 213 border: 1px solid var(--po- tile-border, #e6e6e6);214 border-radius: var(--po-radius- sm, 6px);215 padding: 10px 12px;216 background: var(--po- tile-bg, #fafbfc);217 text-align: center;527 border: 1px solid var(--po-card-border, #e6e6e6); 528 border-radius: var(--po-radius-xs, 4px); 529 padding: var(--po-s3, 12px); 530 background: var(--po-card-bg, #fff); 531 text-align: left; 218 532 } 219 533 220 534 .cs-fin-stat span { 221 535 display: block; 222 font-size: 11px; 536 font-size: var(--po-fs-label, 11px); 537 font-weight: 700; 223 538 text-transform: uppercase; 224 letter-spacing: .03em; 225 color: var(--po-text-soft, #808792); 226 margin-bottom: 4px; 539 letter-spacing: .07em; 540 color: var(--po-text-muted, #5b6673); 541 margin-bottom: var(--po-s1, 4px); 542 white-space: nowrap; 543 overflow: hidden; 544 text-overflow: ellipsis; 227 545 } 228 546 229 547 .cs-fin-stat strong { 230 548 display: block; 231 font-size: 19px; 232 color: var(--po-text, #333); 549 font-size: 20px; 550 font-weight: 600; 551 letter-spacing: -.01em; 552 color: var(--po-heading, #293241); 553 font-variant-numeric: tabular-nums; 233 554 } 234 555 235 556 .cs-fin-stat.cs-fin-primary { 236 background: var(--po-accent-soft, rgba(70,130,180,0.08));237 557 border-color: var(--po-accent-line, rgba(70,130,180,0.3)); 558 box-shadow: inset 0 2px 0 var(--po-accent, #3D5A80); 238 559 } 239 560 … … 245 566 * rest as light stats. This Year and Last Year share it for easy comparison. 246 567 * Scoped to .po-profit-* so nothing else changes. */ 247 .po-profit-year { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 26px; background: var(--po-card-bg, #fff); border: 1px solid var(--po-line, #e3e6ea); border-radius: 14px; padding: 18px 22px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.09); } 248 .po-profit-hero { flex: 0 0 200px; min-width: 200px; } 249 .po-profit-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--po-text-muted, #6b7480); } 250 .po-profit-v { display: block; font-size: 36px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin-top: 2px; color: var(--po-heading, #2f5aae); white-space: nowrap; } 568 /* (2026-09-13 visual pass) Was a 14px-radius card carrying TWO stacked 569 * shadows. Now a flat panel with a hairline: the numbers are the subject, 570 * the container should be invisible. */ 571 .po-profit-year { display: flex; flex-wrap: wrap; align-items: center; gap: var(--po-s5, 24px) var(--po-s5, 24px); background: var(--po-card-bg, #fff); border: 1px solid var(--po-card-border, #e3e6ea); border-radius: var(--po-radius, 6px); padding: var(--po-s4, 16px) var(--po-s5, 24px); margin: 0 0 var(--po-s4, 16px); box-shadow: none; } 572 /* 236px, not 200: at 200 the sub-line ("80.6% margin, 0.0% YoY growth") 573 * wrapped with one word stranded on its own row under the hero figure. */ 574 .po-profit-hero { flex: 0 0 236px; min-width: 236px; } 575 .po-profit-k { display: block; font-size: var(--po-fs-label, 11px); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--po-text-muted, #6b7480); } 576 .po-profit-v { display: block; font-size: var(--po-fs-hero, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin-top: var(--po-s1, 4px); color: var(--po-heading, #2f5aae); white-space: nowrap; font-variant-numeric: tabular-nums; } 251 577 .po-profit-v.cs-fin-positive { color: var(--po-positive, #1e7e34); } 252 578 .po-profit-v.cs-fin-negative { color: var(--po-negative, #c0392b); } 253 .po-profit-sub { display: block; font-size: 13px; color: var(--po-text-muted, #6b7480); margin-top: 4px; }579 .po-profit-sub { display: block; font-size: var(--po-fs-meta, 13px); color: var(--po-text-muted, #6b7480); margin-top: var(--po-s1, 4px); } 254 580 .po-profit-sub strong { color: var(--po-text, #2b3440); } 255 581 .po-profit-vline { width: 1px; align-self: stretch; background: var(--po-line, #e3e6ea); } 256 .po-profit-substats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 24px; flex: 1; align-content: center; } 582 /* auto-fit, not a hard 5 columns (2026-09-13, second look): at five fixed 583 * columns a two-word label like "TOTAL EXPENSES" wrapped and pushed its 584 * value down, so the figures no longer sat on one line and the row lost the 585 * alignment that makes a stat strip readable. Now the strip drops to four 586 * columns before it squeezes a label, and the labels never wrap. */ 587 .po-profit-substats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--po-s4, 16px) var(--po-s4, 16px); flex: 1; align-content: center; } 257 588 @media (max-width: 760px){ .po-profit-substats { grid-template-columns: repeat(3, minmax(0, 1fr)); } } 258 589 @media (max-width: 460px){ .po-profit-substats { grid-template-columns: repeat(2, minmax(0, 1fr)); } } 259 .po-profit-stat span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--po-text-soft, #9aa5b1); }260 .po-profit-stat strong { display: block; font-size: 1 8px; font-weight: 700; margin-top: 1px; }590 .po-profit-stat span { display: block; font-size: var(--po-fs-label, 11px); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--po-text-soft, #9aa5b1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } 591 .po-profit-stat strong { display: block; font-size: 17px; font-weight: 600; margin-top: var(--po-s1, 4px); font-variant-numeric: tabular-nums; } 261 592 .po-profit-stat strong.cs-fin-positive { color: var(--po-positive, #1e7e34); } 262 593 .po-profit-stat strong.cs-fin-negative { color: var(--po-negative, #c0392b); } 263 @media (max-width: 640px){ .po-profit-vline { display: none; } .po-profit-v { font-size: 30px; } }594 @media (max-width: 640px){ .po-profit-vline { display: none; } .po-profit-v { font-size: 26px; } } 264 595 265 596 /* Ranking cards: inline stat strip instead of 5 boxed tiles (Mike 2026-09-10), 266 597 * led by Profit/hr. */ 267 598 .po-rank-strip { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--po-line, #e3e6ea); } 268 .po-rank-stat span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--po-text-soft, #9aa5b1); }269 .po-rank-stat strong { display: block; font-size: 15px; font-weight: 700; margin-top: 1px; }599 .po-rank-stat span { display: block; font-size: var(--po-fs-label, 11px); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--po-text-soft, #9aa5b1); } 600 .po-rank-stat strong { display: block; font-size: var(--po-fs-card, 15px); font-weight: 600; margin-top: var(--po-s1, 4px); font-variant-numeric: tabular-nums; } 270 601 .po-rank-stat strong.cs-fin-positive { color: var(--po-positive, #1e7e34); } 271 602 .po-rank-stat strong.cs-fin-negative { color: var(--po-negative, #c0392b); } … … 277 608 } 278 609 610 /* (2026-09-13 visual pass) Table heads were a tinted accent band with a 2px 611 * accent rule under them, which made every table shout before you read a 612 * single value. A column head is a LABEL: small, letterspaced, muted, on the 613 * card surface, closed with one hairline. The data is what should be dark. */ 279 614 .cs-fin-table th { 280 background: var(--po-accent-soft, rgba(70,130,180,0.08));281 color: var(--po- heading, #2f5aae);615 background: transparent; 616 color: var(--po-text-muted, #5b6673); 282 617 text-align: left; 283 padding: 9px 10px; 284 font-size: 13px; 285 font-weight: 600; 286 border-bottom: 2px solid var(--po-accent-line, rgba(70,130,180,0.25)); 618 padding: var(--po-s2, 8px) var(--po-s3, 12px); 619 font-size: var(--po-fs-label, 11px); 620 font-weight: 700; 621 letter-spacing: .07em; 622 text-transform: uppercase; 623 white-space: nowrap; 624 border-bottom: 1px solid var(--po-card-border, #d7e3ec); 287 625 } 288 626 289 627 .cs-fin-table td { 290 padding: 8px 10px;628 padding: var(--po-s3, 12px); 291 629 border-bottom: 1px solid var(--po-line, #eee); 292 630 vertical-align: middle; 631 font-size: var(--po-fs-body, 14px); 632 color: var(--po-text, #2b3440); 633 } 634 /* The last row closes on the panel edge, not on a dangling rule. */ 635 .cs-fin-table > tbody > tr:last-child > td { border-bottom: 0; } 636 637 /* Money and count columns align right so decimal points stack and a column 638 * can be read down. The .po-num class is applied by app-fin-table-labels.js, 639 * which already walks every .cs-fin-table and .veh-table to copy the column 640 * heads onto the cells for the phone layout; it only marks a column where 641 * EVERY non-empty cell in it is a bare number, so a mixed column keeps its 642 * left alignment rather than being guessed at. */ 643 .cs-fin-table th.po-num, 644 .cs-fin-table td.po-num, 645 .veh-table th.po-num, 646 .veh-table td.po-num { 647 text-align: right; 648 font-variant-numeric: tabular-nums; 649 } 650 @media (max-width: 782px) { 651 /* The phone layout turns each row into label/value pairs that are already 652 * right-aligned, so the desktop rule would be a no-op at best and fight 653 * the flex row at worst. */ 654 .cs-fin-table td.po-num, .veh-table td.po-num { text-align: right; } 293 655 } 294 656 … … 361 723 } 362 724 725 /* (2026-09-13 visual pass) The totals box under a table. Tightened, and the 726 * label set small so the figure inside it is what the eye lands on. */ 363 727 .cs-fin-gross-box { 364 border: 1px solid var(--po- tile-border, #e6e6e6);365 border-radius: var(--po-radius- sm, 6px);366 padding: 12px 14px;728 border: 1px solid var(--po-card-border, #e6e6e6); 729 border-radius: var(--po-radius-xs, 4px); 730 padding: var(--po-s3, 12px) var(--po-s4, 16px); 367 731 background: var(--po-tile-bg, #fafbfc); 368 margin: 14px 0 20px;732 margin: var(--po-s4, 16px) 0 var(--po-s5, 24px); 369 733 max-width: 320px; 734 font-variant-numeric: tabular-nums; 735 } 736 .cs-fin-gross-box strong { 737 display: block; 738 font-size: var(--po-fs-label, 11px); 739 font-weight: 700; 740 letter-spacing: .07em; 741 text-transform: uppercase; 742 color: var(--po-text-muted, #5b6673); 743 margin-bottom: var(--po-s1, 4px); 370 744 } 371 745 … … 703 1077 .po-biz-tile { background: var(--po-card-bg, #fff); border: 1px solid var(--po-card-border, #e3e8ee); border-radius: var(--po-radius, 12px); padding: 16px 18px; } 704 1078 .po-biz-tile-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--po-text-muted, #6b7684); } 705 .po-biz-tile-value { font-size: 23px; font-weight: 800; color: var(--po-heading, #293241); margin-top: 6px; } 1079 /* 22px/600, not 23px/800: one figure weight across the app's stat surfaces 1080 * (job tiles 20px, these page-level tiles 22px, the profit hero 30px), and 1081 * tabular so the four tiles align down their digits. */ 1082 .po-biz-tile-value { font-size: 22px; font-weight: 600; letter-spacing: -.01em; color: var(--po-heading, #293241); margin-top: var(--po-s1, 4px); font-variant-numeric: tabular-nums; } 706 1083 .po-biz-tile-sub { font-size: 12.5px; color: var(--po-text-muted, #6b7684); margin-top: 2px; } 707 1084 .po-biz-tile.is-total { background: var(--po-heading, #293241); border-color: var(--po-heading, #293241); } … … 871 1248 * Photo, Choose Photo, Analyze Photo, etc.) the same solid accent color 872 1249 * regardless of which variant class was actually on it. */ 1250 /* (2026-09-13 visual pass) Three levels of emphasis, not two shades of the 1251 * same one. PRIMARY is solid accent and there should be exactly one per 1252 * screen. SECONDARY is a bordered white button in the TEXT color, not the 1253 * accent: it used to be accent-on-white, which read as important as the 1254 * primary and left a screen with six equally loud actions. TERTIARY is the 1255 * plain link. Desktop drops to 38px because a 44px control row looks like a 1256 * phone app on a 27in monitor; phones keep the full 44px touch target in the 1257 * media query below, since this is used on ladders. */ 873 1258 .paintops-btn { 874 1259 display: inline-block; 875 padding: 0.7rem 1.3rem!important;876 min-height: 44px;1260 padding: 9px 16px !important; 1261 min-height: 38px; 877 1262 border-radius: var(--po-radius-xs, 4px) !important; 878 1263 font-weight: 600; 879 font-size: 15px;1264 font-size: var(--po-fs-body, 14px); 880 1265 text-decoration: none; 881 1266 cursor: pointer; 882 1267 border: 1px solid transparent !important; 883 transition: opacity 0.15s ease; 884 line-height: 1.4; 1268 transition: background-color .12s ease, border-color .12s ease; 1269 line-height: 1.45; 1270 } 1271 @media (max-width: 782px) { 1272 .paintops-btn { min-height: 44px; padding: 11px 18px !important; font-size: 15px; } 885 1273 } 886 1274 887 1275 .paintops-btn:hover { 888 opacity: 0.85;1276 opacity: 1; 889 1277 } 890 1278 … … 896 1284 } 897 1285 1286 .paintops-btn-primary:hover, 1287 .paintops-btn-primary:focus-visible { 1288 filter: brightness(1.07); 1289 } 1290 898 1291 .paintops-btn-secondary, 899 1292 .paintops-btn-secondary:visited { 900 1293 background: var(--po-btn2-bg, #fff) !important; 901 color: var(--po- accent, #4682B4) !important;1294 color: var(--po-text, #2b3440) !important; 902 1295 border-color: var(--po-input-border, #ccc) !important; 1296 } 1297 .paintops-btn-secondary:hover, 1298 .paintops-btn-secondary:focus-visible { 1299 background: var(--po-hover, #f4f7fa) !important; 1300 border-color: var(--po-accent-line, rgba(61,90,128,.35)) !important; 1301 } 1302 1303 /* One visible keyboard focus ring for everything focusable inside the app, 1304 * in the accent. There was none before beyond each browser's default, which 1305 * on a link is a 1px near-black hairline that disappears on a dark row. A 1306 * back office gets driven by keyboard: tab order, Enter, Escape. Scoped to 1307 * the app's own canvas and chrome so the host theme's pages are untouched. 1308 * :focus-visible, not :focus, so a mouse click never paints a ring. */ 1309 .paintops-app-canvas-inner a:focus-visible, 1310 .paintops-app-canvas-inner button:focus-visible, 1311 .paintops-app-canvas-inner input:focus-visible, 1312 .paintops-app-canvas-inner select:focus-visible, 1313 .paintops-app-canvas-inner textarea:focus-visible, 1314 .paintops-app-canvas-inner summary:focus-visible, 1315 .paintops-btn:focus-visible, 1316 .button:focus-visible, 1317 .job-form button:focus-visible, 1318 .pv-more-toggle:focus-visible, 1319 .po-jrow-actions-toggle:focus-visible, 1320 .pv-dir-gear:focus-visible { 1321 outline: 2px solid var(--po-accent, #3D5A80); 1322 outline-offset: 2px; 1323 border-radius: var(--po-radius-xs, 4px); 1324 } 1325 /* On the navy rail the accent ring would disappear, so the ring there is 1326 * the light marker color instead. */ 1327 .paintops-shell .po-side a:focus-visible, 1328 .paintops-shell .po-side button:focus-visible { 1329 outline: 2px solid var(--po-nav-marker, #98C1D9); 1330 outline-offset: -2px; 903 1331 } 904 1332 … … 1043 1471 } 1044 1472 1045 .pv-quick-actions a { 1473 /* .pv-more-toggle and .pv-dir-gear inside this row are <button> since the 1474 * 2026-09-13 audit (B5), so this rule can no longer key off the tag alone: 1475 * name them explicitly or they fall back to the button reset near the top 1476 * of this file and lose the size, weight and accent color the links had. */ 1477 .pv-quick-actions a, 1478 .pv-quick-actions .pv-more-toggle, 1479 .pv-quick-actions .pv-dir-gear { 1046 1480 display: inline-flex; 1047 1481 align-items: center; … … 1053 1487 } 1054 1488 1055 .pv-quick-actions a:hover { 1489 .pv-quick-actions a:hover, 1490 .pv-quick-actions .pv-more-toggle:hover, 1491 .pv-quick-actions .pv-dir-gear:hover { 1056 1492 text-decoration: underline; 1057 1493 } … … 1185 1621 justify-content: center; 1186 1622 gap: 6px; 1187 min-height: 72px;1623 min-height: 64px; 1188 1624 height: 100%; 1189 padding: 1 2px 8px;1625 padding: 10px 8px; 1190 1626 border: 1px solid var(--po-card-border, #ddd); 1191 border-radius: var(--po-radius , 10px);1192 background: var(--po- tile-bg, #f7f9fc);1193 color: var(--po- accent, #4682B4) !important;1627 border-radius: var(--po-radius-xs, 4px); 1628 background: var(--po-card-bg, #fff); 1629 color: var(--po-text, #2b3440) !important; 1194 1630 font-weight: 600; 1195 1631 font-size: 13px; … … 1311 1747 .job-card { 1312 1748 border: 1px solid var(--po-card-border, #ddd); 1313 border-radius: var(--po-radius -sm, 6px);1314 padding: 1rem 1.25rem;1315 margin-bottom: 1.5rem;1749 border-radius: var(--po-radius, 6px); 1750 padding: var(--po-s4, 16px); 1751 margin-bottom: var(--po-s4, 16px); 1316 1752 background: var(--po-card-bg, #fff); 1317 box-shadow: var(--po-card-shadow, 0 2px 4px rgba(0,0,0,.05));1753 box-shadow: none; 1318 1754 } 1319 1755 … … 1328 1764 } 1329 1765 1766 /* Inside a card this is a card title, not a page title, so it steps down. */ 1330 1767 .job-card .job-title { 1331 font-size: 19px; 1768 font-size: var(--po-fs-card, 15px); 1769 font-weight: 600; 1332 1770 color: var(--po-heading, #2f5aae); 1333 1771 margin: 0; … … 1344 1782 } 1345 1783 1784 /* (2026-09-13 visual pass) Status chips were 12px-radius pills at .75rem. 1785 * A record can carry three or four of them at once, so at that size they 1786 * out-weighed the customer name they were describing. Now a small squared 1787 * tag: same colors, same information, a third of the visual noise. */ 1346 1788 .job-badge { 1347 1789 display: inline-block; 1348 padding: 2px 10px;1349 border-radius: 12px;1350 font-size: .75rem;1790 padding: 2px 7px; 1791 border-radius: 3px; 1792 font-size: var(--po-fs-label, 11px); 1351 1793 font-weight: 600; 1794 letter-spacing: .02em; 1795 line-height: 1.6; 1352 1796 white-space: nowrap; 1353 1797 } … … 1385 1829 1386 1830 /* Job Title Section */ 1831 /* (2026-09-13 visual pass) This is the <h1> on the Job View screen, i.e. the 1832 * record's name, so it matches .po-screen-title exactly rather than being a 1833 * second, heavier title style. Same size, same weight, same ink: one page 1834 * title look in the whole app. */ 1387 1835 .job-title { 1388 font-size: 24px; 1389 font-weight: bold; 1390 margin-top: 20px; 1391 margin-bottom: 10px; 1836 font-size: var(--po-fs-page, 21px); 1837 font-weight: 600; 1838 letter-spacing: -0.01em; 1839 line-height: 1.3; 1840 color: var(--po-heading, #293241); 1841 margin: 0 0 var(--po-s3, 12px); 1392 1842 word-break: break-word; 1393 1843 } 1844 @media (max-width: 782px) { .job-title { font-size: 19px; } } 1394 1845 1395 1846 .job-id, … … 1449 1900 box-sizing: border-box; 1450 1901 margin: 0; 1451 padding: 8px 16px !important; 1452 font-size: 14px !important; 1453 line-height: 1.4 !important; 1902 padding: 8px 14px !important; 1903 font-size: var(--po-fs-body, 14px) !important; 1904 font-weight: 600; 1905 line-height: 1.45 !important; 1454 1906 height: auto !important; 1455 border-radius: var(--po-radius-sm, 6px); 1456 border: 1px solid var(--po-accent, #4682B4); 1907 border-radius: var(--po-radius-xs, 4px); 1908 /* (2026-09-13) Was an accent-colored border and accent text, which made 1909 * every incidental "Search" / "Rename" / "Filter" button look like a call 1910 * to action. These are secondary by definition, so they take the neutral 1911 * border and the text ink. */ 1912 border: 1px solid var(--po-input-border, #ccd6de); 1457 1913 background: var(--po-card-bg, #fff); 1458 color: var(--po- accent, #4682B4);1914 color: var(--po-text, #2b3440); 1459 1915 cursor: pointer; 1460 1916 text-decoration: none; … … 1465 1921 button.button:hover, 1466 1922 input.button:hover { 1467 opacity: 0.85; 1923 background: var(--po-hover, #f4f7fa); 1924 border-color: var(--po-accent-line, rgba(61,90,128,.35)); 1925 } 1926 1927 /* button-primary keeps its job: the one solid action in a form. */ 1928 .button-primary, 1929 a.button-primary, 1930 button.button-primary, 1931 input.button-primary { 1932 background: var(--po-accent, #4682B4); 1933 border-color: var(--po-accent, #4682B4); 1934 color: #fff; 1935 } 1936 .button-primary:hover, 1937 a.button-primary:hover, 1938 button.button-primary:hover, 1939 input.button-primary:hover { 1940 background: var(--po-accent, #4682B4); 1941 filter: brightness(1.07); 1468 1942 } 1469 1943 … … 1530 2004 * money) so the page scans identically every day. All colors ride the 1531 2005 * --po-* theme variables. */ 1532 .po-jrows-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 8px; } 1533 .po-jrows-head:first-child { margin-top: 6px; } 1534 .po-jrows-label { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--po-heading, #2f5aae); } 1535 .po-jrows-meta { font-size: 13px; font-weight: 600; color: var(--po-text-muted, #667581); } 2006 /* (2026-09-13 visual pass) Group labels were 13px/800 in the heading ink, 2007 * which is a heading's weight on a divider's job. Same eyebrow treatment as 2008 * every other section label in the app now, so the row cards below them are 2009 * what the eye lands on. */ 2010 .po-jrows-head { display: flex; align-items: baseline; gap: var(--po-s2, 8px); margin: var(--po-s5, 24px) 0 var(--po-s2, 8px); } 2011 .po-jrows-head:first-child { margin-top: 0; } 2012 .po-jrows-label { font-size: var(--po-fs-label, 11px); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--po-text-muted, #5b6673); } 2013 .po-jrows-meta { font-size: var(--po-fs-meta, 13px); font-weight: 500; color: var(--po-text-soft, #97a2ae); } 1536 2014 /* overflow is VISIBLE on purpose (Mike 2026-09-13): the row Actions menu 1537 2015 * now floats below its row instead of expanding inline, and the last row's … … 1539 2017 * background, so the rounded corners still read clean without clipping. 1540 2018 * container-type stays: it only adds layout/style containment, never paint. */ 1541 .po-jrows-card { background: var(--po-card-bg, #fff); border: 1px solid var(--po-card-border, #ddd); border-radius: var(--po-radius, 12px); box-shadow: var(--po-card-shadow, 0 1px 2px rgba(0,0,0,.04)); overflow: visible; container-type: inline-size; } 1542 .po-jrow { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr) 130px 150px 110px auto; gap: 14px; align-items: center; padding: 13px 18px; border-top: 1px solid var(--po-line, #f1f4f7); } 2019 .po-jrows-card { background: var(--po-card-bg, #fff); border: 1px solid var(--po-card-border, #ddd); border-radius: var(--po-radius, 6px); box-shadow: none; overflow: visible; container-type: inline-size; } 2020 .po-jrow { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr) 130px 150px 110px auto; gap: var(--po-s3, 12px); align-items: center; padding: var(--po-s3, 12px) var(--po-s4, 16px); border-top: 1px solid var(--po-line, #f1f4f7); } 2021 .po-jrow:hover { background: var(--po-hover, #f6f9fb); } 1543 2022 .po-jrow:first-child { border-top: none; } 1544 2023 .po-jrow-empty { display: block; color: var(--po-text-muted, #667581); font-size: 14px; } 1545 .po-jrow-status { font-size: 12.5px; font-weight: 700; color: var(--po-text-muted, #667581); display: flex; align-items: center; gap: 7px; white-space: nowrap; }2024 .po-jrow-status { font-size: var(--po-fs-meta, 13px); font-weight: 500; color: var(--po-text-muted, #667581); display: flex; align-items: center; gap: 7px; white-space: nowrap; } 1546 2025 .po-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--po-text-soft, #9aa5b1); } 1547 2026 .po-dot-green { background: var(--po-positive, #1a7f37); } … … 1553 2032 * the Board's card titles are --po-accent, so the two views disagreed and the 1554 2033 * row titles read as black. Match the Board so every job link is one color. */ 1555 .po-jrow-title { font-weight: 700; font-size: 14.5px; color: var(--po-accent, #4682B4); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }2034 .po-jrow-title { font-weight: 600; font-size: var(--po-fs-body, 14px); color: var(--po-accent, #4682B4); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } 1556 2035 .po-jrow-title:hover { text-decoration: underline; } 1557 2036 .po-jrow-sub { font-size: 13px; color: var(--po-text-muted, #667581); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } 1558 .po-jrow-cell { font-size: 13.5px; color: var(--po-text, #2b3440); } 1559 .po-jrow-cell a { font-weight: 700; } 1560 .po-jrow-money { font-size: 13.5px; font-weight: 700; color: var(--po-heading, #2f5aae); text-align: right; white-space: nowrap; } 2037 .po-jrow-cell { font-size: var(--po-fs-meta, 13px); color: var(--po-text, #2b3440); } 2038 .po-jrow-cell a { font-weight: 600; } 2039 /* Money is the one place extra weight is earned: it is what the row is 2040 * ultimately about, and tabular figures let a column of them be scanned. */ 2041 .po-jrow-money { font-size: var(--po-fs-body, 14px); font-weight: 600; color: var(--po-heading, #2f5aae); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; } 1561 2042 .po-jrow-due { color: var(--po-negative, #c0392b); } 1562 2043 .po-jrow-dim { color: var(--po-text-soft, #9aa5b1); } … … 1567 2048 .po-jrow-labeled { display: flex; flex-direction: column; justify-content: center; gap: 2px; } 1568 2049 .po-jrow-money.po-jrow-labeled { align-items: flex-end; } 1569 .po-jrow-clabel { font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--po-text-soft, #9aa5b1); line-height: 1; }2050 .po-jrow-clabel { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--po-text-soft, #9aa5b1); line-height: 1; } 1570 2051 .po-jrow-crew { display: inline-flex; } 1571 .po-jrow-avatar { width: 2 7px; height: 27px; border-radius: 50%; background: var(--po-accent, #3D5A80); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--po-card-bg, #fff); }2052 .po-jrow-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--po-accent, #3D5A80); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--po-card-bg, #fff); } 1572 2053 .po-jrow-avatar + .po-jrow-avatar { margin-left: -8px; } 1573 2054 .po-jrow-avatar-more { background: var(--po-tile-bg, #eef2f6); color: var(--po-text-muted, #667581); } -
paintops/trunk/assets/js/app-fin-table-labels.js
r3627427 r3694342 21 21 } 22 22 } 23 markNumericColumns(table, heads.length); 24 } 25 } 26 27 /* Right-align the money and count columns (2026-09-13 visual pass). 28 A column of currency read left-aligned is the clearest sign that a 29 screen was not built by anyone who reads financial statements: the 30 decimal points never line up, so the numbers cannot be compared by 31 eye. Doing it here, in the pass that already walks every 32 .cs-fin-table and .veh-table, means it applies to every table in the 33 app without touching a single table's markup. 34 35 A column qualifies only if it has body cells and EVERY non-empty one 36 BEGINS with a figure: an optional sign, an optional currency symbol, 37 then a digit. A cell may carry a qualifier after the figure, which is 38 what the Estimate vs Actual table does ("$11,900.00 (no quote)", 39 "$8,785.00 / 73.8%"); requiring the whole cell to be a bare number 40 left those two money columns left-aligned beside a right-aligned 41 Variance, which looked like an oversight rather than a rule. A cell 42 that STARTS with a word (a metric name, a customer, a job title, a 43 button) disqualifies the whole column, so a mixed column is still 44 left alone rather than guessed at. */ 45 var NUM = /^[-+]?\s?[$£€]?\s?\d/; 46 47 function markNumericColumns(table, colCount) { 48 var rows = table.querySelectorAll(':scope > tbody > tr'); 49 if (!rows.length || !colCount) { return; } 50 var seen = [], ok = []; 51 for (var i = 0; i < colCount; i++) { seen[i] = 0; ok[i] = true; } 52 for (var r = 0; r < rows.length; r++) { 53 var cells = rows[r].children, idx = 0; 54 for (var c = 0; c < cells.length; c++) { 55 var cell = cells[c]; 56 if (cell.tagName !== 'TD') { continue; } 57 var span = cell.colSpan || 1; 58 if (span !== 1) { idx += span; continue; } 59 if (idx < colCount) { 60 var txt = (cell.textContent || '').replace(/\u00a0/g, ' ').trim(); 61 if (txt !== '' && txt !== '-' && txt !== '\u2014') { 62 seen[idx]++; 63 if (!NUM.test(txt)) { ok[idx] = false; } 64 } 65 } 66 idx += span; 67 } 68 } 69 var ths = table.querySelectorAll(':scope > thead > tr > th'); 70 for (var col = 0; col < colCount; col++) { 71 if (!ok[col] || seen[col] === 0) { continue; } 72 if (ths[col]) { ths[col].classList.add('po-num'); } 73 for (var r2 = 0; r2 < rows.length; r2++) { 74 var cs = rows[r2].children, k = 0; 75 for (var c2 = 0; c2 < cs.length; c2++) { 76 if (cs[c2].tagName !== 'TD') { continue; } 77 var sp = cs[c2].colSpan || 1; 78 if (sp === 1 && k === col) { cs[c2].classList.add('po-num'); } 79 k += sp; 80 } 81 } 23 82 } 24 83 } -
paintops/trunk/assets/js/app-nav.js
r3692081 r3694342 42 42 // job-style.php), so the two stack instead of overlapping. 43 43 document.body.classList.add('paintops-nav-bottom-active'); 44 var moreBtn = bar.querySelector('.pbn-more-btn'); 45 var sheet = document.querySelector('.pbn-sheet'); 44 45 // TWO bottom sheets now (Mike 2026-09-13): "More", and the "+ New" 46 // chooser that replaced the raised +'s direct link to New Request. 47 // They share ONE backdrop and only one is ever open, so opening 48 // either closes the other. Each pair is [trigger, sheet]; a pair 49 // whose sheet is absent (a worker gets a plain + link, not the 50 // chooser) is simply skipped. 46 51 var backdrop = document.querySelector('.pbn-sheet-backdrop'); 47 function openSheet() { 48 if (sheet) { sheet.hidden = false; } 52 var pairs = [ 53 [bar.querySelector('.pbn-more-btn'), document.querySelector('.pbn-sheet-more')], 54 [bar.querySelector('.pbn-new-btn'), document.querySelector('.pbn-sheet-new')] 55 ].filter(function(p) { return p[0] && p[1]; }); 56 57 function closeAll() { 58 pairs.forEach(function(p) { 59 p[1].hidden = true; 60 p[0].setAttribute('aria-expanded', 'false'); 61 }); 62 if (backdrop) { backdrop.hidden = true; } 63 } 64 function open(pair) { 65 closeAll(); 66 pair[1].hidden = false; 67 pair[0].setAttribute('aria-expanded', 'true'); 49 68 if (backdrop) { backdrop.hidden = false; } 50 if (moreBtn) { moreBtn.setAttribute('aria-expanded', 'true'); }51 69 } 52 function closeSheet() { 53 if (sheet) { sheet.hidden = true; } 54 if (backdrop) { backdrop.hidden = true; } 55 if (moreBtn) { moreBtn.setAttribute('aria-expanded', 'false'); } 56 } 57 if (moreBtn) { 58 moreBtn.addEventListener('click', function() { 59 if (sheet && sheet.hidden === false) { closeSheet(); } else { openSheet(); } 70 71 pairs.forEach(function(pair) { 72 pair[0].addEventListener('click', function() { 73 if (pair[1].hidden === false) { closeAll(); } else { open(pair); } 60 74 }); 61 } 62 if (backdrop) { backdrop.addEventListener('click', closeSheet); } 63 document.addEventListener('keydown', function(e) { if (e.key === 'Escape') { closeSheet(); } }); 75 }); 76 if (backdrop) { backdrop.addEventListener('click', closeAll); } 77 document.addEventListener('keydown', function(e) { 78 if (e.key === 'Escape' || e.key === 'Esc') { closeAll(); } 79 }); 64 80 })(); 65 81 -
paintops/trunk/assets/js/po-toggles.js
r3693322 r3694342 1 1 /* Shared show/hide toggle for the "More Actions" style drawers. 2 A n anchorcarrying data-po-toggle="<panel id>" toggles that panel's2 A button carrying data-po-toggle="<panel id>" toggles that panel's 3 3 .show class, swaps its .po-toggle-label between data-closed-label / 4 4 data-open-label, and flips the .pv-more-chevron arrow. Replaces the … … 26 26 var chev = t.querySelector('.pv-more-chevron'); 27 27 if (chev) { chev.innerHTML = open ? '▴' : '▾'; } 28 // These toggles are <button aria-expanded> since the 2026-09-13 audit 29 // (B5), and aria-expanded now actually survives wp_kses (A2), so keep 30 // it in step with the panel instead of leaving it stuck at "false". 31 if (t.hasAttribute('aria-expanded')) { 32 t.setAttribute('aria-expanded', open ? 'true' : 'false'); 33 } 28 34 } 29 35 -
paintops/trunk/changelog.txt
r3693322 r3694342 4 4 5 5 == Changelog == 6 7 = 1.1.000 = 8 * A visual refresh across the whole app. The menu is now a dark navy rail with the PaintClarity mark at the top, and the page you are on is marked with a blue bar rather than a filled pill. 9 * Every screen now has a proper page header: the screen name, a thin rule under it, and, where the page already knows it, a short line of context such as how many customers are listed or which year the Profits page is showing. 10 * Text sizes are consistent everywhere. Helper sentences used to render at whatever size your WordPress theme happened to use, which on many themes made them larger than the headings above them. 11 * Money columns in every table now line up on the right with their decimal points stacked, so a column of figures can be read down. 12 * Buttons now have three clear levels: one solid action per screen, bordered buttons for everything secondary, and plain links for the rest. Previously almost every button looked equally important. 13 * The job stat tiles lead with Profit, marked with a rule across the top. On some themes the old highlight made the most important figure look like the faded one. 14 * Cards and tables are flatter and tighter, with a hairline border instead of a shadow. Shadows are now used only for menus and panels that genuinely float above the page. 15 * Keyboard users get a clear focus outline on every control in the app. 16 * The company logo you upload is unchanged everywhere it belongs: quotes, invoices, expense reports and your customer payment pages. Only the app menu shows the PaintClarity mark. 17 * Accessibility: icons, the job search box and the phone menus now keep their screen-reader attributes, which WordPress had been stripping. Form fields across the app that had no label now have one. 18 * Editing a customer's address from the Customers list now opens the full Edit Customer form instead of a small editor inside the row. One form, one save, one set of rules, so the two can never drift apart. 19 * Fixed a typo in one of the starter Resource links, "12 Mistakes That Loose Sales". New installs were already correct; sites set up before the fix have the title corrected automatically, and if both spellings ended up on your site the misspelled one is moved to the trash where you can still get it back. 6 20 7 21 = 1.0.301 = -
paintops/trunk/includes/app-themes.php
r3692081 r3694342 457 457 '--po-positive' => '#1e7e34', 458 458 '--po-negative' => '#c0392b', 459 '--po-radius' => '12px', 460 '--po-radius-sm' => '10px', 461 '--po-radius-xs' => '8px', 459 // (2026-09-13 visual pass) Were 12/10/8/20. A 12px card 460 // corner reads consumer; business software sits at 4-6px, 461 // which is what makes a panel look like a record rather 462 // than a widget. The pill radius stays for status chips, 463 // where a full round IS the convention. 464 '--po-radius' => '6px', 465 '--po-radius-sm' => '5px', 466 '--po-radius-xs' => '4px', 462 467 '--po-radius-pill' => '20px', 463 '--po-nav-bg' => '#3D5A80', 468 // Structural navy. The rail, the phone bar and the classic 469 // app bar all read this. #293241 is the palette's deep 470 // charcoal navy; the steel blue #3D5A80 stays as --po-accent, 471 // i.e. reserved for things you can act on. 472 '--po-nav-bg' => '#293241', 464 473 // Coral (#EE6C4D) active pill, the signature coastal pop. 465 474 // The nav normally puts WHITE text on the active pill, but … … 484 493 // 3-class !important rule, which prints later in the document. 485 494 'css' => ' 486 body, body.paintops-app-canvas { background: # f4f6f9; }495 body, body.paintops-app-canvas { background: #eef1f5; } 487 496 body .paintops-appbar .pab-item.is-active { background: #f2fbfd !important; color: #293241 !important; } 497 :root { --po-app-bg: #eef1f5; } 488 498 ', 489 499 ], -
paintops/trunk/includes/business-notes.php
r3692411 r3694342 93 93 <div class="cs-fin-acc-body"> 94 94 <form method="post" style="margin:0;"> 95 <?php wp_nonce_field('paintops_note_add', 'paintops_note_nonce'); ?>95 <?php paintops_nonce_field('paintops_note_add', 'paintops_note_nonce'); ?> 96 96 <?php echo wp_kses(function_exists('paintops_once_field') ? paintops_once_field() : '', paintops_kses_allowed_html(), paintops_kses_protocols()); ?> 97 97 <p style="margin:0 0 10px;"> 98 <label style="font-size:13px;font-weight:600;display:block;margin-bottom:4px;">Title</label>99 <input type="text" name="note_title" placeholder="Short title" style="width:100%;max-width:520px;box-sizing:border-box;">98 <label for="poNoteTitleNew" style="font-size:13px;font-weight:600;display:block;margin-bottom:4px;">Title</label> 99 <input type="text" name="note_title" id="poNoteTitleNew" placeholder="Short title" style="width:100%;max-width:520px;box-sizing:border-box;"> 100 100 </p> 101 101 <p style="margin:0 0 12px;"> 102 <label style="font-size:13px;font-weight:600;display:block;margin-bottom:4px;">Note</label>103 <textarea name="note_body" rows="4" placeholder="Write your note here" style="width:100%;max-width:640px;box-sizing:border-box;"></textarea>102 <label for="poNoteBodyNew" style="font-size:13px;font-weight:600;display:block;margin-bottom:4px;">Note</label> 103 <textarea name="note_body" id="poNoteBodyNew" rows="4" placeholder="Write your note here" style="width:100%;max-width:640px;box-sizing:border-box;"></textarea> 104 104 </p> 105 105 <p style="margin:0;"><button type="submit" name="paintops_add_note" value="1" class="paintops-btn paintops-btn-primary">Save Note</button></p> … … 122 122 <?php if ($is_editing) : ?> 123 123 <form method="post" action="<?php echo esc_url(remove_query_arg('editNote')); ?>" style="margin:0;"> 124 <?php wp_nonce_field('paintops_note_edit_' . $r_id, 'paintops_note_edit_nonce'); ?>124 <?php paintops_nonce_field('paintops_note_edit_' . $r_id, 'paintops_note_edit_nonce'); ?> 125 125 <p style="margin:0 0 10px;"> 126 <label style="font-size:13px;font-weight:600;display:block;margin-bottom:4px;">Title</label>127 <input type="text" name="note_title" value="<?php echo esc_attr((string) $r->title); ?>" style="width:100%;max-width:520px;box-sizing:border-box;">126 <label for="<?php echo esc_attr('poNoteTitle' . $r_id); ?>" style="font-size:13px;font-weight:600;display:block;margin-bottom:4px;">Title</label> 127 <input type="text" name="note_title" id="<?php echo esc_attr('poNoteTitle' . $r_id); ?>" value="<?php echo esc_attr((string) $r->title); ?>" style="width:100%;max-width:520px;box-sizing:border-box;"> 128 128 </p> 129 129 <p style="margin:0 0 12px;"> 130 <label style="font-size:13px;font-weight:600;display:block;margin-bottom:4px;">Note</label>131 <textarea name="note_body" rows="5" style="width:100%;max-width:640px;box-sizing:border-box;"><?php echo esc_textarea((string) $r->body); ?></textarea>130 <label for="<?php echo esc_attr('poNoteBody' . $r_id); ?>" style="font-size:13px;font-weight:600;display:block;margin-bottom:4px;">Note</label> 131 <textarea name="note_body" id="<?php echo esc_attr('poNoteBody' . $r_id); ?>" rows="5" style="width:100%;max-width:640px;box-sizing:border-box;"><?php echo esc_textarea((string) $r->body); ?></textarea> 132 132 </p> 133 133 <p style="margin:0;"> -
paintops/trunk/includes/calendar.php
r3692081 r3694342 358 358 $paintops_timeoff_url = esc_url(paintops_admin_url(['timeOff' => 1])); 359 359 $calendarFeedUrlEsc = esc_attr(function_exists('paintops_calendar_feed_url') ? paintops_calendar_feed_url() : ''); 360 $calendarRegenNonce = wp_nonce_field('paintops_regen_calendar_token_action', '_wpnonce', true, false);360 $calendarRegenNonce = paintops_nonce_field('paintops_regen_calendar_token_action', '_wpnonce', true, false); 361 361 // Calendar screen CSS (assets/css/calendar.css) and the mobile 362 362 // scroll-to-today script (assets/js/calendar.js) through the enqueue … … 383 383 <div style="margin-top:10px;padding:14px;background:#f5f5f5;border-radius:6px;"> 384 384 <p style="margin-top:0;">Paste this link into your calendar app's "Subscribe by URL" / "Add calendar from URL" option to see every job and quote on your own phone or computer calendar. It's read-only, and most calendar apps only check for updates every few hours, that's a limit of how subscribed calendars work, not something PaintClarity controls.</p> 385 <input type="text" readonly value="<?php echo esc_attr(function_exists('paintops_calendar_feed_url') ? paintops_calendar_feed_url() : ''); ?>" onclick="this.select();" style="width:100%;padding:8px;box-sizing:border-box;margin-bottom:10px;">385 <input type="text" readonly aria-label="Calendar feed URL" value="<?php echo esc_attr(function_exists('paintops_calendar_feed_url') ? paintops_calendar_feed_url() : ''); ?>" onclick="this.select();" style="width:100%;padding:8px;box-sizing:border-box;margin-bottom:10px;"> 386 386 <form method="post" onsubmit="return confirm('Regenerating will break this link for anyone already subscribed to it. Continue?');" style="margin:0;"> 387 387 <?php echo wp_kses($calendarRegenNonce, paintops_kses_allowed_html(), paintops_kses_protocols()); ?> -
paintops/trunk/includes/customer-payments.php
r3692081 r3694342 594 594 <form method="post"> 595 595 <?php 596 wp_nonce_field( 'paintops_accept_quote_' . (int) $estimate->estID, 'paintops_accept_nonce' );596 paintops_nonce_field( 'paintops_accept_quote_' . (int) $estimate->estID, 'paintops_accept_nonce' ); 597 597 ?> 598 598 <?php … … 665 665 <form method="post" style="margin-top:10px;"> 666 666 <?php 667 wp_nonce_field( 'paintops_accept_quote_' . (int) $estimate->estID, 'paintops_accept_nonce' );667 paintops_nonce_field( 'paintops_accept_quote_' . (int) $estimate->estID, 'paintops_accept_nonce' ); 668 668 ?> 669 669 <textarea name="paintops_decline_reason" rows="2" placeholder="Optional: mind telling us why? (price, timing, went another way...)" style="width:100%;box-sizing:border-box;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:6px;"></textarea> -
paintops/trunk/includes/customers.php
r3692081 r3694342 183 183 } 184 184 185 // Inline primary-address save from the customer LIST rows (Mike 186 // 2026-07-23): the primary address doubles as the mailing/invoice 187 // address, but the only way to change it was the full Edit Customer 188 // form buried behind the detail page. This branch updates ONLY the 189 // four address columns, deliberately its own branch instead of 190 // reusing paintops_save_customer below, which reads EVERY field 191 // from POST and would blank the name/email/phone a row form doesn't 192 // carry. No viewCustomer redirect either: the save came from the 193 // list, so the user stays on the list (search filter and all, the 194 // row form posts back to the current URL). 195 if (isset($_POST['paintops_save_customer_address']) && paintops_user_can_manage() && check_admin_referer('paintops_save_customer_address_action')) { 196 $addr_customer_id = (int) ($_POST['customer_id'] ?? 0); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- value is cast to a number, sanitization not applicable 197 if ($addr_customer_id > 0) { 198 $wpdb->update($table, [ 199 'service_address' => sanitize_text_field(wp_unslash($_POST['service_address'] ?? '')), 200 'service_city' => sanitize_text_field(wp_unslash($_POST['service_city'] ?? '')), 201 'service_state' => strtoupper(sanitize_text_field(wp_unslash($_POST['service_state'] ?? ''))), 202 'service_zip' => sanitize_text_field(wp_unslash($_POST['service_zip'] ?? '')), 203 ], ['id' => $addr_customer_id], ['%s', '%s', '%s', '%s'], ['%d']); 204 $notice = '<div class="notice notice-success" style="margin:12px 0;padding:8px 12px;background:#d7f5d7;border-radius:4px;">Primary address updated.</div>'; 205 } 206 } 185 // (Mike 2026-09-14) The inline primary-address editor that used to live in 186 // the customer LIST rows is gone, along with its POST branch, its nonce 187 // action and its script. Editing an address is now one link to the full 188 // Edit Customer form, which is the single place a customer record is 189 // changed: one form, one save path, one set of validation rules. The row 190 // editor wrote only the four address columns and had to be its own 191 // branch for exactly that reason, which is the kind of second door that 192 // quietly drifts out of step with the real form. 193 // 194 // Nothing in the database changed; no existing address is affected. 207 195 208 196 if (isset($_POST['paintops_save_customer']) && paintops_user_can_manage() && check_admin_referer('paintops_save_customer_action')) { … … 247 235 // Standardized screen title (2026-07-19 consistency pass); the list 248 236 // is the Customers "page", detail/edit render their own titles. 249 $title_html = function_exists('paintops_screen_title') ? paintops_screen_title('Customers') : ''; 237 // The title is BUILT below, after the query, so its context line can 238 // count the rows this page is actually showing (2026-09-13 visual pass). 250 239 251 240 // Deliberately NOT named "s", that's WordPress's own reserved search … … 276 265 } 277 266 267 // Context line from what was just loaded, nothing re-queried. The list 268 // is capped at 200 rows by the queries above, so say so when it is full 269 // rather than implying the count is the whole book. 270 $cust_n = is_array($customers) ? count($customers) : 0; 271 $cust_ctx = function_exists('paintops_screen_context') ? paintops_screen_context([ 272 $cust_n === 1 ? '1 customer' : number_format_i18n($cust_n) . ($cust_n >= 200 ? '+ customers' : ' customers'), 273 $search !== '' ? 'matching "' . $search . '"' : '', 274 ]) : ''; 275 $title_html = function_exists('paintops_screen_title') ? paintops_screen_title('Customers', $cust_ctx) : ''; 276 278 277 ob_start(); 279 278 echo wp_kses($title_html, paintops_kses_allowed_html(), paintops_kses_protocols()); … … 283 282 <form method="get" class="paintops-customers-search"> 284 283 <input type="hidden" name="customers" value="1"> 285 <input type="text" name="custsearch" value="<?php echo esc_attr($search); ?>" placeholder="Search by name, email, phone, or address" >284 <input type="text" name="custsearch" value="<?php echo esc_attr($search); ?>" placeholder="Search by name, email, phone, or address" aria-label="Search customers by name, email, phone, or address"> 286 285 <button type="submit" class="paintops-btn paintops-btn-secondary">Search</button> 287 286 <?php if ($search !== '') : ?> … … 299 298 </thead> 300 299 <tbody> 301 <?php302 // Country-driven State/Zip labels, same source as the full303 // Edit Customer form below.304 $custAddrFmt = function_exists('paintops_address_format') ? paintops_address_format() : ['state_label' => 'State', 'state_maxlength' => 2, 'state_uppercase' => true, 'zip_label' => 'Zip'];305 $custStateMaxlength = ((int) $custAddrFmt['state_maxlength'] > 0) ? ' maxlength="' . (int) $custAddrFmt['state_maxlength'] . '"' : '';306 $custStateUppercase = !empty($custAddrFmt['state_uppercase']) ? ' style="text-transform:uppercase;"' : '';307 ?>308 300 <?php foreach ($customers as $customer) : 309 301 $name = trim($customer->first_name . ' ' . $customer->last_name); … … 317 309 <div class="po-cust-addr"> 318 310 <span class="po-cust-addr-line"><?php echo wp_kses($address !== '' ? esc_html($address) : '<span style="color:var(--po-text-muted,#999);">No address on file</span>', paintops_kses_allowed_html(), paintops_kses_protocols()); ?></span> 319 <button type="button" class="po-cust-addr-edit" title="Edit primary address" aria-label="Edit primary address"><span class="dashicons dashicons-edit" aria-hidden="true"></span></button> 320 <form method="post" class="po-cust-addr-form"> 321 <?php wp_nonce_field('paintops_save_customer_address_action'); ?> 322 <input type="hidden" name="paintops_save_customer_address" value="1"> 323 <input type="hidden" name="customer_id" value="<?php echo (int) $customer->id; ?>"> 324 <input type="text" class="po-ca-street" name="service_address" placeholder="Street" autocapitalize="words" value="<?php echo esc_attr($customer->service_address ?? ''); ?>"> 325 <input type="text" class="po-ca-city" name="service_city" placeholder="City" autocapitalize="words" value="<?php echo esc_attr($customer->service_city ?? ''); ?>"> 326 <input type="text" class="po-ca-state" name="service_state" placeholder="<?php echo esc_attr($custAddrFmt['state_label']); ?>" autocapitalize="characters"<?php echo wp_kses($custStateMaxlength, paintops_kses_allowed_html(), paintops_kses_protocols()); ?> value="<?php echo esc_attr($customer->service_state ?? ''); ?>"<?php echo wp_kses($custStateUppercase, paintops_kses_allowed_html(), paintops_kses_protocols()); ?>> 327 <input type="text" class="po-ca-zip" name="service_zip" inputmode="numeric" placeholder="<?php echo esc_attr($custAddrFmt['zip_label']); ?>" value="<?php echo esc_attr($customer->service_zip ?? ''); ?>"> 328 <button type="submit" class="paintops-btn paintops-btn-primary">Save</button> 329 <button type="button" class="paintops-btn paintops-btn-secondary po-cust-addr-cancel">Cancel</button> 330 </form> 311 <a class="po-cust-addr-edit" href="<?php echo esc_url(paintops_admin_url(['customers' => 1, 'viewCustomer' => (int) $customer->id, 'editCustomer' => 1])); ?>" title="Edit this customer" aria-label="Edit <?php echo esc_attr($name !== '' ? $name : 'customer #' . (int) $customer->id); ?>"><span class="dashicons dashicons-edit" aria-hidden="true"></span></a> 331 312 </div> 332 313 </td> … … 336 317 </tbody> 337 318 </table> 338 <?php paintops_enqueue_script('customers-address-edit'); ?>339 319 <?php endif; ?> 340 320 <?php … … 350 330 ob_start(); 351 331 ?> 352 <h2 class="po-screen-title"><?php echo esc_attr($id ? 'Edit Customer' : 'New Customer'); ?></h2> 332 <?php $po_ct = paintops_screen_title_tag(); ?> 333 <<?php echo esc_attr($po_ct); ?> class="po-screen-title"><?php echo esc_html($id ? 'Edit Customer' : 'New Customer'); ?></<?php echo esc_attr($po_ct); ?>> 353 334 354 335 <?php if (function_exists('paintops_maps_api_key') && paintops_maps_api_key() !== '') : … … 371 352 <div class="job-form"> 372 353 <form method="post"> 373 <?php wp_nonce_field('paintops_save_customer_action'); ?>354 <?php paintops_nonce_field('paintops_save_customer_action'); ?> 374 355 <input type="hidden" name="customer_id" value="<?php echo esc_attr((string) $id); ?>"> 375 356 … … 455 436 456 437 <div class="paintops-customer-card"> 457 <h2 class="po-screen-title" style="margin-top:0;"><?php echo esc_html($name !== '' ? $name : 'Customer #' . $customer->id); ?></h2> 438 <?php $po_cvt = paintops_screen_title_tag(); ?> 439 <<?php echo esc_attr($po_cvt); ?> class="po-screen-title" style="margin-top:0;"><?php echo esc_html($name !== '' ? $name : 'Customer #' . $customer->id); ?></<?php echo esc_attr($po_cvt); ?>> 458 440 <?php if (!empty($customer->email)) : ?><p>Email: <?php echo esc_html($customer->email); ?></p><?php endif; ?> 459 441 <?php if (!empty($customer->phone)) : ?><p>Phone: <?php echo wp_kses(paintops_customer_phone_display($customer->phone), paintops_kses_allowed_html(), paintops_kses_protocols()); ?></p><?php endif; ?> … … 577 559 <p>Use this to remove a test entry, or to honor a customer data deletion request.</p> 578 560 <form method="post" onsubmit="return confirm('Permanently delete this customer and all linked jobs, quotes, photos, and records? This cannot be undone.');"> 579 <?php wp_nonce_field('paintops_delete_customer_action'); ?>561 <?php paintops_nonce_field('paintops_delete_customer_action'); ?> 580 562 <input type="hidden" name="customer_id" value="<?php echo esc_attr((string) $customer_id); ?>"> 581 563 <label><input type="checkbox" name="paintops_delete_customer_ack" value="1"> I understand this permanently deletes this customer and all attached records.</label> -
paintops/trunk/includes/dashboard-alerts.php
r3692081 r3694342 313 313 <?php if ($uj_can_manage) : ?> 314 314 <form method="post" style="margin:0;" onsubmit="return confirm('Mark this job as paid? <?php echo esc_js($uj_currency . number_format((float) $uj->po_balance, 2)); ?> will be logged as received today.');"> 315 <?php wp_nonce_field('paintops_mark_paid_' . (int) $uj->id, 'paintops_mark_paid_nonce'); ?>315 <?php paintops_nonce_field('paintops_mark_paid_' . (int) $uj->id, 'paintops_mark_paid_nonce'); ?> 316 316 <input type="hidden" name="job_id" value="<?php echo (int) $uj->id; ?>"> 317 317 <button type="submit" name="paintops_mark_job_paid" value="1" class="paintops-btn paintops-btn-secondary" style="padding:2px 10px;font-size:12px;">Mark as Paid</button> … … 391 391 <?php if (function_exists('paintops_user_can_manage') && paintops_user_can_manage()) : ?> 392 392 · <form method="post" style="display:inline;margin:0;" onsubmit="return confirm('Archive this quote as Not Won? It leaves this list and moves to the job board\'s Not Won column (reversible there).');"> 393 <?php wp_nonce_field('paintops_archive_quote_' . (int) $job->id, 'paintops_archive_quote_nonce'); ?>393 <?php paintops_nonce_field('paintops_archive_quote_' . (int) $job->id, 'paintops_archive_quote_nonce'); ?> 394 394 <input type="hidden" name="job_id" value="<?php echo (int) $job->id; ?>"> 395 395 <button type="submit" name="paintops_archive_quote" value="1" style="background:none;border:none;padding:0;margin:0;font:inherit;cursor:pointer;text-decoration:underline;color:var(--po-text-muted,#667581);" title="For a quote you know is dead: hides it here and marks it Not Won on the board.">Archive</button> -
paintops/trunk/includes/estimates.php
r3692081 r3694342 253 253 if (isset($_GET['editEid'])){ 254 254 $getEditId = intval ($_GET['editEid']); 255 $formAction = "<input type=\"hidden\" name=\"editestId\" value=\"$getEditId\">" . wp_nonce_field('paintops_save_estimate', 'paintops_estimate_nonce', true, false);255 $formAction = "<input type=\"hidden\" name=\"editestId\" value=\"$getEditId\">" . paintops_nonce_field('paintops_save_estimate', 'paintops_estimate_nonce', true, false); 256 256 $submitName = "Update Job"; 257 257 $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM %i WHERE estID = %d LIMIT 1", paintops_table('estimates'), $getEditId)); … … 270 270 } 271 271 else{ 272 $formAction = "<input type=\"hidden\" name=\"csaction\" value=\"addEstimate\">" . wp_nonce_field('paintops_save_estimate', 'paintops_estimate_nonce', true, false);272 $formAction = "<input type=\"hidden\" name=\"csaction\" value=\"addEstimate\">" . paintops_nonce_field('paintops_save_estimate', 'paintops_estimate_nonce', true, false); 273 273 $submitName = "Add Quote or Bid"; 274 274 } … … 786 786 <?php endif; ?> 787 787 788 <h2 class="po-screen-title" style="margin-top:0;"><?php echo wp_kses((isset($getEditId) && $getEditId) ? "Edit {$recordWord} #" . (int) $getEditId : "New {$recordWord}", paintops_kses_allowed_html(), paintops_kses_protocols()); ?></h2> 788 <?php $po_et = paintops_screen_title_tag(); ?> 789 <<?php echo esc_attr($po_et); ?> class="po-screen-title" style="margin-top:0;"><?php echo esc_html((isset($getEditId) && $getEditId) ? "Edit {$recordWord} #" . (int) $getEditId : "New {$recordWord}"); ?></<?php echo esc_attr($po_et); ?>> 789 790 790 791 <?php … … 1203 1204 1204 1205 if (!isset($_POST['send_email'])) { 1205 $send_email_nonce_field = wp_nonce_field('paintops_send_quote_email', 'paintops_send_quote_email_nonce', true, false);1206 $send_email_nonce_field = paintops_nonce_field('paintops_send_quote_email', 'paintops_send_quote_email_nonce', true, false); 1206 1207 $company = paintops_company_profile(); 1207 1208 $companyWebsiteHost = preg_replace('#^https?://#', '', rtrim($company['website'], '/')); … … 1676 1677 <a href="<?php echo paintops_href(['viewEid' => (int) $d_jobID]); ?>" class="paintops-back-link"><span class="dashicons dashicons-arrow-left-alt2" aria-hidden="true"></span>View <?php echo esc_html($d_recordLabel); ?></a> 1677 1678 <?php endif; ?> 1678 <div class="paintops-quote-toolbar" style="max-width:700px;margin:24px auto 0;"> 1679 <?php 1680 // 2026-09-13 audit, B3/B4: this screen had no standardized title 1681 // and no top-level heading. It sits ABOVE #printableArea, and the 1682 // print rules in estimates-quote-view.css hide everything outside 1683 // that container, so it never prints. 1684 // It is deliberately OUTSIDE .paintops-quote-toolbar (which is a 1685 // centered 700px column matching the paper below it) so the page 1686 // title lines up with every other screen's title instead of 1687 // floating in the middle of the page. 1688 echo wp_kses(paintops_screen_title($d_docWord . ' #' . (int) $viewID), paintops_kses_allowed_html(), paintops_kses_protocols()); 1689 ?> 1690 <div class="paintops-quote-toolbar" style="max-width:700px;margin:0 auto;"> 1679 1691 <?php if ($statusBadgesHtml !== '') : ?> 1680 1692 <div style="display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px;"><?php echo wp_kses($statusBadgesHtml, paintops_kses_allowed_html(), paintops_kses_protocols()); ?></div> … … 1714 1726 <?php if (count($moreItems) > 1) : ?> 1715 1727 <?php paintops_enqueue_script('po-toggles'); ?> 1716 < a href="#" class="pv-more-toggle" data-po-toggle="<?php echo esc_attr($quoteMoreId); ?>" data-open-label="Hide More Actions" data-closed-label="More Actions"><span class="dashicons dashicons-admin-generic" aria-hidden="true"></span><span class="po-toggle-label">More Actions</span> <span class="pv-more-chevron">▾</span></a>1728 <button type="button" class="pv-more-toggle" data-po-toggle="<?php echo esc_attr($quoteMoreId); ?>" data-open-label="Hide More Actions" data-closed-label="More Actions" aria-expanded="false" aria-controls="<?php echo esc_attr($quoteMoreId); ?>"><span class="dashicons dashicons-admin-generic" aria-hidden="true"></span><span class="po-toggle-label">More Actions</span> <span class="pv-more-chevron">▾</span></button> 1717 1729 <?php else : ?> 1718 1730 <?php // Only one action left (Replace Quote): no dropdown, show … … 1741 1753 <div class="po-quote-header" style="display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #333; margin-bottom: 20px;"> 1742 1754 <!-- Logo + Company Info --> 1743 <div><a href="<?php echo esc_url($company['website']); ?>"><img style="max-width: 150px;" src="<?php echo esc_url($company['logo']); ?>" alt="<?php echo esc_attr($company['name']); ?>" style="float: left;"></a> 1755 <div> 1756 <?php 1757 // Guard the logo the same way the other six company-logo outputs 1758 // do (job-invoices, job-financials-addon, customer-payments x2, 1759 // pro-expense-reports x2). Without a logo set in Company Profile 1760 // this used to emit <a href=""><img src="">, and an empty src makes 1761 // the browser re-request the current page and can print a broken 1762 // image box on the sheet the customer signs. This view is also the 1763 // Print / PDF source, so it is the one that matters most. 1764 // The tag also used to carry TWO style attributes; browsers honor 1765 // the first and ignore the second, so the float:left never applied. 1766 // It is dropped rather than merged, to keep this sheet rendering 1767 // exactly as it does today. 1768 if (!empty($company['logo'])) : 1769 $po_logo_img = '<img style="max-width: 150px;" src="' . esc_url((string) $company['logo']) . '" alt="' . esc_attr((string) $company['name']) . '">'; 1770 if (!empty($company['website'])) { 1771 echo wp_kses('<a href="' . esc_url((string) $company['website']) . '">' . $po_logo_img . '</a>', paintops_kses_allowed_html(), paintops_kses_protocols()); 1772 } else { 1773 echo wp_kses($po_logo_img, paintops_kses_allowed_html(), paintops_kses_protocols()); 1774 } 1775 ?> 1744 1776 <br> 1777 <?php endif; ?> 1745 1778 <strong><?php echo esc_html($company['name']); ?></strong><br> 1746 1779 <?php echo esc_html($company['address1']); ?><br> -
paintops/trunk/includes/file-receipt.php
r3692081 r3694342 62 62 <?php else : ?> 63 63 <p style="margin:0 0 8px;"> 64 <input type="text" id="frJobSearch" placeholder="Search jobs by customer or title..." style="width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid var(--po-line,#e3e6ea);border-radius:8px;">64 <input type="text" id="frJobSearch" placeholder="Search jobs by customer or title..." aria-label="Search jobs by customer or title" style="width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid var(--po-line,#e3e6ea);border-radius:8px;"> 65 65 </p> 66 66 <div id="frJobList" style="border:1px solid var(--po-line,#e3e6ea);border-radius:10px;overflow:hidden;max-height:360px;overflow-y:auto;"> -
paintops/trunk/includes/job-checkin.php
r3692081 r3694342 358 358 </p> 359 359 <form method="post" style="margin:10px 0 0;" data-paintops-timeclock="<?php echo esc_attr((string) $job_id); ?>"> 360 <?php wp_nonce_field('paintops_job_checkin_' . $job_id, 'paintops_job_checkin_nonce'); ?>360 <?php paintops_nonce_field('paintops_job_checkin_' . $job_id, 'paintops_job_checkin_nonce'); ?> 361 361 <button type="submit" name="paintops_job_checkout" value="1" class="paintops-btn paintops-btn-primary" style="min-width:200px;">Check Out</button> 362 362 </form> … … 364 364 <p style="color:#777;font-size:13px;margin:6px 0;">Tap Check In when you arrive and Check Out when you leave, your hours are logged to this job automatically.</p> 365 365 <form method="post" style="margin:10px 0 0;" data-paintops-timeclock="<?php echo esc_attr((string) $job_id); ?>"> 366 <?php wp_nonce_field('paintops_job_checkin_' . $job_id, 'paintops_job_checkin_nonce'); ?>366 <?php paintops_nonce_field('paintops_job_checkin_' . $job_id, 'paintops_job_checkin_nonce'); ?> 367 367 <button type="submit" name="paintops_job_checkin" value="1" class="paintops-btn paintops-btn-primary" style="min-width:200px;">Check In</button> 368 368 </form> -
paintops/trunk/includes/job-financials-addon.php
r3692081 r3694342 730 730 <div class="po-expense-grid"> 731 731 <p> 732 <label ><strong>Vendor</strong></label><br>732 <label for="workerVendorSelect"><strong>Vendor</strong></label><br> 733 733 <select name="worker_expense_vendor" id="workerVendorSelect" class="cs-vendor-select"> 734 734 <option value="">Select vendor</option> … … 750 750 ?>>+ New Vendor</option> 751 751 </select> 752 <input type="text" name="worker_expense_vendor_other" id="workerVendorOther" placeholder="New vendor name" value="<?php752 <input type="text" name="worker_expense_vendor_other" id="workerVendorOther" placeholder="New vendor name" aria-label="New vendor name" value="<?php 753 753 echo esc_attr( $sticky_vendor_other ); 754 754 ?>" style="display:<?php … … 760 760 </p> 761 761 <p> 762 <label ><strong>Category</strong></label><br>762 <label for="workerCategorySelect"><strong>Category</strong></label><br> 763 763 <select name="worker_expense_category" id="workerCategorySelect"> 764 764 <?php … … 778 778 </p> 779 779 <p> 780 <label ><strong>Amount</strong></label><br>780 <label for="workerAmountInput"><strong>Amount</strong></label><br> 781 781 <input type="text" name="worker_expense_amount" id="workerAmountInput" inputmode="decimal" placeholder="0.00" value="<?php 782 782 echo esc_attr( $sticky_amount ); … … 784 784 </p> 785 785 <p> 786 <label ><strong>Date of Receipt</strong></label><br>786 <label for="workerDateInput"><strong>Date of Receipt</strong></label><br> 787 787 <input type="date" name="worker_expense_date" id="workerDateInput" value="<?php 788 788 echo esc_attr( ( $sticky_date !== '' ? $sticky_date : current_time( 'Y-m-d' ) ) ); -
paintops/trunk/includes/job-invoices.php
r3692081 r3694342 117 117 <form method="post" style="margin:0;" onsubmit="return confirm('Email this invoice to the customer now? It sends immediately, using the standard invoice email with their secure pay link.');"> 118 118 <?php 119 wp_nonce_field( 'paintops_invoice_action_' . (int) $invoice->id, 'paintops_invoice_action_nonce' );119 paintops_nonce_field( 'paintops_invoice_action_' . (int) $invoice->id, 'paintops_invoice_action_nonce' ); 120 120 ?> 121 121 <button type="submit" name="paintops_send_invoice" value="1" class="paintops-btn paintops-btn-secondary">Email to customer</button> … … 126 126 <form method="post" style="margin:0;" onsubmit="return confirm('Mark this invoice paid and log a Check / Cash payment for the full amount?');"> 127 127 <?php 128 wp_nonce_field( 'paintops_invoice_action_' . (int) $invoice->id, 'paintops_invoice_action_nonce' );128 paintops_nonce_field( 'paintops_invoice_action_' . (int) $invoice->id, 'paintops_invoice_action_nonce' ); 129 129 ?> 130 130 <button type="submit" name="paintops_mark_invoice_paid_manual" value="1" class="paintops-btn paintops-btn-secondary">Mark as Paid (check / cash)</button> … … 136 136 if ( $pub_url !== '' || $reminder_ai_ok ) { 137 137 ?> 138 < a href="#" class="pv-more-toggle" data-po-toggle="<?php138 <button type="button" class="pv-more-toggle" data-po-toggle="<?php 139 139 echo esc_attr( $inv_more_id ); 140 ?>" data-open-label="Hide More Actions" data-closed-label="More Actions"><span class="dashicons dashicons-admin-generic" aria-hidden="true"></span><span class="po-toggle-label">More Actions</span> <span class="pv-more-chevron">▾</span></a> 140 ?>" data-open-label="Hide More Actions" data-closed-label="More Actions" aria-expanded="false" aria-controls="<?php 141 echo esc_attr( $inv_more_id ); 142 ?>"><span class="dashicons dashicons-admin-generic" aria-hidden="true"></span><span class="po-toggle-label">More Actions</span> <span class="pv-more-chevron">▾</span></button> 141 143 <?php 142 144 } -
paintops/trunk/includes/job-photos.php
r3692081 r3694342 280 280 ?> 281 281 <span class="paintops-photo-picker" style="<?php echo esc_attr($wrapper_style); ?>"> 282 <input type="file"<?php echo wp_kses($id_attr . $name_attr, paintops_kses_allowed_html(), paintops_kses_protocols()); ?> class="paintops-photo-input pp-real-input" accept="<?php echo esc_attr($accept_attr); ?>" style="display:none;"<?php echo wp_kses($required_attr . $autosubmit_attr, paintops_kses_allowed_html(), paintops_kses_protocols()); ?>>283 <input type="file" class="pp-camera-input" accept="image/*" capture="environment" style="display:none;">284 <input type="file" class="pp-library-input" accept="<?php echo esc_attr($accept_attr); ?>" style="display:none;">282 <input type="file"<?php echo wp_kses($id_attr . $name_attr, paintops_kses_allowed_html(), paintops_kses_protocols()); ?> class="paintops-photo-input pp-real-input" accept="<?php echo esc_attr($accept_attr); ?>" aria-label="<?php echo esc_attr($allow_pdf ? 'Selected photo or PDF' : 'Selected photo'); ?>" style="display:none;"<?php echo wp_kses($required_attr . $autosubmit_attr, paintops_kses_allowed_html(), paintops_kses_protocols()); ?>> 283 <input type="file" class="pp-camera-input" accept="image/*" capture="environment" aria-label="Take a photo" style="display:none;"> 284 <input type="file" class="pp-library-input" accept="<?php echo esc_attr($accept_attr); ?>" aria-label="<?php echo esc_attr($allow_pdf ? 'Choose a photo or PDF' : 'Choose a photo'); ?>" style="display:none;"> 285 285 <button type="button" class="paintops-btn paintops-btn-secondary pp-camera-btn">Take Photo</button> 286 286 <button type="button" class="paintops-btn paintops-btn-secondary pp-library-btn"><?php echo esc_attr($allow_pdf ? 'Choose Photo/PDF' : 'Choose Photo'); ?></button> … … 360 360 <div style="width:100%;max-width:400px;padding:12px;color:#fff;text-align:center;"> 361 361 <label style="font-size:12px;display:block;margin-bottom:4px;">Ghost opacity</label> 362 <input type="range" class="pp-after-opacity" min="0" max="100" value="40" style="width:100%;">362 <input type="range" class="pp-after-opacity" min="0" max="100" value="40" aria-label="After photo opacity" style="width:100%;"> 363 363 </div> 364 364 … … 374 374 375 375 <form method="post" enctype="multipart/form-data" class="pp-after-form" style="text-align:center;"> 376 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>376 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 377 377 <input type="hidden" name="paintops_upload_after_photo" class="pp-after-before-id" value=""> 378 <input type="file" name="job_after_photo_file" class="pp-after-fallback-input" accept="image/*" capture="environment" style="display:none;">378 <input type="file" name="job_after_photo_file" class="pp-after-fallback-input" accept="image/*" capture="environment" aria-label="After photo" style="display:none;"> 379 379 </form> 380 380 </div> … … 427 427 </div> 428 428 429 <input type="range" class="pp-compare-slider" min="0" max="100" value="50" style="width:100%;margin-top:14px;">429 <input type="range" class="pp-compare-slider" min="0" max="100" value="50" aria-label="Before and after comparison position" style="width:100%;margin-top:14px;"> 430 430 <div style="display:flex;justify-content:space-between;color:#fff;font-size:12px;margin-top:2px;"> 431 431 <span>Before</span><span>After</span> … … 641 641 <?php endif; ?> 642 642 <form method="post" enctype="multipart/form-data" class="pv-note-composer"> 643 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>644 <textarea name="job_note_text" rows="3" placeholder="What happened on the job? (e.g. "Second coat done on the north wall. Customer wants the trim a shade darker.")"></textarea>643 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 644 <textarea name="job_note_text" rows="3" aria-label="Job note" placeholder="What happened on the job? (e.g. "Second coat done on the north wall. Customer wants the trim a shade darker.")"></textarea> 645 645 <?php if (!$at_photo_limit): ?> 646 646 <div style="margin-top:10px;"> … … 675 675 <?php if ($canEdit): ?> 676 676 <form method="post" style="margin:0 0 4px;"> 677 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>677 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 678 678 <textarea name="job_photo_notes_edit" rows="2" style="width:100%;box-sizing:border-box;font-size:14px;resize:vertical;" placeholder="Add a note..."><?php echo esc_textarea((string) ($item['notes'] ?? '')); ?></textarea> 679 679 <button type="submit" name="paintops_save_job_photo_notes" value="<?php echo esc_attr((string) $item['id']); ?>" class="button button-small" style="margin-top:3px;">Save note</button> … … 691 691 <div class="pv-note-actions" style="margin-top:6px;"> 692 692 <form method="post" onsubmit="return confirm('Delete this entry?');"> 693 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>693 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 694 694 <button type="submit" name="paintops_delete_job_photo" value="<?php echo esc_attr((string) $item['id']); ?>" class="button button-small" style="color:#b32d2e;">Delete</button> 695 695 </form> … … 1637 1637 <?php if ($canEditThis): ?> 1638 1638 <form method="post" enctype="multipart/form-data" style="margin-top:6px;"> 1639 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>1639 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 1640 1640 <textarea name="job_photo_notes_edit" placeholder="Add a note..." rows="2" style="width:100%;font-size:12px;box-sizing:border-box;resize:vertical;"><?php echo esc_textarea($photo['notes'] ?? ''); ?></textarea> 1641 1641 <button type="submit" name="paintops_save_job_photo_notes" value="<?php echo esc_attr((string) $photo['id']); ?>" class="button button-small" style="width:100%;margin-top:2px;">Save Note</button> … … 1647 1647 <?php if ($canEditThis): ?> 1648 1648 <form method="post" enctype="multipart/form-data" onsubmit="return confirm('Delete this photo?');" style="margin-top:4px;"> 1649 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>1649 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 1650 1650 <button type="submit" name="paintops_delete_job_photo" value="<?php echo esc_attr((string) $photo['id']); ?>" class="button button-small" style="width:100%;">Delete</button> 1651 1651 </form> … … 1660 1660 <?php else: ?> 1661 1661 <form method="post" enctype="multipart/form-data"> 1662 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>1662 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 1663 1663 <?php paintops_render_photo_picker_input('job_photo_file', '', false, false, true); ?> 1664 1664 <div style="margin-top:8px;"> … … 1727 1727 <?php if ($canUnpair): ?> 1728 1728 <form method="post" enctype="multipart/form-data" style="margin-top:4px;"> 1729 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>1729 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 1730 1730 <button type="submit" name="paintops_unpair_job_photo" value="<?php echo esc_attr((string) $before['id']); ?>" class="button button-small" style="width:100%;">Unpair</button> 1731 1731 </form> … … 1776 1776 ?> 1777 1777 <form method="post" enctype="multipart/form-data"> 1778 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>1778 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 1779 1779 <?php paintops_render_photo_picker_input('job_before_photo_file', '', false, false, true); ?> 1780 1780 <div style="margin-top:8px;"> 1781 <textarea name="job_before_photo_notes" placeholder="Optional note" rows="2" style="width:100%;font-size:13px;box-sizing:border-box;resize:vertical;"></textarea>1781 <textarea name="job_before_photo_notes" placeholder="Optional note" aria-label="Note for this before photo" rows="2" style="width:100%;font-size:13px;box-sizing:border-box;resize:vertical;"></textarea> 1782 1782 </div> 1783 1783 <button type="submit" name="paintops_upload_before_photo" value="1" class="paintops-btn paintops-btn-primary" style="margin-top:8px;">Upload Before Photo</button> … … 1801 1801 <form method="post" enctype="multipart/form-data" style="max-width:340px;" id="paintops-pair-existing-form"> 1802 1802 <p style="font-weight:600;font-size:13px;margin-bottom:6px;">Pair Two Existing Photos</p> 1803 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>1803 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 1804 1804 <?php 1805 1805 // Both dropdowns used to render the same list with no … … 1821 1821 }; 1822 1822 ?> 1823 <label style="font-size:12px;display:block;margin-bottom:2px;">Before</label>1824 <select name="pair_before_photo_id" style="width:100%;margin-bottom:8px;">1823 <label for="pair_before_photo_id" style="font-size:12px;display:block;margin-bottom:2px;">Before</label> 1824 <select name="pair_before_photo_id" id="pair_before_photo_id" style="width:100%;margin-bottom:8px;"> 1825 1825 <option value="">-- Choose the Before photo --</option> 1826 1826 <?php foreach ($unpairedAll as $photo): ?> … … 1828 1828 <?php endforeach; ?> 1829 1829 </select> 1830 <label style="font-size:12px;display:block;margin-bottom:2px;">After</label>1831 <select name="pair_after_photo_id" style="width:100%;margin-bottom:8px;">1830 <label for="pair_after_photo_id" style="font-size:12px;display:block;margin-bottom:2px;">After</label> 1831 <select name="pair_after_photo_id" id="pair_after_photo_id" style="width:100%;margin-bottom:8px;"> 1832 1832 <option value="">-- Choose the After photo --</option> 1833 1833 <?php foreach ($unpairedAll as $photo): ?> … … 2095 2095 <?php if (paintops_can_current_user_delete_upload((int) $receipts[0]['uploaded_by'])): ?> 2096 2096 <form method="post" enctype="multipart/form-data" onsubmit="return confirm('Delete this receipt?');" style="margin:0;"> 2097 <?php wp_nonce_field('paintops_job_receipts_' . $job_id, 'paintops_job_receipts_nonce'); ?>2097 <?php paintops_nonce_field('paintops_job_receipts_' . $job_id, 'paintops_job_receipts_nonce'); ?> 2098 2098 <button type="submit" name="paintops_delete_job_receipt" value="<?php echo esc_attr((string) $receipts[0]['id']); ?>" class="button button-small">Delete</button> 2099 2099 </form> … … 2102 2102 <?php elseif (function_exists('paintops_user_can_add_job_receipt') && paintops_user_can_add_job_receipt($job_id)): ?> 2103 2103 <form method="post" enctype="multipart/form-data" style="display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;"> 2104 <?php wp_nonce_field('paintops_job_receipts_' . $job_id, 'paintops_job_receipts_nonce'); ?>2104 <?php paintops_nonce_field('paintops_job_receipts_' . $job_id, 'paintops_job_receipts_nonce'); ?> 2105 2105 <input type="hidden" name="job_receipt_expense_id" value="<?php echo esc_attr((string) $expense_id); ?>"> 2106 2106 <?php paintops_render_photo_picker_input('job_receipt_file', '', false, false, false, true); ?> … … 2119 2119 // 2026-07-23: duplicates were stuck). ?> 2120 2120 <form method="post" onsubmit="return confirm('Remove this expense record (and its receipt image, if any)? This cannot be undone.');" style="margin:6px 0 0;"> 2121 <?php wp_nonce_field('paintops_job_receipts_' . $job_id, 'paintops_job_receipts_nonce'); ?>2121 <?php paintops_nonce_field('paintops_job_receipts_' . $job_id, 'paintops_job_receipts_nonce'); ?> 2122 2122 <button type="submit" name="paintops_delete_job_expense" value="<?php echo esc_attr((string) $expense_id); ?>" class="button button-small" style="color:#b32d2e;">Remove Expense</button> 2123 2123 </form> … … 2134 2134 <td colspan="<?php echo esc_attr($show_costs ? '5' : '3'); ?>" style="background:#fbfbf7;"> 2135 2135 <form method="post" action="<?php echo esc_url(remove_query_arg('editJobExp')); ?>" style="margin:0;"> 2136 <?php wp_nonce_field('paintops_job_receipts_' . $job_id, 'paintops_job_receipts_nonce'); ?>2136 <?php paintops_nonce_field('paintops_job_receipts_' . $job_id, 'paintops_job_receipts_nonce'); ?> 2137 2137 <div class="po-expense-grid"> 2138 2138 <p style="margin:0;"> 2139 <label ><strong>Date</strong></label><br>2140 <input type="date" name="je_date" value="<?php echo esc_attr(!empty($expense['expense_date']) ? date('Y-m-d', strtotime((string) $expense['expense_date'])) : current_time('Y-m-d')); ?>">2139 <label for="<?php echo esc_attr('je_date_' . $expense_id); ?>"><strong>Date</strong></label><br> 2140 <input type="date" name="je_date" id="<?php echo esc_attr('je_date_' . $expense_id); ?>" value="<?php echo esc_attr(!empty($expense['expense_date']) ? date('Y-m-d', strtotime((string) $expense['expense_date'])) : current_time('Y-m-d')); ?>"> 2141 2141 </p> 2142 2142 <p style="margin:0;"> 2143 <label ><strong>Vendor</strong></label><br>2144 <input type="text" name="je_vendor" value="<?php echo esc_attr((string) ($expense['vendor'] ?? '')); ?>">2143 <label for="<?php echo esc_attr('je_vendor_' . $expense_id); ?>"><strong>Vendor</strong></label><br> 2144 <input type="text" name="je_vendor" id="<?php echo esc_attr('je_vendor_' . $expense_id); ?>" value="<?php echo esc_attr((string) ($expense['vendor'] ?? '')); ?>"> 2145 2145 </p> 2146 2146 <p style="margin:0;"> 2147 <label ><strong>Category</strong></label><br>2148 <select name="je_category" >2147 <label for="<?php echo esc_attr('je_category_' . $expense_id); ?>"><strong>Category</strong></label><br> 2148 <select name="je_category" id="<?php echo esc_attr('je_category_' . $expense_id); ?>"> 2149 2149 <?php foreach ($je_edit_cats as $jc): ?> 2150 2150 <option value="<?php echo esc_attr($jc); ?>"<?php selected((string) ($expense['category'] ?? ''), $jc); ?>><?php echo esc_html($jc); ?></option> … … 2153 2153 </p> 2154 2154 <p style="margin:0;"> 2155 <label ><strong>Amount</strong></label><br>2156 <input type="text" name="je_amount" i nputmode="decimal" value="<?php echo esc_attr(number_format((float) ($expense['amount'] ?? 0), 2, '.', '')); ?>">2155 <label for="<?php echo esc_attr('je_amount_' . $expense_id); ?>"><strong>Amount</strong></label><br> 2156 <input type="text" name="je_amount" id="<?php echo esc_attr('je_amount_' . $expense_id); ?>" inputmode="decimal" value="<?php echo esc_attr(number_format((float) ($expense['amount'] ?? 0), 2, '.', '')); ?>"> 2157 2157 </p> 2158 2158 </div> … … 2247 2247 <?php if ($can_manage && $delete_action !== '' && paintops_can_current_user_delete_upload((int) $photo['uploaded_by'])) : ?> 2248 2248 <form method="post" action="<?php echo esc_url($delete_action); ?>" onsubmit="return confirm('Delete this photo?');" style="margin-top:4px;"> 2249 <?php wp_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?>2249 <?php paintops_nonce_field('paintops_job_photos_' . $job_id, 'paintops_job_photos_nonce'); ?> 2250 2250 <button type="submit" name="paintops_delete_job_photo" value="<?php echo esc_attr((string) $photo['id']); ?>" class="button button-small" style="width:100%;">Delete</button> 2251 2251 </form> -
paintops/trunk/includes/job-pipeline.php
r3692081 r3694342 290 290 <?php foreach (paintops_pipeline_move_targets($current_stage) as $target => $label) : ?> 291 291 <form method="post" style="display:inline;"> 292 <?php wp_nonce_field('paintops_pipeline_move_action', 'paintops_pipeline_nonce'); ?>292 <?php paintops_nonce_field('paintops_pipeline_move_action', 'paintops_pipeline_nonce'); ?> 293 293 <input type="hidden" name="job_id" value="<?php echo esc_attr((string) $row->id); ?>"> 294 294 <input type="hidden" name="target_stage" value="<?php echo esc_attr($target); ?>"> … … 437 437 <form method="get" class="paintops-jobsearch-box"> 438 438 <input type="hidden" name="jobSearch" value="1"> 439 <input type="text" name="q" placeholder="Search jobs by name, email, phone, address, or job #" >439 <input type="text" name="q" placeholder="Search jobs by name, email, phone, address, or job #" aria-label="Search jobs by name, email, phone, address, or job number"> 440 440 <button type="submit" class="paintops-btn paintops-btn-primary">Search</button> 441 441 </form> … … 657 657 <span style="display:inline-flex;gap:8px;"> 658 658 <form method="post" style="margin:0;"> 659 <?php wp_nonce_field('paintops_pipeline_move_action', 'paintops_pipeline_nonce'); ?>659 <?php paintops_nonce_field('paintops_pipeline_move_action', 'paintops_pipeline_nonce'); ?> 660 660 <input type="hidden" name="job_id" value="<?php echo (int) $nw->id; ?>"> 661 661 <input type="hidden" name="target_stage" value="quote"> … … 669 669 // Request Performance counts it. ?> 670 670 <form method="post" style="margin:0;"> 671 <?php wp_nonce_field('paintops_pipeline_move_action', 'paintops_pipeline_nonce'); ?>671 <?php paintops_nonce_field('paintops_pipeline_move_action', 'paintops_pipeline_nonce'); ?> 672 672 <input type="hidden" name="job_id" value="<?php echo (int) $nw->id; ?>"> 673 673 <input type="hidden" name="target_stage" value="active"> -
paintops/trunk/includes/job-rows.php
r3693322 r3694342 32 32 $label = $to === 'board' ? 'Switch to Board view' : 'Switch to Row view'; 33 33 $out = '<form method="post" style="display:inline;margin:0;">'; 34 $out .= wp_nonce_field('paintops_jobs_view_action', 'paintops_jobs_view_nonce', true, false);34 $out .= paintops_nonce_field('paintops_jobs_view_action', 'paintops_jobs_view_nonce', true, false); 35 35 $out .= '<input type="hidden" name="paintops_jobs_view_to" value="' . esc_attr($to) . '">'; 36 36 $out .= '<button type="submit" name="paintops_jobs_view_toggle" value="1" style="background:none;border:none;padding:0;margin:0;font-family:inherit;font-size:inherit;cursor:pointer;">' . esc_html($label) . '</button>'; … … 169 169 } 170 170 171 $toggle = '< a href="#" class="pv-more-toggle po-jrow-actions-toggle" data-po-toggle="' . esc_attr($dom) . '" data-open-label="Close" data-closed-label="Actions"><span class="po-toggle-label">Actions</span> <span class="pv-more-chevron">▾</span></a>';171 $toggle = '<button type="button" class="pv-more-toggle po-jrow-actions-toggle" data-po-toggle="' . esc_attr($dom) . '" data-open-label="Close" data-closed-label="Actions" aria-expanded="false" aria-haspopup="true" aria-controls="' . esc_attr($dom) . '"><span class="po-toggle-label">Actions</span> <span class="pv-more-chevron">▾</span></button>'; 172 172 173 173 // .po-menu-overlay marks this as a FLOATING menu for po-toggles.js: … … 179 179 foreach ($moves as $target => $label) { 180 180 $panel .= '<form method="post" class="po-jrow-move-form">' 181 . wp_nonce_field('paintops_pipeline_move_action', 'paintops_pipeline_nonce', true, false)181 . paintops_nonce_field('paintops_pipeline_move_action', 'paintops_pipeline_nonce', true, false) 182 182 . '<input type="hidden" name="job_id" value="' . (int) $job_id . '">' 183 183 . '<input type="hidden" name="target_stage" value="' . esc_attr($target) . '">' -
paintops/trunk/includes/job-view.php
r3693322 r3694342 171 171 ?> 172 172 <span class="pv-dir-wrap"> 173 <a class="pv-dir-main" href="<?php echo esc_url($item['url']); ?>" target="_blank" rel="noopener noreferrer"><?php echo wp_kses(paintops_action_icon('directions'), paintops_kses_allowed_html(), paintops_kses_protocols()); ?>Directions</a>< a href="#" class="pv-dir-gear" title="Choose maps app" aria-label="Choose maps app" onclick="paintopsDirToggle('<?php echo esc_js($dom); ?>');return false;"><span class="dashicons dashicons-admin-generic" aria-hidden="true"></span></a>173 <a class="pv-dir-main" href="<?php echo esc_url($item['url']); ?>" target="_blank" rel="noopener noreferrer"><?php echo wp_kses(paintops_action_icon('directions'), paintops_kses_allowed_html(), paintops_kses_protocols()); ?>Directions</a><button type="button" class="pv-dir-gear" title="Choose maps app" aria-label="Choose maps app" aria-haspopup="true" aria-expanded="false" onclick="paintopsDirToggle('<?php echo esc_js($dom); ?>');return false;"><span class="dashicons dashicons-admin-generic" aria-hidden="true"></span></button> 174 174 <span id="<?php echo esc_attr($dom); ?>" class="pv-dir-menu"> 175 175 <?php foreach ($menu as $m): … … 434 434 ?> 435 435 <?php paintops_enqueue_script('po-toggles'); ?> 436 < a href="#" class="pv-more-toggle<?php echo $active_inside ? ' po-act-active' : ''; ?>" data-po-toggle="<?php echo esc_attr($dom_id); ?>" data-open-label="<?php echo esc_attr('Hide ' . $menu_label); ?>" data-closed-label="<?php echo esc_attr($menu_label); ?>"><?php echo wp_kses(paintops_action_icon('more'), paintops_kses_allowed_html(), paintops_kses_protocols()); ?><span class="po-toggle-label"><?php echo esc_html($menu_label); ?></span> <span class="pv-more-chevron">▾</span></a>436 <button type="button" class="pv-more-toggle<?php echo $active_inside ? ' po-act-active' : ''; ?>" data-po-toggle="<?php echo esc_attr($dom_id); ?>" data-open-label="<?php echo esc_attr('Hide ' . $menu_label); ?>" data-closed-label="<?php echo esc_attr($menu_label); ?>" aria-expanded="false" aria-controls="<?php echo esc_attr($dom_id); ?>"><?php echo wp_kses(paintops_action_icon('more'), paintops_kses_allowed_html(), paintops_kses_protocols()); ?><span class="po-toggle-label"><?php echo esc_html($menu_label); ?></span> <span class="pv-more-chevron">▾</span></button> 437 437 <?php 438 438 $toggle = ob_get_clean(); … … 686 686 $pvTitle = $pvCompleteIsOn ? 'Click to mark as not complete' : 'Click to mark complete'; 687 687 $isCompleted = '<form method="post" action="' . esc_url(paintops_admin_url(['viewEid' => (int) $row->id])) . '" style="display:inline;margin:0;" onsubmit="return confirm(' . esc_attr(wp_json_encode($pvConfirm)) . ');">' 688 . wp_nonce_field('paintops_toggle_complete_' . (int) $row->id, 'paintops_toggle_nonce', true, false)688 . paintops_nonce_field('paintops_toggle_complete_' . (int) $row->id, 'paintops_toggle_nonce', true, false) 689 689 . '<button type="submit" name="paintopsToggleComplete" value="1" class="job-badge ' . $pvCompleteClass . '" style="margin-left:8px;vertical-align:middle;cursor:pointer;border:none;font-family:inherit;" title="' . esc_attr($pvTitle) . '">' . $pvCompleteLabel . '</button>' 690 690 . '</form>'; … … 910 910 ?> 911 911 <form method="post" style="margin:10px 0 4px;" onsubmit="return confirm('Mark this job complete? The office will be notified.');"> 912 <?php wp_nonce_field('paintops_worker_complete_' . (int) $row->id, 'paintops_worker_complete_nonce'); ?>912 <?php paintops_nonce_field('paintops_worker_complete_' . (int) $row->id, 'paintops_worker_complete_nonce'); ?> 913 913 <input type="hidden" name="job_id" value="<?php echo (int) $row->id; ?>"> 914 914 <button type="submit" name="paintops_worker_complete" value="1" class="paintops-btn paintops-btn-primary">✓ Mark Job Complete</button> … … 926 926 ?> 927 927 <form method="post" style="margin:10px 0 4px;display:inline-block;"> 928 <?php wp_nonce_field('paintops_mark_won_action', 'paintops_mark_won_nonce'); ?>928 <?php paintops_nonce_field('paintops_mark_won_action', 'paintops_mark_won_nonce'); ?> 929 929 <input type="hidden" name="job_id" value="<?php echo (int) $row->id; ?>"> 930 930 <button type="submit" name="paintops_mark_won" value="1" class="paintops-btn paintops-btn-primary">✓ Mark as Won, convert to Job</button> … … 937 937 // drawer, where it can be revived later. ?> 938 938 <form method="post" style="margin:10px 0 4px 6px;display:inline-block;" onsubmit="return confirm('Mark this as Not Won? It moves to the Not Won drawer on the Job Board, where it can be revived later.');"> 939 <?php wp_nonce_field('paintops_mark_not_won_action', 'paintops_mark_not_won_nonce'); ?>939 <?php paintops_nonce_field('paintops_mark_not_won_action', 'paintops_mark_not_won_nonce'); ?> 940 940 <input type="hidden" name="job_id" value="<?php echo (int) $row->id; ?>"> 941 941 <button type="submit" name="paintops_mark_not_won" value="1" class="paintops-btn paintops-btn-secondary">Mark as Not Won</button> … … 1074 1074 <?php if ($is_staff): ?> 1075 1075 <div class="pv-mn-editor" style="display:none;margin-top:8px;"> 1076 <textarea class="pv-mn-textarea" rows="6" style="width:100%;box-sizing:border-box;" placeholder="Materials & supplies, gate/door code, parking, pets, quiet hours, etc."><?php echo esc_textarea($masterNotesRaw); ?></textarea>1076 <textarea class="pv-mn-textarea" rows="6" aria-label="Master notes for this job" style="width:100%;box-sizing:border-box;" placeholder="Materials & supplies, gate/door code, parking, pets, quiet hours, etc."><?php echo esc_textarea($masterNotesRaw); ?></textarea> 1077 1077 <p style="margin:8px 0 0;"><button type="button" class="paintops-btn paintops-btn-primary pv-mn-save">Save Notes</button> <button type="button" class="paintops-btn paintops-btn-secondary pv-mn-cancel">Cancel</button> <span class="pv-mn-status" style="margin-left:8px;font-size:13px;"></span></p> 1078 1078 </div> … … 1406 1406 } 1407 1407 1408 return '<div class="job-form"><h2 class="po-screen-title" style="margin-top:0;">My Jobs</h2>' . $body . '</div>'; 1408 $po_t = paintops_screen_title_tag(); 1409 return '<div class="job-form"><' . $po_t . ' class="po-screen-title" style="margin-top:0;">My Jobs</' . $po_t . '>' . $body . '</div>'; 1409 1410 } 1410 1411 … … 1435 1436 $currency = function_exists('paintops_currency_symbol') ? paintops_currency_symbol() : '$'; 1436 1437 1437 $out = '<div class="job-form"><h2 class="po-screen-title" style="margin-top:0;">My Hours</h2>'; 1438 $po_t = paintops_screen_title_tag(); 1439 $out = '<div class="job-form"><' . $po_t . ' class="po-screen-title" style="margin-top:0;">My Hours</' . $po_t . '>'; 1438 1440 1439 1441 if (!$rows) { -
paintops/trunk/includes/manage-jobs.php
r3692411 r3694342 297 297 * (.po-screen-title in job-style.php). Text is escaped here; pass plain 298 298 * text. 299 * 300 * $context (2026-09-13 visual pass) is an optional one-line factual 301 * summary rendered under the title inside the same .po-page-head block, 302 * e.g. "6 customers" or "2026 · 9 jobs". Build it with 303 * paintops_screen_context() and ONLY from data the screen has already 304 * loaded; it is a label for what is on the page, never a new query. 299 305 */ 300 306 /** … … 331 337 'id' => true, 'class' => true, 'style' => true, 'title' => true, 332 338 'tabindex' => true, 'role' => true, 'hidden' => true, 'lang' => true, 333 'dir' => true, 'draggable' => true, 'data-*' => true, 'aria-*' => true, 339 'dir' => true, 'draggable' => true, 'data-*' => true, 340 // ARIA attributes must be listed by name. WordPress kses implements 341 // exactly ONE attribute wildcard, 'data-*' (wp_kses_attr_check() in 342 // wp-includes/kses.php); there is no 'aria-*' wildcard, so the 343 // 'aria-*' => true that used to sit on the line above silently did 344 // nothing and every aria attribute on a plugin-declared tag was 345 // stripped. Do not "simplify" this back to a wildcard. 346 'aria-activedescendant' => true, 'aria-atomic' => true, 347 'aria-autocomplete' => true, 'aria-busy' => true, 'aria-checked' => true, 348 'aria-controls' => true, 'aria-current' => true, 'aria-describedby' => true, 349 'aria-details' => true, 'aria-disabled' => true, 'aria-expanded' => true, 350 'aria-haspopup' => true, 'aria-hidden' => true, 'aria-invalid' => true, 351 'aria-keyshortcuts' => true, 'aria-label' => true, 'aria-labelledby' => true, 352 'aria-level' => true, 'aria-live' => true, 'aria-modal' => true, 353 'aria-multiselectable' => true, 'aria-orientation' => true, 'aria-owns' => true, 354 'aria-placeholder' => true, 'aria-posinset' => true, 'aria-pressed' => true, 355 'aria-readonly' => true, 'aria-relevant' => true, 'aria-required' => true, 356 'aria-roledescription' => true, 'aria-selected' => true, 'aria-setsize' => true, 357 'aria-sort' => true, 'aria-valuemax' => true, 'aria-valuemin' => true, 358 'aria-valuenow' => true, 'aria-valuetext' => true, 334 359 // Inline handlers are app chrome (menu toggles, print buttons); 335 360 // every dynamic value inside them is esc_js()/esc_attr()-escaped … … 383 408 } 384 409 410 /** 411 * wp_nonce_field() with a unique element id. 412 * 413 * wp_nonce_field() sets the hidden input's id to the nonce NAME, so any page 414 * that renders the same nonce in more than one form repeats that id. That is 415 * invalid HTML and it makes getElementById() and label[for] ambiguous. This 416 * wrapper leaves the name alone, so every existing $_POST verification keeps 417 * working unchanged, and only disambiguates the id: the first render on a 418 * page keeps the original id, later ones get "name-2", "name-3" and so on. 419 * 420 * Use this instead of wp_nonce_field() anywhere a nonce can render more than 421 * once on a single request. 422 */ 423 function paintops_nonce_field(string $action, string $name = '_wpnonce', bool $referer = true, bool $echo = true): string { 424 static $seen = []; 425 $seen[$name] = ($seen[$name] ?? 0) + 1; 426 $html = wp_nonce_field($action, $name, $referer, false); 427 if ($seen[$name] > 1) { 428 $html = preg_replace( 429 '/ id="' . preg_quote($name, '/') . '"/', 430 ' id="' . esc_attr($name . '-' . $seen[$name]) . '"', 431 $html, 432 1 433 ); 434 } 435 if ($echo) { 436 echo wp_kses($html, paintops_kses_allowed_html(), paintops_kses_protocols()); 437 } 438 return $html; 439 } 440 385 441 /** CSS properties the app uses beyond core's safecss defaults. */ 386 442 function paintops_kses_style_props(array $props): array { … … 429 485 } 430 486 431 function paintops_screen_title(string $title): string { 432 return '<h2 class="po-screen-title">' . esc_html($title) . '</h2>'; 487 function paintops_screen_title(string $title, string $context = ''): string { 488 $tag = paintops_screen_title_tag(); 489 $html = '<div class="po-page-head"><' . $tag . ' class="po-screen-title">' . esc_html($title) . '</' . $tag . '>'; 490 if ($context !== '') { 491 $html .= '<p class="po-page-context">' . esc_html($context) . '</p>'; 492 } 493 return $html . '</div>'; 494 } 495 496 /** 497 * Join the parts of a screen's context line (2026-09-13 visual pass). 498 * 499 * The context line is the short factual sentence under a screen title, 500 * "6 customers", "2026 · 9 jobs". It is only ever built from data the 501 * page has ALREADY loaded for its own rendering: nothing here queries, and 502 * nothing here is estimated. Empty parts drop out, so a caller can pass a 503 * value that may not exist without guarding each one. 504 */ 505 function paintops_screen_context(array $parts): string { 506 $clean = array_values(array_filter(array_map( 507 static function ($p) { return trim((string) $p); }, 508 $parts 509 ), static function ($p) { return $p !== ''; })); 510 return implode(' · ', $clean); 511 } 512 513 /** 514 * Heading level for a screen title: h1 or h2 (2026-09-13 audit, B4). 515 * 516 * These were made h2 in July so they would not collide with the THEME's 517 * <h1> on the app page. That reasoning only holds in the classic layout, 518 * where the theme still renders its header. In the sidebar shell, which 519 * has been the default for every install since 1.0.281, and in 520 * header/footer-off mode, the plugin renders the entire document itself 521 * (see paintops_render_app_canvas_if_hidden() in paintops.php) and there 522 * is no theme <h1> at all, so the app's own pages were shipping with no 523 * top-level heading. Both of those modes set $GLOBALS['paintops_canvas 524 * _active'], which is exactly the "the plugin owns this document" 525 * signal, so key off it: h1 where the plugin owns the page, h2 where the 526 * theme still provides one. .po-screen-title styles both identically, so 527 * nothing moves on screen either way. 528 */ 529 function paintops_screen_title_tag(): string { 530 return !empty($GLOBALS['paintops_canvas_active']) ? 'h1' : 'h2'; 433 531 } 434 532 … … 497 595 ?> 498 596 <form method="post" class="po-excl-toggle"> 499 <?php wp_nonce_field('paintops_show_excluded', 'paintops_show_excluded_nonce'); ?>597 <?php paintops_nonce_field('paintops_show_excluded', 'paintops_show_excluded_nonce'); ?> 500 598 <input type="hidden" name="paintops_show_excluded_submit" value="1"> 501 599 <label class="po-excl-label"> … … 705 803 <span class="dashicons dashicons-admin-home" aria-hidden="true"></span><span class="pbn-label"><?php echo esc_attr($is_staff_nav ? 'Jobs' : 'My Jobs'); ?></span> 706 804 </a> 707 <?php if ($can_new_nav) : ?> 805 <?php if ($can_new_nav && $is_staff_nav) : ?> 806 <?php // Staff: the raised "+" opens the same two-way chooser the 807 // desktop/sidebar "+ New" shows (Mike 2026-09-13), instead of 808 // jumping straight to a New Request. Receipts get filed far 809 // more often than jobs get created, and on a phone this was 810 // the one entry point that did not offer them. Rendered as a 811 // BUTTON, not a link, because it opens the .pbn-sheet-new 812 // bottom sheet below rather than navigating. Workers who can 813 // create jobs but are not staff keep the direct link: the 814 // receipt half of the chooser is staff-only everywhere else 815 // in this nav too. ?> 816 <button type="button" class="pbn-center pbn-new-btn<?php echo esc_attr($bn_new_active); ?>" aria-haspopup="dialog" aria-expanded="false" aria-label="New"> 817 <span class="pbn-plus"><span class="dashicons dashicons-plus-alt2" aria-hidden="true"></span></span><span class="pbn-label">New</span> 818 </button> 819 <?php elseif ($can_new_nav) : ?> 708 820 <a class="pbn-center<?php echo esc_attr($bn_new_active); ?>" href="<?php echo esc_url(paintops_admin_url(['newJob' => 1])); ?>" aria-label="New Request"> 709 821 <span class="pbn-plus"><span class="dashicons dashicons-plus-alt2" aria-hidden="true"></span></span><span class="pbn-label">New</span> … … 720 832 721 833 <div class="pbn-sheet-backdrop" hidden></div> 722 <div class="pbn-sheet" role="dialog" aria-modal="true" aria-label="More" hidden> 834 <?php // The "+ New" chooser sheet. Same component as the More sheet 835 // below (one shared backdrop, one open at a time, see app-nav.js), 836 // and the labels match the sidebar's + New menu word for word so 837 // the two entry points read as the same control. ?> 838 <?php if ($can_new_nav && $is_staff_nav) : ?> 839 <div class="pbn-sheet pbn-sheet-new" role="dialog" aria-modal="true" aria-label="New" hidden> 840 <div class="pbn-sheet-handle" aria-hidden="true"></div> 841 <a href="<?php echo esc_url(paintops_admin_url(['newJob' => 1])); ?>"><span class="dashicons dashicons-plus-alt2" aria-hidden="true"></span>New Request / Job</a> 842 <a href="<?php echo esc_url(paintops_admin_url(['newReceipt' => 1])); ?>"><span class="dashicons dashicons-media-spreadsheet" aria-hidden="true"></span>File a Receipt</a> 843 </div> 844 <?php endif; ?> 845 <div class="pbn-sheet pbn-sheet-more" role="dialog" aria-modal="true" aria-label="More" hidden> 723 846 <div class="pbn-sheet-handle" aria-hidden="true"></div> 724 847 … … 824 947 825 948 $profile = function_exists('paintops_company_profile') ? paintops_company_profile() : []; 826 $logo = isset($profile['logo']) ? trim((string) $profile['logo']) : ''; 949 // No $logo here on purpose: the sidebar shows the PaintClarity mark, not 950 // the company's. paintops_company_profile()['logo'] is still read by every 951 // document renderer (estimates, job-invoices, customer-payments, 952 // pro-expense-reports, job-financials-addon). 827 953 $bizname = (isset($profile['name']) && $profile['name'] !== '') ? (string) $profile['name'] : get_bloginfo('name'); 828 954 $u = wp_get_current_user(); … … 839 965 ?> 840 966 <aside class="po-side" id="poSide" aria-label="Primary"> 967 <?php 968 // Brand block (Mike 2026-09-13): the MENU identifies the product, so 969 // it always shows the PaintClarity mark and wordmark, whether or not 970 // the contractor has uploaded a logo. The company's own logo is a 971 // DOCUMENT mark and is unchanged everywhere it belongs: quotes, 972 // invoices, expense reports, customer payment pages. The business 973 // name still appears here, under the product name, because the rail 974 // should say whose books these are. 975 // The mark sits on a white chip (.po-side-mark) since its brush 976 // handle is dark navy and would vanish straight onto the navy rail. 977 ?> 841 978 <div class="po-side-brand"> 842 <?php if ($logo !== '') : ?> 843 <img class="po-side-logo" src="<?php echo esc_url($logo); ?>" alt="<?php echo esc_attr($bizname); ?>"> 844 <?php elseif (defined('PAINTOPS_PLUGIN_FILE')) : ?> 845 <img class="po-side-logo" src="<?php echo esc_url(plugins_url('assets/img/paintops-logo.png', PAINTOPS_PLUGIN_FILE)); ?>" alt="PaintClarity"> 846 <?php else : ?> 847 <span class="po-side-word">PaintClarity</span> 979 <?php if (defined('PAINTOPS_PLUGIN_FILE')) : ?> 980 <img class="po-side-mark" src="<?php echo esc_url(plugins_url('assets/img/paintclarity-mark.png', PAINTOPS_PLUGIN_FILE)); ?>" alt="" aria-hidden="true"> 848 981 <?php endif; ?> 982 <span class="po-side-word">PaintClarity</span> 849 983 <?php if ($bizname !== '') : ?><div class="po-side-biz"><?php echo esc_html($bizname); ?></div><?php endif; ?> 850 984 </div> … … 1226 1360 echo '<p>You do not have permission to view financials.</p>'; 1227 1361 } else { 1362 // 2026-09-13 audit, B3: this screen rendered no standardized title. 1363 echo wp_kses(paintops_screen_title('Profit Per Hour Rankings'), paintops_kses_allowed_html(), paintops_kses_protocols()); 1228 1364 require_once __DIR__ . '/job-financials-addon.php'; 1229 1365 require_once __DIR__ . '/job-profit-hour-rankings.php'; … … 1241 1377 1242 1378 if (isset($_GET['pipeline'])){ 1379 // 2026-09-13 audit, B3: this screen rendered no standardized title. 1380 echo wp_kses(paintops_screen_title('Pipeline'), paintops_kses_allowed_html(), paintops_kses_protocols()); 1243 1381 require_once __DIR__ . '/job-pipeline.php'; 1244 1382 echo wp_kses(paintops_render_job_pipeline(), paintops_kses_allowed_html(), paintops_kses_protocols()); … … 1261 1399 echo '<p>You do not have permission to view financials.</p>'; 1262 1400 } else { 1263 echo wp_kses(paintops_screen_title('Profits'), paintops_kses_allowed_html(), paintops_kses_protocols()); 1401 // $profitYear is read up here rather than inside the branch below 1402 // so the screen title can say WHICH year is on screen (2026-09-13 1403 // visual pass). Same value, same source, just resolved earlier. 1404 $profitYear = !empty($_GET['profitYear']) ? (int) $_GET['profitYear'] : null; 1405 $profitCtx = function_exists('paintops_screen_context') ? paintops_screen_context([ 1406 (string) ($profitYear ?: (int) current_time('Y')), 1407 $profitYear ? '' : 'year to date', 1408 ]) : ''; 1409 echo wp_kses(paintops_screen_title('Profits', $profitCtx), paintops_kses_allowed_html(), paintops_kses_protocols()); 1264 1410 require_once __DIR__ . '/job-financials-addon.php'; 1265 1411 if (function_exists('paintops_render_yearly_financial_dashboard')) { 1266 $profitYear = !empty($_GET['profitYear']) ? (int) $_GET['profitYear'] : null;1267 1412 paintops_render_yearly_financial_dashboard($profitYear); 1268 1413 } else { … … 1483 1628 1484 1629 if (isset($_GET['scheduleFollowUp'])){ 1630 // 2026-09-13 audit, B3: this screen rendered no standardized title. 1631 echo wp_kses(paintops_screen_title('Schedule Follow-Up'), paintops_kses_allowed_html(), paintops_kses_protocols()); 1485 1632 require_once __DIR__ . '/job-followups.php'; 1486 1633 paintops_render_schedule_followup_form((int) $_GET['scheduleFollowUp']); … … 2027 2174 <p style="margin-top:0;color:var(--po-text-muted,#777);font-size:13px;">Review and edit before sending. The wording comes from your Follow-Up Template (Business Settings); changes here apply to this email only.</p> 2028 2175 <form method="post"> 2029 <?php wp_nonce_field('paintops_send_followup_' . (int) $followup_job->id, 'paintops_followup_nonce'); ?>2176 <?php paintops_nonce_field('paintops_send_followup_' . (int) $followup_job->id, 'paintops_followup_nonce'); ?> 2030 2177 <p> 2031 2178 <label><strong>To</strong></label><br> … … 2092 2239 <input type=\"hidden\" name=\"estimateID\" value=\"$estimateID\"> 2093 2240 <input type=\"hidden\" name=\"invoiceID\" value=\"$invoiceID\"> 2094 " . wp_nonce_field('paintops_save_job', 'paintops_job_nonce', true, false) . "2241 " . paintops_nonce_field('paintops_save_job', 'paintops_job_nonce', true, false) . " 2095 2242 "; 2096 2243 } 2097 2244 } 2098 2245 else{ 2099 $formAction = "<input type=\"hidden\" name=\"newjob\" value=\"1\">" . wp_nonce_field('paintops_save_job', 'paintops_job_nonce', true, false);2246 $formAction = "<input type=\"hidden\" name=\"newjob\" value=\"1\">" . paintops_nonce_field('paintops_save_job', 'paintops_job_nonce', true, false); 2100 2247 $submitName = "Create"; 2101 2248 //$jobCat = $jobTitle = $jobDesc = $custFirst = $custLast = $custServiceAddress = $custPhone = $custEmail = $custServiceCity = $custServiceZip = $custServiceZip ?? ''; … … 2164 2311 // dedicated page now rather than a collapsible box on the 2165 2312 // dashboard, so no need to render it again here. 2166 echo "<h2 id=\"paintopsNewJobHeading\" class=\"po-screen-title\">New Request</h2> 2313 $po_nt = paintops_screen_title_tag(); 2314 echo "<$po_nt id=\"paintopsNewJobHeading\" class=\"po-screen-title\">New Request</$po_nt> 2167 2315 <div>"; 2168 2316 // Every "+ New Request" link across the app (Jobs list, Customers … … 3032 3180 <div class="po-jobs-search" id="poJobSearch"> 3033 3181 <svg class="po-jobs-search-ic" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.35-4.35"/></svg> 3034 <input type="search" id="poJobSearchInput" class="po-jobs-search-input" placeholder="Search jobs…" autocomplete="off" role="combobox" aria- expanded="false" aria-autocomplete="list" aria-controls="poJobSearchMenu">3182 <input type="search" id="poJobSearchInput" class="po-jobs-search-input" placeholder="Search jobs…" autocomplete="off" role="combobox" aria-label="Search jobs" aria-expanded="false" aria-autocomplete="list" aria-controls="poJobSearchMenu"> 3035 3183 <div class="po-jobs-search-menu" id="poJobSearchMenu" role="listbox" hidden></div> 3036 3184 </div> -
paintops/trunk/includes/resource-links.php
r3692411 r3694342 39 39 40 40 function paintops_url_meta_box($post) { 41 wp_nonce_field('paintops_save_resource_url', 'paintops_resource_nonce');41 paintops_nonce_field('paintops_save_resource_url', 'paintops_resource_nonce'); 42 42 $value = get_post_meta($post->ID, '_paintops_resource_url', true); 43 echo '<input type="url" name="rl_url" style="width:100%" value="' . esc_attr($value) . '" required />';43 echo '<input type="url" name="rl_url" style="width:100%" value="' . esc_attr($value) . '" aria-label="Resource URL" required />'; 44 44 } 45 45 … … 139 139 140 140 /** 141 * One-time cleanup of the "12 Mistakes That Loose Sales" seed typo 142 * (Mike 2026-09-14). 143 * 144 * The seed array above has said "Lose" for a while, so a NEW install has 145 * only ever had the correct title (verified on a clean install: 10 seeded 146 * resources, correct spelling). But paintops_seed_default_resources() is 147 * gated by the paintops_resources_seeded option and never re-runs, so a 148 * site seeded BEFORE the array was corrected still carries the misspelled 149 * row, and a site that somehow seeded twice carries both. 150 * 151 * This is deliberately narrow. It only ever touches a paintops_resource 152 * whose title is EXACTLY the old misspelling, so a resource the owner 153 * added or renamed themselves is never in scope: 154 * - if a correctly spelled row already exists, the misspelled one is 155 * moved to TRASH, not force-deleted, so it is recoverable; 156 * - otherwise the title is corrected in place, which keeps the post id, 157 * its URL meta and its position in the list. 158 * 159 * Runs once per site, gated by paintops_resources_typo_fixed, from 160 * paintops_install(), which re-runs on every version bump. 161 */ 162 function paintops_fix_resource_title_typo(): void { 163 if (get_option('paintops_resources_typo_fixed')) { 164 return; 165 } 166 167 $wrong = '12 Mistakes That Loose Sales'; 168 $correct = '12 Mistakes That Lose Sales'; 169 170 $all = get_posts([ 171 'post_type' => 'paintops_resource', 172 'post_status' => 'any', 173 'numberposts' => -1, 174 'suppress_filters' => false, 175 ]); 176 177 $bad = []; 178 $has_correct = false; 179 foreach ($all as $post) { 180 $title = trim((string) $post->post_title); 181 if ($title === $wrong) { 182 $bad[] = $post; 183 } elseif ($title === $correct && $post->post_status !== 'trash') { 184 $has_correct = true; 185 } 186 } 187 188 foreach ($bad as $post) { 189 if ($has_correct) { 190 wp_trash_post($post->ID); 191 } else { 192 wp_update_post(['ID' => $post->ID, 'post_title' => $correct]); 193 // Only the FIRST one is promoted to the correct title; if a site 194 // somehow holds several, the rest are duplicates of it. 195 $has_correct = true; 196 } 197 } 198 199 update_option('paintops_resources_typo_fixed', 1); 200 } 201 202 /** 141 203 * One-time rebrand of existing resource-link titles from "PaintOps" to 142 204 * "PaintClarity" (Mike 2026-09-12). New installs already seed PaintClarity … … 223 285 $output .= '<button type="button" onclick="document.getElementById(\'rl-admin-form\').classList.toggle(\'hidden\');" class="paintops-btn paintops-btn-primary" style="margin-top:20px;margin-bottom:10px;">+ New Resource</button>'; 224 286 $output .= '<div id="rl-admin-form" class="hidden rl-admin-form-card"><form method="POST">'; 225 $output .= wp_nonce_field('paintops_add_resource', 'paintops_resource_form_nonce', true, false);226 $output .= '<input type="text" name="rl_title" placeholder="Title" required />';227 $output .= '<input type="url" name="rl_url" placeholder="https://example.com" required />';287 $output .= paintops_nonce_field('paintops_add_resource', 'paintops_resource_form_nonce', true, false); 288 $output .= '<input type="text" name="rl_title" placeholder="Title" aria-label="Resource title" required />'; 289 $output .= '<input type="url" name="rl_url" placeholder="https://example.com" aria-label="Resource URL" required />'; 228 290 $output .= '<button type="submit" class="paintops-btn paintops-btn-primary" name="rl_submit_url" style="margin-top:6px;">Add Resource</button>'; 229 291 $output .= '</form></div>'; … … 322 384 } 323 385 324 $output .= '<input type="text" name="rl_search" value="' . esc_attr($search_term) . '" placeholder="Search resources..." />';325 $output .= '<select name="rl_orderby" >';386 $output .= '<input type="text" name="rl_search" value="' . esc_attr($search_term) . '" placeholder="Search resources..." aria-label="Search resources" />'; 387 $output .= '<select name="rl_orderby" aria-label="Sort by">'; 326 388 $output .= '<option value="date"' . selected($orderby, 'date', false) . '>Date</option>'; 327 389 $output .= '<option value="title"' . selected($orderby, 'title', false) . '>Title</option>'; 328 390 $output .= '</select>'; 329 $output .= '<select name="rl_order" >';391 $output .= '<select name="rl_order" aria-label="Sort direction">'; 330 392 $output .= '<option value="DESC"' . selected($order, 'DESC', false) . '>Descending</option>'; 331 393 $output .= '<option value="ASC"' . selected($order, 'ASC', false) . '>Ascending</option>'; -
paintops/trunk/includes/timeoff.php
r3692081 r3694342 198 198 <input type="number" step="1" min="1" max="365" id="daysOff" name="daysOff" value=""> 199 199 200 <label for="is repeat">Repeat Each Year?</label>200 <label for="isRepeat">Repeat Each Year?</label> 201 201 <input 202 202 style='width: 28px; height: 28px; margin: 0 8px 0 0;' … … 209 209 <br> 210 210 <input type="hidden" name="addTimeOff" value="1"> 211 <?php wp_nonce_field('paintops_save_timeoff', 'paintops_timeoff_nonce'); ?>211 <?php paintops_nonce_field('paintops_save_timeoff', 'paintops_timeoff_nonce'); ?> 212 212 <?php echo wp_kses(function_exists('paintops_once_field') ? paintops_once_field() : '', paintops_kses_allowed_html(), paintops_kses_protocols()); ?> 213 213 <div class="paintops-sticky-save"> -
paintops/trunk/paintops.php
r3693322 r3694342 5 5 * Plugin URI: https://paintclarity.com 6 6 * Description: Estimating, scheduling, job tracking, crews, invoicing, and profit reporting for painting contractors. 7 * Version: 1. 0.3017 * Version: 1.1.000 8 8 * Author: PaintClarity 9 9 * Author URI: https://paintclarity.com/the-paintops-story/ … … 167 167 } 168 168 } 169 define( 'PAINTOPS_VERSION', '1. 0.301' );169 define( 'PAINTOPS_VERSION', '1.1.000' ); 170 170 define( 'PAINTOPS_PLUGIN_FILE', __FILE__ ); 171 171 define( 'PAINTOPS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); … … 3771 3771 paintops_rebrand_resource_titles(); 3772 3772 } 3773 if ( function_exists( 'paintops_fix_resource_title_typo' ) ) { 3774 paintops_fix_resource_title_typo(); 3775 } 3773 3776 update_option( 'paintops_db_version', PAINTOPS_VERSION ); 3774 3777 } … … 4637 4640 * section-label filters above) it would exactly duplicate the app's own 4638 4641 * screen heading. This script hides any H1 whose text is exactly the 4639 * current section label. That can only be the theme's injected title: 4640 * the app's own headings are H2s, or H1s with different text (the 4641 * calendar's "July 2026", job view's "Job #12 ...", the financials 4642 * coversheet). Keep it that way, never add an app H1 whose text equals 4643 * paintops_current_section_label() for its route. The document <title> 4644 * is unaffected. 4642 * current section label. 4643 * 4644 * IMPORTANT (2026-09-13 audit, B4): the app's screen titles are now H1 4645 * in shell / chrome-hidden mode (see paintops_screen_title_tag() in 4646 * manage-jobs.php), and their text IS the section label, so a plain 4647 * text match would hide the app's own heading, which is exactly what 4648 * happened the first time this was changed. The match therefore SKIPS 4649 * anything the app renders itself, identified by class. Any future app 4650 * heading must carry .po-screen-title (or be added to the skip list 4651 * below) or it will disappear on every route whose label it matches. 4652 * The document <title> is unaffected. 4645 4653 */ 4646 4654 function paintops_hide_theme_title_dup() : void { … … 4658 4666 echo wp_json_encode( $label ); 4659 4667 ?>; 4668 var mine = '.po-screen-title, .job-title, .paintops-app-title'; 4660 4669 function run(){ 4661 4670 var h1s = document.querySelectorAll('h1'); 4662 4671 for (var i = 0; i < h1s.length; i++) { 4672 if (h1s[i].matches && h1s[i].matches(mine)) { continue; } 4663 4673 if (h1s[i].textContent.trim() === lbl) { 4664 4674 h1s[i].style.display = 'none'; … … 5209 5219 echo '</table>'; 5210 5220 echo '<form method="post">'; 5211 wp_nonce_field( 'paintops_recreate_page_action' );5221 paintops_nonce_field( 'paintops_recreate_page_action' ); 5212 5222 echo '<p><button type="submit" name="paintops_recreate_page" value="1" class="button">Check / Recreate App Page</button></p>'; 5213 5223 echo '</form>'; … … 5254 5264 echo '<p class="description">Powers address autocomplete, embedded maps, and geocoding. Directions work without it. <a href="https://console.cloud.google.com/google/maps-apis/credentials" target="_blank" rel="noopener noreferrer">Get / manage a key</a> and restrict it to your site\'s domain.</p>'; 5255 5265 echo '<form method="post">'; 5256 wp_nonce_field( 'paintops_save_maps_key_action' );5266 paintops_nonce_field( 'paintops_save_maps_key_action' ); 5257 5267 echo '<table class="form-table" role="presentation"><tr><th scope="row"><label for="paintops_maps_api_key">API Key</label></th><td>'; 5258 5268 echo '<input type="text" id="paintops_maps_api_key" name="paintops_maps_api_key" class="regular-text" value="' . esc_attr( paintops_maps_api_key() ) . '">'; … … 5265 5275 echo '<p class="description">Sends each assigned Painter/Helper a "job starts tomorrow" reminder email the day before, with the job address, customer, and time.</p>'; 5266 5276 echo '<form method="post">'; 5267 wp_nonce_field( 'paintops_save_notifications_enabled_action' );5277 paintops_nonce_field( 'paintops_save_notifications_enabled_action' ); 5268 5278 echo '<p><label><input type="checkbox" name="notifications_enabled" value="1"' . checked( $notif_on, true, false ) . '> Send job reminder notifications</label></p>'; 5269 5279 echo '<p><button type="submit" name="paintops_save_notifications_enabled" value="1" class="button button-primary">Save</button></p>'; … … 5276 5286 echo wp_kses( '<p><code>' . esc_html( $notif_url ) . '</code></p>', paintops_kses_allowed_html(), paintops_kses_protocols() ); 5277 5287 echo '<form method="post">'; 5278 wp_nonce_field( 'paintops_regen_token_action' );5288 paintops_nonce_field( 'paintops_regen_token_action' ); 5279 5289 echo '<p><button type="submit" name="paintops_regen_token" value="1" class="button" onclick="return confirm(\'This invalidates the current URL. Continue?\');">Regenerate Token</button></p>'; 5280 5290 echo '</form>'; … … 5301 5311 } 5302 5312 echo '<form method="post">'; 5303 wp_nonce_field( 'paintops_send_test_email_action' );5313 paintops_nonce_field( 'paintops_send_test_email_action' ); 5304 5314 echo '<p><button type="submit" name="paintops_send_test_email" value="1" class="button">Send Test Email</button></p>'; 5305 5315 echo '</form>'; … … 5512 5522 echo '<p class="description">How the app looks for everyone on the team: color theme, menu style, and whether your site\'s header and footer wrap the app page. Customer-facing quote pages keep their own clean look and are not affected.</p>'; 5513 5523 echo '<form method="post">'; 5514 wp_nonce_field( 'paintops_save_appearance_action' );5524 paintops_nonce_field( 'paintops_save_appearance_action' ); 5515 5525 if ( $app_themes ) { 5516 5526 echo '<h3 style="margin:18px 0 4px;">Theme</h3>'; … … 5621 5631 echo wp_kses( '<span style="display:inline-block;min-width:190px;color:#50575e;">' . $when . $yearNote . '</span> ', paintops_kses_allowed_html(), paintops_kses_protocols() ); 5622 5632 echo '<form method="post" style="display:inline;">'; 5623 wp_nonce_field( 'paintops_save_holidays_action' );5633 paintops_nonce_field( 'paintops_save_holidays_action' ); 5624 5634 echo '<input type="hidden" name="paintops_holiday_action" value="remove">'; 5625 5635 echo '<input type="hidden" name="holiday_index" value="' . esc_attr( (string) $i ) . '">'; … … 5634 5644 echo '<h4 style="margin:16px 0 6px;">Quick add (US holidays)</h4>'; 5635 5645 echo '<form method="post" style="margin-bottom:6px;">'; 5636 wp_nonce_field( 'paintops_save_holidays_action' );5646 paintops_nonce_field( 'paintops_save_holidays_action' ); 5637 5647 echo '<input type="hidden" name="paintops_holiday_action" value="preset">'; 5638 5648 echo '<div style="display:flex;flex-wrap:wrap;gap:6px;">'; … … 5645 5655 echo '<h4 style="margin:16px 0 6px;">Add your own</h4>'; 5646 5656 echo '<form method="post" id="paintops-add-holiday">'; 5647 wp_nonce_field( 'paintops_save_holidays_action' );5657 paintops_nonce_field( 'paintops_save_holidays_action' ); 5648 5658 echo '<input type="hidden" name="paintops_holiday_action" value="add">'; 5649 5659 echo '<table class="form-table" role="presentation">'; … … 6198 6208 echo wp_kses( '<details class="paintops-settings-section"><summary>Company Profile' . paintops_settings_summary_right() . '</summary><div class="paintops-settings-body">', paintops_kses_allowed_html(), paintops_kses_protocols() ); 6199 6209 echo '<form method="post">'; 6200 wp_nonce_field( 'paintops_save_company_profile_action' );6210 paintops_nonce_field( 'paintops_save_company_profile_action' ); 6201 6211 echo '<table class="form-table" role="presentation">'; 6202 6212 echo '<tr><th scope="row"><label for="company_name">Company Name</label></th><td><input type="text" id="company_name" name="company_name" class="regular-text" placeholder="Your Company Name, LLC" value="' . esc_attr( $profile['name'] ) . '"><p class="description">Shown on the PDF quote header, the quote email signature, and the public quote page customers open to accept/pay.</p></td></tr>'; … … 6248 6258 echo '<p class="description">If you\'d like to support PaintClarity, you can show a small <strong>' . esc_html( paintops_powered_by_label() ) . ' · paintclarity.com</strong> credit at the bottom of your customer quotes and invoices (the printable/PDF documents, the public quote and invoice pages, and the quote/invoice emails). It stays off unless you turn it on here.</p>'; 6249 6259 echo '<form method="post">'; 6250 wp_nonce_field( 'paintops_save_branding_action' );6260 paintops_nonce_field( 'paintops_save_branding_action' ); 6251 6261 echo '<p><label><input type="checkbox" name="paintops_show_powered_by" value="1"' . checked( $branding_shown, true, false ) . '> Show the “' . esc_html( paintops_powered_by_label() ) . '” credit on customer quotes and invoices</label></p>'; 6252 6262 echo '<p class="description">Your Company Profile branding (logo, name, address) is unaffected either way.</p>'; … … 6257 6267 echo '<p class="description">These drive the auto-filled ' . esc_html( strtolower( paintops_spelling( 'Labor', 'Labour' ) ) ) . ' cost suggestion, the itemized quote markup, and the deposit terms shown on quotes.</p>'; 6258 6268 echo '<form method="post">'; 6259 wp_nonce_field( 'paintops_save_pricing_action' );6269 paintops_nonce_field( 'paintops_save_pricing_action' ); 6260 6270 echo '<table class="form-table" role="presentation">'; 6261 6271 echo '<tr><th scope="row"><label for="labor_rate_per_day">' . esc_html( paintops_spelling( 'Labor', 'Labour' ) ) . ' rate (' . esc_html( paintops_currency_symbol() ) . ' / worker / day)</label></th><td><input type="number" step="1" min="0" id="labor_rate_per_day" name="labor_rate_per_day" value="' . esc_attr( (string) $rules['labor_rate_per_day'] ) . '"><p class="description">Used to pre-fill the suggested ' . esc_html( strtolower( paintops_spelling( 'Labor', 'Labour' ) ) ) . ' cost line on a new estimate (days × workers × this rate). You can still edit that line by hand before sending.</p></td></tr>'; … … 6290 6300 // lines up horizontally across cards too, not just within one. 6291 6301 echo '<form method="post" style="border:1px solid #ccd0d4;border-radius:4px;padding:10px 14px;background:#fff;width:220px;display:flex;flex-direction:column;">'; 6292 wp_nonce_field( 'paintops_add_category_template_action' );6302 paintops_nonce_field( 'paintops_add_category_template_action' ); 6293 6303 echo '<input type="hidden" name="template_key" value="' . esc_attr( $template_key ) . '">'; 6294 6304 echo '<strong>' . esc_html( $template['name'] ) . '</strong>'; … … 6300 6310 echo '<h3>Your Categories</h3>'; 6301 6311 echo '<form method="post">'; 6302 wp_nonce_field( 'paintops_save_categories_action' );6312 paintops_nonce_field( 'paintops_save_categories_action' ); 6303 6313 $row_index = 0; 6304 6314 foreach ( $categories as $id => $cat ) { … … 6423 6433 echo '<p class="description">A second, independent label from Job Category above, this describes the nature of how the job came about (routine repaint, new construction, a referral channel, storm/insurance work, etc.), used to break down profit by classification on the Profits page.</p>'; 6424 6434 echo '<form method="post">'; 6425 wp_nonce_field( 'paintops_save_job_classifications_action' );6435 paintops_nonce_field( 'paintops_save_job_classifications_action' ); 6426 6436 echo '<div class="paintops-settings-info"><strong>Where this shows up:</strong> as the "Job Classification" dropdown on the New Job/Quote form, and as the row label on the Profit By Job Classification report (Profits page) once a job with that classification has financials.</div>'; 6427 6437 foreach ( $classifications as $id => $label ) { … … 6449 6459 echo '<p class="description">While typing the quote wording, any of these words/phrases found will show a one-click suggestion to add its disclaimer to Exclusions.</p>'; 6450 6460 echo '<form method="post">'; 6451 wp_nonce_field( 'paintops_save_scope_terms_action' );6461 paintops_nonce_field( 'paintops_save_scope_terms_action' ); 6452 6462 foreach ( $scope_terms as $id => $term ) { 6453 6463 $term_display = ( ($term['term'] ?? '') !== '' ? $term['term'] : '(untitled term)' ); … … 6471 6481 echo '<p class="description">Shown as a checklist on the New/Edit Quote screen regardless of what\'s typed - check "Default on" for any clause you always want pre-filled into Exclusions on new quotes.</p>'; 6472 6482 echo '<form method="post">'; 6473 wp_nonce_field( 'paintops_save_scope_situational_action' );6483 paintops_nonce_field( 'paintops_save_scope_situational_action' ); 6474 6484 foreach ( $situational_clauses as $id => $clause ) { 6475 6485 $clause_display = ( ($clause['label'] ?? '') !== '' ? $clause['label'] : '(untitled clause)' ); … … 6500 6510 echo '<p class="description">A quick reference sheet, not a calculator - seeded with rough US national-average painting costs so there\'s something useful here on day one. These are pulled from the middle of a wide published range, and every market\'s labor rates differ, so treat them as a starting point and adjust to match your own pricing. Available as a quick popup on the New/Edit Quote screen.</p>'; 6501 6511 echo '<form method="post">'; 6502 wp_nonce_field( 'paintops_save_price_list_action' );6512 paintops_nonce_field( 'paintops_save_price_list_action' ); 6503 6513 foreach ( $price_list as $id => $item ) { 6504 6514 echo '<fieldset style="border:1px solid #ccd0d4;border-radius:4px;padding:12px 16px;margin-bottom:10px;background:#fff;">'; … … 6540 6550 if ( !empty( $documents ) ) { 6541 6551 echo '<form method="post">'; 6542 wp_nonce_field( 'paintops_save_documents_action' );6552 paintops_nonce_field( 'paintops_save_documents_action' ); 6543 6553 foreach ( $documents as $id => $doc ) { 6544 6554 $doc_label = ( ($doc['label'] ?? '') !== '' ? $doc['label'] : '(untitled document)' ); … … 6559 6569 echo '<h4>Upload a Document</h4>'; 6560 6570 echo '<form method="post" enctype="multipart/form-data">'; 6561 wp_nonce_field( 'paintops_upload_document_action' );6571 paintops_nonce_field( 'paintops_upload_document_action' ); 6562 6572 echo '<table class="form-table" role="presentation">'; 6563 6573 echo '<tr><th scope="row" style="width:140px;"><label for="new_doc_label">Label</label></th><td><input type="text" id="new_doc_label" name="new_doc_label" class="regular-text" placeholder="e.g. Certificate of Insurance"></td></tr>'; … … 6574 6584 echo '<p class="description">Used by the “Send Follow-Up” email and text actions on stale quotes. Placeholders: <code>{customer_name}</code>, <code>{business_name}</code>, <code>{quote_link}</code>.</p>'; 6575 6585 echo '<form method="post">'; 6576 wp_nonce_field( 'paintops_save_followup_template_action' );6586 paintops_nonce_field( 'paintops_save_followup_template_action' ); 6577 6587 echo '<table class="form-table" role="presentation">'; 6578 6588 echo '<tr><th scope="row"><label for="followup_email_subject">Email subject</label></th><td><input type="text" id="followup_email_subject" name="followup_email_subject" class="regular-text" value="' . esc_attr( $followup['email_subject'] ) . '"></td></tr>'; … … 7062 7072 } 7063 7073 echo '<form method="post">'; 7064 wp_nonce_field( 'paintops_save_workers_action' );7074 paintops_nonce_field( 'paintops_save_workers_action' ); 7065 7075 // Mobile scroll wrapper (2026-07-26). 7066 7076 echo '<div style="overflow-x:auto;">'; … … 7136 7146 echo '<p class="description" style="margin:0 0 10px;">Creates their account with the Painter/Helper role and sends the app invite in one step, they get a single email with a set-password link that lands them in the app. (Adding people on the WordPress Users screen instead? Untick “Send the new user an email” there, then use Send app invite in the table above, so they are not asked to set a password twice.)</p>'; 7137 7147 echo '<form method="post" style="display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;">'; 7138 wp_nonce_field( 'paintops_add_worker_action' );7148 paintops_nonce_field( 'paintops_add_worker_action' ); 7139 7149 echo '<label style="display:block;font-size:12px;">Name<br><input type="text" name="new_worker_name" placeholder="e.g. Chris Ramirez" required style="width:180px;"></label>'; 7140 7150 echo '<label style="display:block;font-size:12px;">Email<br><input type="email" name="new_worker_email" placeholder="chris@example.com" required style="width:220px;"></label>'; … … 7175 7185 $members = ( $crew ? paintops_crew_member_ids( $crew ) : [] ); 7176 7186 echo '<form method="post" style="border:1px solid #ccd0d4;border-radius:8px;padding:14px 16px;margin:0 0 12px;background:#fff;max-width:720px;">'; 7177 wp_nonce_field( 'paintops_crew_action' );7187 paintops_nonce_field( 'paintops_crew_action' ); 7178 7188 echo '<input type="hidden" name="crew_id" value="' . (int) $cid . '">'; 7179 7189 echo '<div style="display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:10px;">'; … … 7211 7221 echo '<p class="description" style="margin:0 0 10px;">The Time Clock lets staff and assigned Painters/Helpers Check In when they arrive at a job and Check Out when they leave, logging hours to the job automatically (it also works offline and syncs when back online).</p>'; 7212 7222 echo '<form method="post">'; 7213 wp_nonce_field( 'paintops_save_timeclock_action' );7223 paintops_nonce_field( 'paintops_save_timeclock_action' ); 7214 7224 echo '<p style="margin:0 0 8px;"><label><input type="checkbox" name="paintops_timeclock_enabled" value="1"' . checked( $timeclock_on, true, false ) . '> Enable the per-job Time Clock (Check In / Check Out)</label></p>'; 7215 7225 echo '<p class="description" style="margin:0 0 10px;">When off, the Time Clock box is hidden from every job and no new check-ins can be recorded. Hours already logged stay put, and staff can still enter or correct hours by hand in Financials & Profitability.</p>'; … … 7221 7231 echo '<p class="description" style="margin:0 0 10px;">How long staff and Painter/Helpers stay logged in before WordPress asks them to sign in again. WordPress normally logs people out after 2 days (14 with "Remember Me"), which is a nuisance for a crew pulling up job details on their phones. This applies to each person the next time they log in - it doesn\'t extend sessions that already exist. Customer-facing quote links are unaffected (those never require a login).</p>'; 7222 7232 echo '<form method="post">'; 7223 wp_nonce_field( 'paintops_save_login_duration_action' );7233 paintops_nonce_field( 'paintops_save_login_duration_action' ); 7224 7234 echo '<p style="margin:0 0 8px;"><label for="paintops_login_duration_days"><strong>Stay logged in for</strong></label> '; 7225 7235 echo '<select id="paintops_login_duration_days" name="paintops_login_duration_days">'; -
paintops/trunk/readme.txt
r3693322 r3694342 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 0.3017 Stable tag: 1.1.000 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 108 108 == Changelog == 109 109 110 = 1.1.000 = 111 * A visual refresh across the whole app. The menu is now a dark navy rail with the PaintClarity mark at the top, and the page you are on is marked with a blue bar rather than a filled pill. 112 * Every screen now has a proper page header: the screen name, a thin rule under it, and, where the page already knows it, a short line of context such as how many customers are listed or which year the Profits page is showing. 113 * Text sizes are consistent everywhere. Helper sentences used to render at whatever size your WordPress theme happened to use, which on many themes made them larger than the headings above them. 114 * Money columns in every table now line up on the right with their decimal points stacked, so a column of figures can be read down. 115 * Buttons now have three clear levels: one solid action per screen, bordered buttons for everything secondary, and plain links for the rest. Previously almost every button looked equally important. 116 * The job stat tiles lead with Profit, marked with a rule across the top. On some themes the old highlight made the most important figure look like the faded one. 117 * Cards and tables are flatter and tighter, with a hairline border instead of a shadow. Shadows are now used only for menus and panels that genuinely float above the page. 118 * Keyboard users get a clear focus outline on every control in the app. 119 * The company logo you upload is unchanged everywhere it belongs: quotes, invoices, expense reports and your customer payment pages. Only the app menu shows the PaintClarity mark. 120 * Accessibility: icons, the job search box and the phone menus now keep their screen-reader attributes, which WordPress had been stripping. Form fields across the app that had no label now have one. 121 * Editing a customer's address from the Customers list now opens the full Edit Customer form instead of a small editor inside the row. One form, one save, one set of rules, so the two can never drift apart. 122 * Fixed a typo in one of the starter Resource links, "12 Mistakes That Loose Sales". New installs were already correct; sites set up before the fix have the title corrected automatically, and if both spellings ended up on your site the misspelled one is moved to the trash where you can still get it back. 123 110 124 = 1.0.301 = 111 125 * The Actions menu on the jobs list now opens as a dropdown over the page, lined up under the Actions link you tapped, instead of opening at the far left of the card and pushing every row below it down. Click anywhere outside it, or press Escape, to close it.
Note:
See TracChangeset
for help on using the changeset viewer.