jenkins-bot has submitted this change and it was merged.

Change subject: Add placeholder for Amount field in proposals
......................................................................


Add placeholder for Amount field in proposals

Bug: T93252
Change-Id: Ie0045a6de323cf042f09ad6e092c772bc2ea64b8
---
M data/i18n/en.json
M data/i18n/qqq.json
M data/templates/inc/forms.html
M data/templates/proposals/edit.html
4 files changed, 5 insertions(+), 3 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/data/i18n/en.json b/data/i18n/en.json
index 7935a4f..e2af9ad 100644
--- a/data/i18n/en.json
+++ b/data/i18n/en.json
@@ -128,6 +128,7 @@
        "proposals-edit-theme-empty": "Please select",
        "proposals-edit-theme-error": "Select a theme from the list.",
        "proposals-edit-amount": "Amount",
+       "proposals-edit-amount-placeholder": "USD",
        "proposals-edit-amount-error": "Amount must be numeric.",
        "proposals-edit-description": "Description",
        "proposals-edit-notes": "Notes",
diff --git a/data/i18n/qqq.json b/data/i18n/qqq.json
index 00a18fc..1534f15 100644
--- a/data/i18n/qqq.json
+++ b/data/i18n/qqq.json
@@ -101,6 +101,7 @@
        "privacy-page": "Privacy policy page content.",
        "proposal-summary": "Section title",
        "proposals-edit-amount": "Input label, followed ty text box.",
+       "proposals-edit-amount-placeholder": "Placeholder for input text box",
        "proposals-edit-amount-error": "Error message",
        "proposals-edit-description": "Input label, followed by text box.",
        "proposals-edit-error": "Error message shown when proposal addition 
fails.",
diff --git a/data/templates/inc/forms.html b/data/templates/inc/forms.html
index 72f02e7..d7f543e 100644
--- a/data/templates/inc/forms.html
+++ b/data/templates/inc/forms.html
@@ -34,11 +34,11 @@
 
 {% macro input( ctx, type, mesg, name, opts = {} ) %}
 {% import _self as forms %}
-{% set opts = { 'required':false }|merge( opts ) %}
+{% set opts = { 'required':false, 'placeholder':'' }|merge( opts ) %}
 {% set value = opts.value ?: ctx.form.get( name ) %}
 {{ forms.startElement( ctx, mesg, name, opts ) }}
 <input type="{{ type }}" class="form-control {{ opts.elmclass ? opts.elmclass
-}}" id="{{ name }}" name="{{ name }}" value="{{ value ?: '' }}" {{ 
opts.required ? 'required' }}/>
+}}" id="{{ name }}" name="{{ name }}" value="{{ value ?: '' }}" 
placeholder="{{ opts.placeholder }}" {{ opts.required ? 'required' }}/>
 {{ forms.endElement( ctx, name, mesg ) }}
 {% endmacro %}
 
diff --git a/data/templates/proposals/edit.html 
b/data/templates/proposals/edit.html
index 279cf3d..b1c3a3d 100644
--- a/data/templates/proposals/edit.html
+++ b/data/templates/proposals/edit.html
@@ -28,7 +28,7 @@
   {{ forms.text( ctx, 'proposals-edit-title', 'title', { 'required':true } ) }}
   {{ forms.url( ctx, 'proposals-edit-url', 'url', { 'required':true } ) }}
   {{ forms.select( ctx, 'proposals-edit-theme', 'theme', { 
'online':'theme-online'|message, 'offline':'theme-offline'|message, 
'tool':'theme-tool'|message, 'research':'theme-research'|message }, { 
'required':true } ) }}
-  {{ forms.number( ctx, 'proposals-edit-amount', 'amount' ) }}
+  {{ forms.number( ctx, 'proposals-edit-amount', 'amount', { 
'placeholder':'proposals-edit-amount-placeholder'|message } ) }}
   {{ forms.textArea( ctx, 'proposals-edit-description', 'description', { 
'elmclass':'monospace' } ) }}
   {{ forms.textArea( ctx, 'proposals-edit-notes', 'notes', { 
'elmclass':'monospace' } ) }}
   <button type="submit" class="btn btn-primary pull-right" id="submit" 
name="submit">

-- 
To view, visit https://gerrit.wikimedia.org/r/198238
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0045a6de323cf042f09ad6e092c772bc2ea64b8
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/iegreview
Gerrit-Branch: master
Gerrit-Owner: Niharika29 <niharikakohl...@gmail.com>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to