Skip to content

Commit

Permalink
feat(topic source editor): change prompt to 'source description' and …
Browse files Browse the repository at this point in the history
…make 'ai title' field read only
  • Loading branch information
yonadavGit committed Jan 29, 2024
1 parent 0801a9b commit b0c1ef1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions static/js/AdminEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const options_for_form = {
type: 'textarea',
markdown: true
},
"Prompt": {label: "Prompt", field: "prompt", placeholder: "Add a prompt.", type: 'textarea'},
"AI Prompt": {label: "AI Prompt", field: "aiPrompt", placeholder: "AI Generated Prompt", type: 'textarea readonly'},
"Prompt": {label: "Source Description", field: "prompt", placeholder: "Add a prompt.", type: 'textarea'},
"AI Prompt": {label: "AI Source Description", field: "aiPrompt", placeholder: "AI Generated Prompt", type: 'textarea readonly'},
"Context for Prompt": {label: "Context for Prompt", field: "context", placeholder: "Why was this source added", type: 'textarea'},
"AI Title": {label: "AI Title", field: "aiTitle", placeholder: "AI Generated Title", type: 'readonly'},
"English Short Description": {
Expand Down Expand Up @@ -188,6 +188,7 @@ const AdminEditor = ({title, data, close, catMenu, pictureUploader, updateData,
const inputTypeReadOnly = field.includes('Year') ? 'number' : 'text';
obj = <input readOnly type={inputTypeReadOnly} id={field} onChange={setInputValue} defaultValue={data[field]}
placeholder={Sefaria._(placeholder)}/>;
break;
default:
const inputType = field.includes('Year') ? 'number' : 'text';
obj = <input type={inputType} id={field} onChange={setInputValue} defaultValue={data[field]}
Expand Down

0 comments on commit b0c1ef1

Please sign in to comment.