Links to the three older single-purpose add pages were removed. Creating a record now happens on the page that shows that kind of record.
What has changed on this site, in its database and in the scripts behind it, newest first. Older history is being filled in as it is reconstructed, and each entry says whether it was recorded at the time or rebuilt later.
Showing entries for file add_asset.php. Show everything
Links to the three older single-purpose add pages were removed. Creating a record now happens on the page that shows that kind of record.
Viewing, creating and editing an asset now happen on one page. The separate add-asset page was folded in behind a "new" address, unchanged, and the view gained a "+ New asset" link.
Both halves were moved, not rewritten. The same pattern as the entity page a step earlier.
The add-asset page was superseded by the combined assets page, where creating an asset is the "new" mode. Its code moved there unchanged; the old page kept working until every link to it had been repointed.
The first click into the JSON box selects everything in it, so a paste replaces the old text. A second click places the cursor as usual; dragging, typing or an empty box are left alone.
When no exchange is chosen, the exchange code in the pasted JSON now picks it, if it matches exactly one known exchange. A chosen exchange still wins and is still checked against the code, an unknown code is still refused, and the preview asks for the venue to be confirmed.
The entity is still always chosen by hand, because a CIK can match more than one record or none.
The JSON box on the add-asset page starts empty, with the sample as grey placeholder text, unless the page arrived with an entity already chosen, in which case the filled-in sample is kept.
An asset can be entered as form fields or pasted as JSON, but the entity and exchange are always chosen from the lists, never taken from the JSON. Instead the JSON can state the entity's name or CIK and the exchange code it expects, and the preview refuses a choice that does not match.
Internal row ids mean nothing outside one database, and a wrong one would save quietly under the wrong issuer; a stated name or code is checked instead.
Arriving from an entity's "+ add asset" link now opens the form with that entity already chosen, and the JSON sample already names it. The link's setting had been ignored, so the form opened blank; an id that matches no entity now shows a warning.
An older shared-key check on the add-asset page was retired. The page now relies on the site's sign-in and permissions, checked before the page reads anything, and it refuses to load if the sign-in system is not running.
A page for adding an asset by hand: a form, a preview, then a confirm that writes one record. The entity and exchange are required and chosen from lists of existing records, the class, role and status come from the allowed lists, and a symbol already in use triggers a warning.
The add-asset page moved into the site's admin tools area, where access is checked by role, and now uses the site's shared page header, footer and navigation.