Verified Commit 5ae9d09e authored by Kevin Morris's avatar Kevin Morris
Browse files

fix: remove unused "Merge into" input from /packages



When using this input on `live` as a TU, the field is not
taken into account. Tried with no action and with the
Delete Packages action, which ended up deleting the packages
but not merging into the given target.

So, this commit removes that input from the page.
Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent f5e38e99
...@@ -1053,7 +1053,6 @@ PACKAGE_ACTIONS = {} ...@@ -1053,7 +1053,6 @@ PACKAGE_ACTIONS = {}
async def packages_post(request: Request, async def packages_post(request: Request,
IDs: List[int] = Form(default=[]), IDs: List[int] = Form(default=[]),
action: str = Form(default=str()), action: str = Form(default=str()),
merge_into: str = Form(default=str()),
confirm: bool = Form(default=False)): confirm: bool = Form(default=False)):
# If an invalid action is specified, just render GET /packages # If an invalid action is specified, just render GET /packages
...@@ -1067,8 +1066,7 @@ async def packages_post(request: Request, ...@@ -1067,8 +1066,7 @@ async def packages_post(request: Request,
# We deal with `IDs`, `merge_into` and `confirm` arguments # We deal with `IDs`, `merge_into` and `confirm` arguments
# within action callbacks. # within action callbacks.
callback = PACKAGE_ACTIONS.get(action) callback = PACKAGE_ACTIONS.get(action)
retval = await callback(request, package_ids=IDs, merge_into=merge_into, retval = await callback(request, package_ids=IDs, confirm=confirm)
confirm=confirm)
if retval: # If *anything* was returned: if retval: # If *anything* was returned:
success, messages = retval success, messages = retval
if not success: if not success:
......
...@@ -11,11 +11,6 @@ ...@@ -11,11 +11,6 @@
<option value="unnotify">{{ "UnNotify" | tr }}</option> <option value="unnotify">{{ "UnNotify" | tr }}</option>
</select> </select>
{% if request.user.is_trusted_user() or request.user.is_developer() %}
<label for="merge_into">{{ "Merge into" | tr }}</label>
<input id="merge_into" type="text" name="merge_into" />
{% endif %}
<label class="confirmation"> <label class="confirmation">
<input type="checkbox" name="confirm" /> <input type="checkbox" name="confirm" />
{{ "Confirm" | tr }} {{ "Confirm" | tr }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment