eventman/angular_app/import-persons.html

70 lines
3.5 KiB
HTML

<!-- import tickets -->
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<div class="panel-title"><h1>{{'Import tickets with Eventbrite API' | translate}}</h1></div>
</div>
<div class="panel-body">
<form name="ebAPIForm" class="well">
<div class="form-group">
<label for="eb-api-key">{{'OAuth token' | translate}}</label>
<input ng-model="ebAPIkey" id="eb-api-key" type="password" ng-required="true">
</div>
<div class="form-group">
<label for="eb-event-id">{{'Eventbrite Event ID' | translate}}</label>
<input ng-model="ebEventID" id="eb-event-id" ng-required="true">
</div>
<input type="checkbox" ng-model="createNewEvent"> {{'create a new event' | translate}}
<br />
<div class="form-group" ng-disabled="createNewEvent">
<label for="forEvent">{{'Associate tickets to this event' | translate}}</label>
<select class="form-control" id="forEvent" ng-model="targetEvent" ng-required="true" ng-disabled="createNewEvent">
<option ng-repeat="event in events" value="{{event._id}}">{{event.title}}</option>
</select>
</div>
<div>
<br />
<input type="submit" value="{{'Import' | translate}}" ng-click="apiImport()" ng-disabled="importRunning" />
</div>
</form>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<div class="panel-title"><h1>{{'Import tickets from Eventbrite CSV' | translate}}</h1></div>
</div>
<div class="panel-body">
<form name="ebCSVForm" class="well">
<div class="form-group">
<label for="eb-csv-import">{{'CSV file' | translate}}</label>
<input name="file" ng-file-select ng-model="file" type="file" id="eb-csv-import" ng-required="true">
<p class="help-block">{{'CSV exported from Eventbrite' | translate}}</p>
</div>
<div class="form-group">
<label for="forEvent">{{'Associate tickets to this event' | translate}}</label>
<select class="form-control" id="forEvent" ng-model="targetEvent" ng-required="true">
<option ng-repeat="event in events" value="{{event._id}}">{{event.title}}</option>
</select>
</div>
<input type="checkbox" ng-model="deduplicate"> {{'deduplicate entries' | translate}}
<div>
<br />
<input type="submit" value="{{'Import' | translate}}" ng-click="upload(file, '/ebcsvpersons')" ng-disabled="importRunning" />
</div>
<div class="form-group top5">
<uib-progressbar class="progress-striped" ng-class="{active: progressbarType == 'warning'}" max="100" value="progress" type="progressbarType">{{progress}}%</uib-progressbar>
</div>
<div class="form-group top5">
Result: total: <span>{{reply.total}}</span> valid: <span>{{reply.valid}}</span> new: <span>{{reply.new_in_event}}</span>
</div>
</form>
</div>
</div>
</div>