mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Updated forms.
This commit is contained in:
parent
48b83d7e41
commit
d3514cfc5f
7 changed files with 47 additions and 17 deletions
|
|
@ -10,14 +10,15 @@ export default function TrackingCodeForm({ values, onClose }) {
|
|||
return (
|
||||
<FormLayout>
|
||||
<p>
|
||||
This is the public URL for <b>{values.name}</b>.
|
||||
This is the publicly shared URL for <b>{values.name}</b>.
|
||||
</p>
|
||||
<FormRow>
|
||||
<textarea
|
||||
ref={ref}
|
||||
rows={3}
|
||||
cols={60}
|
||||
defaultValue={`${document.location.origin}/share/${share_id}/${name}`}
|
||||
spellCheck={false}
|
||||
defaultValue={`${document.location.origin}/share/${share_id}/${encodeURIComponent(name)}`}
|
||||
readOnly
|
||||
/>
|
||||
</FormRow>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ export default function TrackingCodeForm({ values, onClose }) {
|
|||
ref={ref}
|
||||
rows={3}
|
||||
cols={60}
|
||||
spellCheck={false}
|
||||
defaultValue={`<script async defer data-website-id="${values.website_uuid}" src="${document.location.origin}/umami.js" />`}
|
||||
readOnly
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default function WebsiteEditForm({ values, onSave, onClose }) {
|
|||
return (
|
||||
<FormLayout>
|
||||
<Formik
|
||||
initialValues={{ ...initialValues, ...values, make_public: !!values?.share_id }}
|
||||
initialValues={{ ...initialValues, ...values, enable_share_url: !!values?.share_id }}
|
||||
validate={validate}
|
||||
onSubmit={handleSubmit}
|
||||
>
|
||||
|
|
@ -63,8 +63,8 @@ export default function WebsiteEditForm({ values, onSave, onClose }) {
|
|||
</FormRow>
|
||||
<FormRow>
|
||||
<label></label>
|
||||
<Field name="make_public">
|
||||
{({ field }) => <Checkbox {...field} label="Make public" />}
|
||||
<Field name="enable_share_url">
|
||||
{({ field }) => <Checkbox {...field} label="Enable share URL" />}
|
||||
</Field>
|
||||
</FormRow>
|
||||
<FormButtons>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue