Project

General

Profile

Actions

Feature #21678

open

Mark required fields conditionally based on other fields

Added by Marek Hulán over 6 years ago. Updated about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

"Puppet Environment" is a required field for provisioning new hosts. However, the form does not flag this field as being required. Other required fields have an "*" next to them to denote them as being required.

As it turned out, the puppet environment is required field only when a puppet master is selected on the host.

It would be nice to have a possibility to switch required flag based on the rest of the form. The similar behavior can be found at subnet form and I support other places too. Since we don't want to extend already complicate JS code for host form, I suppose this will be possible after we refactor that or reimplement our form helpers.


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #7450: We mark not-required fields as requiredClosedMarek Hulán09/16/2014Actions
Related to Foreman - Feature #20839: implement bookmark creation using reactClosedOhad Levy09/04/2017Actions
Actions #1

Updated by Marek Hulán over 6 years ago

  • Related to Bug #7450: We mark not-required fields as required added
Actions #2

Updated by Marek Hulán over 6 years ago

  • Related to Feature #20839: implement bookmark creation using react added
Actions #3

Updated by Ohad Levy over 6 years ago

  • Subject changed from Mark required fields conditionally based on other fields to Mark required fields conditionally based on other fields

What is the right behavior? Should we not show/disable the field? (E.g don't show environment if puppet master is not selected?) Or rather explicitly say that you want puppet first (and then select both)?

Actions #4

Updated by Marek Hulán about 6 years ago

Today we update the host form based on what user selects (e.g. provisioning method). For now I think just hiding the fields until user selected puppet master is good enough. Although that would mean extending existing host form JS. If we go this way, we should look at other more complicated forms, such as interface or subnet forms.

Actions

Also available in: Atom PDF