From: Evan Prodromou Date: Wed, 7 Mar 2012 20:46:58 +0000 (-0600) Subject: use - instead of _ for forms, and unique ids for submits X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=765bd6142f7c884b5c5967db76d0719f2b9bee8b;p=quix0rs-gnu-social.git use - instead of _ for forms, and unique ids for submits --- diff --git a/ActivitySpamPlugin.php b/ActivitySpamPlugin.php index b62401ce1b..3efa92c935 100644 --- a/ActivitySpamPlugin.php +++ b/ActivitySpamPlugin.php @@ -218,8 +218,8 @@ class ActivitySpamPlugin extends Plugin function onEndShowStyles($action) { $action->element('style', null, - 'form_train_spam input.submit { background: url("'.$this->path('icons/bullet_black.png').'") no-repeat 0px 0px } ' . "\n" . - 'form_train_spam input.submit { background: url("'.$this->path('icons/exclamation.png').'") no-repeat 0px 0px } '); + '.form-train-spam input.submit { background: url("'.$this->path('icons/bullet_black.png').'") no-repeat 0px 0px } ' . "\n" . + '.form-train-ham input.submit { background: url("'.$this->path('icons/exclamation.png').'") no-repeat 0px 0px } '); return true; } diff --git a/trainhamform.php b/trainhamform.php index 410b3206b8..05cadaa953 100644 --- a/trainhamform.php +++ b/trainhamform.php @@ -92,7 +92,7 @@ class TrainHamForm extends Form { function formActions() { - $this->submit('submit', + $this->submit('train-ham-submit-' . $this->notice->id, _('Train ham'), 'submit', null, @@ -110,7 +110,7 @@ class TrainHamForm extends Form { function id() { - return 'train_ham_' . $this->notice->id; + return 'train-ham-' . $this->notice->id; } /** @@ -141,6 +141,6 @@ class TrainHamForm extends Form { function formClass() { - return 'form_train_ham ajax'; + return 'form-train-ham ajax'; } } diff --git a/trainspamform.php b/trainspamform.php index ecf7b04190..ee1ecd2a74 100644 --- a/trainspamform.php +++ b/trainspamform.php @@ -92,7 +92,7 @@ class TrainSpamForm extends Form { function formActions() { - $this->submit('submit', + $this->submit('train-spam-submit-' . $this->notice->id, _('Train spam'), 'submit', null, @@ -110,7 +110,7 @@ class TrainSpamForm extends Form { function id() { - return 'train_spam_' . $this->notice->id; + return 'train-spam-' . $this->notice->id; } /** @@ -141,6 +141,6 @@ class TrainSpamForm extends Form { function formClass() { - return 'form_train_spam ajax'; + return 'form-train-spam ajax'; } }