20 Commits

Author SHA1 Message Date
Alice Kile
eb83e00011
fix formatting issues
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:35 -05:00
Alice Kile
ec62f331b8
app: Implement toggle button in app page
- revamp the old form submission model to enable/disable apps into a
  simple toggle button
- provide backwards compatibility when javascript is disabled

Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-19 00:02:16 +05:30
Sunil Mohan Adapa
b684b07d11
names: Make all apps use new api to retrieve domain names
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-11 18:39:54 -04:00
Sunil Mohan Adapa
e4351b6b97
Introduce daemon component to handle systemd units
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:18:02 -04:00
Sunil Mohan Adapa
7ee4d13dce Show Gujarati in the list of UI languages
- Explicitly setup the list of Django languages. Keep them sorted by language
  code.

- Fallback to language name when Django can't provide locale language name.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-09 14:52:02 +05:30
Joseph Nuthalapati
b740a37a1e
users: Replace disabled with readonly for admin group checkbox
- Added validation logic in the backend to compensate

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-04 08:28:55 -04:00
Hemanth Kumar Veeranki
b9963a45cd
Restrict removal of last admin user
- Don't allow disabling the only available admin account.
- Don't allow deletion of the only available admin account.
- Don't allow removing admin privileges of the only available admin account.

Signed-off-by: Hemanth Kumar Veeranki <hems.india1997@gmail.com>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-06-21 20:09:02 +05:30
Sunil Mohan Adapa
6090d5c37d
locale: Split the language selection form into a mixin
- It may not be a good thing for the user created/edit forms to inherit from
  Django Form and ModelForm at the same time. So, simply by introducing a
  minimal mixin.

- Save only when committing.

- Use auto-saving feature.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-21 21:08:33 +01:00
Sunil Mohan Adapa
ef9e5c7a43
locale: Update the language selection form
- Add help text.

- Add docstring.

- Add better description for 'no choice'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-21 21:07:31 +01:00
Sunil Mohan Adapa
b4f75ded79
locale: YAFP and isort formatting
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-21 21:06:20 +01:00
Sai Kiran Naragam
837e0b8384
locale: Adds preferred language for logged in user
- UserProfile model is created, it has one-to-one relationship with User.

- Language selection dropdown added to UserCreate and UserUpdate forms.

- Adds None to language selection dropdown to explicitly unselect.

- LANGUAGE_SESSION_KEY is set to User's preferred language on LogIn activity.

- LANGUAGE_SESSION_KEY is deleted on User's LogOut activity.

Signed-off-by: Sai Kiran Naragam <saikiran.rguiiit@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-21 21:06:14 +01:00
Sai Kiran Naragam
5cff5629d8
locale: Anonymous users can set preferred language
Logged-in user flow is pending.

Check [How django discovers language preference]:
https://docs.djangoproject.com/en/1.10/topics/i18n/translation/#how-django-discovers-language-preference

Signed-off-by: Sai Kiran Naragam <saikiran.rguiiit@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-21 21:06:07 +01:00
Sunil Mohan Adapa
dea4af17fb
Rename Plinth to FreedomBox in license headers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:09 -05:00
Joseph Nuthalpati
4abb7cd885
Diaspora: Checkbox to enable or disable user registrations 2017-07-29 12:40:44 -04:00
Joseph Nuthalpati
5ad180fcc9
Add Tahoe-LAFS module
- Created basic plinth app which starts an introducer and a storage
  node on the FreedomBox.
- Prompt user to set a domain name before creating Tahoe-LAFS nodes.
- Support adding and removing of introducers to the storage node.
- Serve Tahoe-LAFS from a different port.
- Start all nodes and introducers at system startup.
- Add utility class YAMLFile with test cases.
2017-06-10 09:38:57 -04:00
morrme
ad3420823d
owncloud: Remove module (Closes: #818)
It is believed that ownCloud is unlikely to return to Debian in near future.
Removing module to ease maintenance.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-04-25 18:06:56 +05:30
fonfon
f419c28596
Services: Explicitly use ServiceForm and ServiceView
- adapted all modules to not use views.ConfigurationView anymore
- removed templates that are not needed anymore
- no more implicit 'enabled' and 'get_status' functions in __init__.py files
- (more coherent/explicit use of Django functionality)
2016-05-11 18:19:31 -04:00
Sunil Mohan Adapa
fa8c2cf6ff
views: Add a common view for enabling applications
- A lot of boiler plate code can be removed from Plinth if enabling and
  disabling an application can be done using a common base form.

- This also allows to define a reusable method in an application for
  enabling and disabling.

- This brings more structure to a application module and paves way for
  having a different views such as dashboard.
2016-02-28 19:37:23 +05:30
fonfon
e905d1a8f2 packagekit: use TemplateView instead of FormView
For the installation procedure a TemplateView is sufficient, and the user
won't be able to edit any form-data on the client-side.
2015-01-05 00:27:45 +05:30
Sunil Mohan Adapa
a4be460538 Introduce framework for checking/installing packages
- Uses PackageKit dameon, Glib library wrapping packagekit DBUS API and
  Python bindings for the Glib library.

- Implement a decorator to wrap views requiring packages.

- Framework allows for parallel operations.  However, doing parallel
  operations hangs because of what appears to be PackageKit backend
  limitations.
2015-01-05 00:13:19 +05:30