aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/new_channel.tpl
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-19 20:12:58 -0800
committerzotlabs <mike@macgirvin.com>2018-02-20 17:20:35 -0800
commitce8349662d8c9e309f3faf57114acddb67eb11b7 (patch)
tree850e8299aa79960dbca8aeef9ea9a934dbfb24bb /view/tpl/new_channel.tpl
parent02575f46a6d288cd2c1168bbbe52be2c7863cb46 (diff)
downloadvolse-hubzilla-ce8349662d8c9e309f3faf57114acddb67eb11b7.tar.gz
volse-hubzilla-ce8349662d8c9e309f3faf57114acddb67eb11b7.tar.bz2
volse-hubzilla-ce8349662d8c9e309f3faf57114acddb67eb11b7.zip
Add 'Validate' button to new_channel page and disable submit until validated. This is to get around the issue that clicking submit without ever focusing and blurring the nickname field won't actually submit the form but only provide validation. It needs to be clicked again to submit. The first click processed the blur but remained on the page with no feedback. If somebody has better workarounds, please provide. The goal is to ensure that the name and the nickname are both validated before we can submit.
Diffstat (limited to 'view/tpl/new_channel.tpl')
-rwxr-xr-xview/tpl/new_channel.tpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/view/tpl/new_channel.tpl b/view/tpl/new_channel.tpl
index c4837064f..f415e4e2c 100755
--- a/view/tpl/new_channel.tpl
+++ b/view/tpl/new_channel.tpl
@@ -24,7 +24,9 @@
{{include file="field_input.tpl" field=$nickname}}
<div id="nick-spinner" class="spinner-wrapper"><div class="spinner m"></div></div>
- <button class="btn btn-primary" type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}">{{$submit}}</button>
+ <button class="btn btn-secondary" name="validate" id="newchannel-validate-button" value="{{$validate}}" onclick="validate_channel(); return false;">{{$validate}}</button>
+
+ <button class="btn btn-primary" type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}" >{{$submit}}</button>
<div id="newchannel-submit-end" class="clear"></div>
<div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div>