"Enforce password protection" is a subcase of "Always ask for a
password", so it should be disabled if its parent option is unchecked.
Although other dependant options in the sharing settings are fully
hidden instead of just disabled this option is disabled but shown to
avoid confusion when updating from a previous Nextcloud version where
"Always ask for a password" was unchecked and "Enforce password
protection" was checked.
Besides that, due to their dependency the enforced password protection
is now automatically unchecked too if its parent option is unchecked.
Finally, the groups excluded from password requirements are also
disabled when "Always ask for a password" is unchecked, as they might be
still shown if "Enforce password protection" was checked due to an
update from a previous version.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"Enforce password protection" is a subcase of "Always ask for a
password", so it should be indented to visually show the dependency.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The permitted contents of a paragraph are only phrasing contents, so
"div" elements can not be used, although "span" can. Besides being
invalid HTML it seems that the browser ends the paragraph at the div, so
the label/input that appears after it is treated as being in a new
paragraph, which is not indented by default, and thus is not aligned
with the rest of its sibling inputs.
Note that an additional div is nevertheless added once the page is
loaded to be able to select the groups, but this one does not break its
parent paragraph (maybe due to being added after the page load, but I do
not really know). Nevertheless, it needs to be explicitly indented, and
the second indentend wrapper needs to be removed, as it affects only the
label but not the div/input, and therefore the label had an extra
indentation over the input.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The rest of "<br/>" elements in the file appear immediately after their
previous "</label>" rather than in a new line.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The inputs of the sharing settings are generated in a template in the
server, but the listeners to react to changes in the elements and save
the values in the server are loaded in the client once the DOM finishes
loading. If the DOM takes long to load the user can start to interact
with the settings before the listeners were set up and, therefore, the
changes would not be saved in the server. However, as the inputs are
modified the user would think that the changes were already saved.
To address that now when the sharing settings are open a loading spinner
is shown instead of the contents of the sharing settings, and only once
the listeners to save the changes were set up the spinner is removed and
the contents shown.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
And refactor how the grid works (now it's automatically using the
correct size instead of harcoding it)
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
- Make it possible to add the new property whiout chaning foundamentally
how the layout work each time
- Use only one grid instead of multiple nested grid
- Better mobile reponsiveness
Signed-off-by: Carl Schwan <carl@carlschwan.eu>