Skip to content

Commit

Permalink
Remove type selector from subject tag edit page
Browse files Browse the repository at this point in the history
  • Loading branch information
jimchamp committed Sep 10, 2024
1 parent 8f47922 commit 80d1541
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion openlibrary/templates/type/tag/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>$_("Edit Tag")</h1>
<div id="contentBody">

<form id="edittag" name="edit" method="post" action="" class="olform">
$:render_template("type/tag/tag_form_inputs", tag_name=page.name, tag_type=page.tag_type, tag_description=page.tag_description, fkey=page.fkey, body=page.body)
$:render_template("type/tag/tag_form_inputs", tag_name=page.name, tag_type=page.tag_type, tag_description=page.tag_description, fkey=page.fkey, body=page.body, show_type_picker=False)
<div class="clearfix"></div>

<div class="formElement bottom">
Expand Down
29 changes: 15 additions & 14 deletions openlibrary/templates/type/tag/tag_form_inputs.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$def with (tag_name='', tag_type='', tag_description='', fkey=None, body='')
$def with (tag_name='', tag_type='', tag_description='', fkey=None, body='', show_type_picker=True)

<div class="formElement">
<div class="label">
Expand Down Expand Up @@ -40,17 +40,18 @@
</div>
</div>

<div class="formElement">
<div class="label"><label for="tag_type">$_("Tag type")</label></div>
<div class="input">
<select name="tag_type" id="tag_type" required>
<option value="">$_("Select")</option>
$ tag_types = get_tag_types()
$for t_type in tag_types:
$if t_type == tag_type:
<option value="$t_type" selected>$t_type</option>
$else:
<option value="$t_type">$t_type</option>
</select>
$if show_type_picker:
<div class="formElement">
<div class="label"><label for="tag_type">$_("Tag type")</label></div>
<div class="input">
<select name="tag_type" id="tag_type" required>
<option value="">$_("Select")</option>
$ tag_types = get_tag_types()
$for t_type in tag_types:
$if t_type == tag_type:
<option value="$t_type" selected>$t_type</option>
$else:
<option value="$t_type">$t_type</option>
</select>
</div>
</div>
</div>

0 comments on commit 80d1541

Please sign in to comment.