Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR - add parameter class to signup shortcode #3837

Open
Jimmi08 opened this issue Jun 11, 2019 · 4 comments
Open

FR - add parameter class to signup shortcode #3837

Jimmi08 opened this issue Jun 11, 2019 · 4 comments
Labels
type: enhancement An improvement or new feature request

Comments

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 11, 2019

Only note,

	function sc_signup_form_open()
	{
		return "<form action='".e_SELF."' method='post' id='signupform' autocomplete='off'><div>".e107::getForm()->token()."</div>";
	}

just to save time with styling.
PS. I can PR this in future, so this is more reminder if this change is ok.

@Jimmi08
Copy link
Contributor Author

Jimmi08 commented Jun 11, 2019

Next limited part:
FPW button

	function sc_fpw_submit($parm=null)
	{
		// return '<button type="submit" name="pwsubmit" class="button btn btn-primary btn-block reset">'.$label.'</button>';
		// return "<input class='button btn btn-primary btn-block' type='submit' name='pwsubmit' value='".$label."' />";	
		$label = deftrue('LAN_FPW_102', LAN_SUBMIT);
		return e107::getForm()->button('pwsubmit', $label); 
	}

it calls, in fact, adminnutton() method, wouldn't be better call it directly?
This really looks too overcomplicated for simple submit button.

@SimSync
Copy link
Contributor

SimSync commented Jun 11, 2019

Don't know what's the change in post 1.
Post 2 using the button() function makes sense, so you can make general changes to buttons in 1 place. It would make sense to be able to supply some options via the $parm parameter in my opinion. That would help with styling the button.

@Jimmi08
Copy link
Contributor Author

Jimmi08 commented Jun 11, 2019

@SimSync post 1 - parameter $class there is only ID. I can manually fix this in style.css but with next update original css, I need to do it again.. it's just saving time

post 2 - you are right. Simple submit button with parameters would be nice (like with other elements). Now it's calling next method and it outputs not needed code.

@Moc Moc added the type: enhancement An improvement or new feature request label Jul 1, 2019
@Jimmi08
Copy link
Contributor Author

Jimmi08 commented Jul 29, 2022

Workaround for forgotten password button with theme shortcodes:

This is needed:
{FPW_SUBMIT: class=btn primary-btn rounded-full}
It is not supported

Fix in theme shortcodes:

	function sc_fpw_submit($parm = null)
	{
		$label = deftrue('LAN_FPW_102', LAN_SUBMIT);
 		return e107::getForm()->button('pwsubmit', $label, 'submit', '',  array('class'=>'btn primary-btn rounded-full' ) );
	}

Result:

image

Jimmi08 added a commit to Jimmi08/e107jm-dev that referenced this issue Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement An improvement or new feature request
Projects
None yet
Development

No branches or pull requests

3 participants