How to add new view in already existing components in Joomla3.3 - joomla3.3

I am using joomla 3.3.x version. In this joomla version one built in component is there for registration and login.That component name is com_user. I have to create two registration forms for my site.
Form names are Registration and Client Registration.
For registration I will use the registration form already present in this component.
File Structure for this:
//joomlaroot/components/com_users/models/forms/registration.xml
//joomlaroot/components/com_users/models/registration.php
//joomlaroot/components/com_users/views/registration/tmpl/default.php
//joomlaroot/components/com_users/controllers/registration.php
For Client Registration I have to add a view file in this component.
How can I add that?

You can create another layout within:
//joomlaroot/components/com_users/views/registration/tmpl/your_file.php
And switch to this layout at the
//joomlaroot/components/com_users/controllers/registration.php with:
$view = $this->getView('users', 'html');
$view->setLayout('your_file_name');

Related

Using React to create a wordpress post with image and custom fields

I would like to crate a really simple react app where a registered and logged in user can create a post with an featured image and some custom fields (acf fields).
I wonder whats the best way build and include that in a static Wordpress Page?

Is it possible to customize Wagtail's auth forms?

This page shows how to customize templates: https://docs.wagtail.io/en/stable/advanced_topics/customisation/admin_templates.html
But I want to customize the forms instead. I'm trying to add reCaptcha to all of them.
Is this possible?
Wagtail provides a Django setting called WAGTAILADMIN_USER_LOGIN_FORM which allows a custom form to be declared for the login form.
Wagtail does not provide a setting for the password reset workflow though unfortunately.
settings/base.py
WAGTAILADMIN_USER_LOGIN_FORM = 'app.forms.CustomLoginForm'
forms.py
from django import forms
from wagtail.admin.forms.auth import LoginForm
class CustomLoginForm(LoginForm):
captcha = forms.CharField(required=True)
A reminder that there is a way to work with custom User models in Wagtail which may also suit your customisation needed.

Custom login page with Django 1.11

I looked for an already existing answer but I didn't find one. For a school project I have to create a website with Django 1.11.
My problem here is the following: I have to create the login page. Using Django class based view (login view in this example) but I dind't find any example. How to use a custom login page (not form.asp) (something like that) and connect it with my view and model ?

multiple router vs single router for large application in Backbone JS

I am creating a website which has multi user concept Like Admin can create teams, assign some sub-apps to team and create a user and assign users to that team
Likewise team admin can add users in a team and check user's statistics and so on.
Users can have some functionalities.
All have their common features like edit profile, login etc.. I am using require js along with Backbone.
Please suggest could i use multiple router or single router ?
I would recommend having an app router, which can define subrouters - I have written an example here under "Routing" - Backbone project organization

How do I use the FileUpload Class in an MVC web app

I am using this post as a reference for what I want to do. I am trying to add a button on my web app that allows the user to click a button upload an excel document straight to a database. In the example I am referencing they use the FileUpload class but It appears I do not know how to use this in a web app.
I attempted putting it in a service file:
FileUpload fileUpload1 = new FileUpload();
but I cannot reference the fileUpload1 variable in that context. My best guess at this point is that this is a web app and I am trying to use a windows form class. I get a reference to System.Web.UI.WebControls; when I use it though.
Any suggestions?

Resources