e107
e107 copied to clipboard
FR - add parameter class to signup shortcode
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.
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.
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.
@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.
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:
