Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

Commit

Permalink
CampTix Tools: Add placeholder in Purchase date field.
Browse files Browse the repository at this point in the history
  • Loading branch information
donmhico committed Aug 16, 2019
1 parent 2cf128e commit bd50698
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ window.camptix = window.camptix || { models: {}, views: {}, collections: {} };
model: this.model.toJSON(),
fields: camptix.collections.segmentFields.toJSON(),
ops: selectedField.get( 'ops' ),
type: selectedField.get( 'type' )
type: selectedField.get( 'type' ),
placeholder: selectedField.get('placeholder')
};

if ( data.type == 'select' ) {
Expand Down Expand Up @@ -130,7 +131,8 @@ window.camptix = window.camptix || { models: {}, views: {}, collections: {} };
caption: '',
option_value: '',
ops: [ 'is', 'is not' ],
values: []
values: [],
placeholder: ''
}
});

Expand Down
8 changes: 6 additions & 2 deletions camptix.php
Original file line number Diff line number Diff line change
Expand Up @@ -3191,7 +3191,10 @@ function menu_tools_notify() {
<# }); #>
</select>
<# } else if ( data.type == 'text' ) { #>
<input type="text" class="segment-value regular-text" value="{{ data.model.value }}" />
<input placeholder="{{ data.placeholder }}" type="text" class="segment-value regular-text" value="{{ data.model.value }}" />
<# if ( data.placeholder.length > 0 ) { #>
<span class="screen-reader-text">{{ data.placeholder }}</span>
<# } #>
<# } #>
</div>

Expand Down Expand Up @@ -3226,7 +3229,8 @@ function menu_tools_notify() {
caption: 'Purchase date',
option_value: 'date',
type: 'text',
ops: [ 'before', 'after' ]
ops: [ 'before', 'after' ],
placeholder: 'YYYY-MM-DD',
}));

<?php foreach ( $this->get_all_questions() as $question ) : ?>
Expand Down

0 comments on commit bd50698

Please sign in to comment.