Skip to content

Commit

Permalink
Merge pull request #9608 from rebecca-shoptaw/9605/feature/replace-jq…
Browse files Browse the repository at this point in the history
…uery-validate-edit-forms

Replace jQuery `validate` in book/author/tag edit forms
  • Loading branch information
jimchamp authored Aug 15, 2024
2 parents 54ba13a + bdc4518 commit 1a6fde9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions openlibrary/templates/books/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2 class="editFormTitle">$:title</h2>
<div id="contentBody">
$ work_key = query_param('work_key', None)
$ action = '?work_key=%s' % work_key if work_key else ''
<form method="post" id="addWork" class="olform books validate" name="edit" action="$action">
<form method="post" id="addWork" class="olform books" name="edit" action="$action">

<input type="hidden" name="work--key" value="$work.key">
$ authors = work.authors and [a.author for a in work.authors]
Expand Down Expand Up @@ -87,7 +87,7 @@ <h3 class="editFormBookAuthors">
<label for="work-title">$_('Title')</label> <span class="tip">$:_("Use <b><i>Title: Subtitle</i></b> to add a subtitle.")</span> <span class="red">*<span class="tip">$_("Required field")</span></span>
</div>
<div class="input">
<input name="work--title" type="text" id="work-title" class="required" value="$this_title"/>
<input name="work--title" type="text" id="work-title" value="$this_title" required/>
</div>
<div class="label">
<label for="author-$0">$_("Author")</label>
Expand Down
4 changes: 2 additions & 2 deletions openlibrary/templates/tag/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ <h1>$_("Add a tag to Open Library")</h1>

<div id="contentBody">

<form method="post" action="" id="addtag" class="olform addtag1 validate">
<form method="post" action="" id="addtag" class="olform addtag1">

<div class="formElement">
<div class="label">
<label for="tagname">$_("Name of Tag")</label>*<span class="tip">$_("Required field")</span>
</div>
<div class="input">
<input type="text" name="tag_name" id="tag_name"/>
<input type="text" name="tag_name" id="tag_name" required/>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions openlibrary/templates/type/author/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1>$_("Edit Author")</h1>

<div id="contentBody">

<form id="addAuthor" name="edit" method="post" action="" class="olform books validate">
<form id="addAuthor" name="edit" method="post" action="" class="olform books">


<div class="formElement title">
Expand All @@ -32,7 +32,7 @@ <h1>$_("Edit Author")</h1>
</span>
</div>
<div class="input">
<input type="text" name="author--name" id="name" value="$page.name" class="required"/>
<input type="text" name="author--name" id="name" value="$page.name" required/>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions openlibrary/templates/type/tag/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ <h1>$_("Edit Tag")</h1>

<div id="contentBody">

<form id="edittag" name="edit" method="post" action="" class="olform validate">
<form id="edittag" name="edit" method="post" action="" class="olform">
<div class="formElement">
<div class="label">
<label for="name">$_("Label")</label>*<span class="tip">$_("Required field")</span>
</div>
<div class="input">
<input type="text" name="name" id="tag_name" value="$page.name" />
<input type="text" name="name" id="tag_name" value="$page.name" required />
</div>
</div>

Expand Down

0 comments on commit 1a6fde9

Please sign in to comment.